KonsolScript KonsolScript badge KonsolScript: Automate and Orchestrate

Ship once. Evolve forever.

Embeddable scripting runtime for games, tools, AI orchestration, and live-updating applications. Download KonsolScript: Automate and Orchestrate


I want to… Go to
Write .ks scripts Scripting Guide
Extend the engine or write a plugin Contributing Guide

Download KonsolScript: Automate and Orchestrate

The AI never touched the game binary

A designer types: "spawn an ice storm with golems"

An AI generates KonsolScript. The script is sent over the network. The running game reacts - live.

DemoGame:SetWeather("blizzard");
DemoGame:SpawnWave("ice_golem", 4);
DemoGame:PlaySound("thunder_rumble");

No rebuild. No redeploy. The binary never changed.

AI Event Bridge demo


Why KonsolScript?


See it in action

#include "kse_curl"

Var:String apiKey;
OS:GetEnv("ANTHROPIC_API_KEY", apiKey);

Var:String prompt = "Explain KonsolScript in one sentence.";
Var:String body = """{"model": "claude-haiku-4-5-20251001", "max_tokens": 256,
  "messages": [{"role": "user", "content": "${prompt}"}]}""";

Curl:SetHeader("x-api-key", apiKey);

Var:String reply;
Curl:Post("https://api.anthropic.com/v1/messages", body, reply);
Konsol:Print(reply);

Full Claude chat script - with error handling, JSON parsing, and response extraction

Hello World demos - fetch + JSON, AI chat, number guessing game, AI log triage


What can you build?

Full project ideas - beginner to advanced


Batteries included

Built-in: Konsol · Math · String · File · Time · List · Map · JSON · Path · OS · Regex · Date · Hash · CSV

Plugins: HTTP · WebSockets · TCP · SQLite · MySQL · PostgreSQL · Redis · Zip · Crypto · JWT

Plugins are drop-in shared libraries loaded with #include "kse_name" - no recompile needed.

All modules · All plugins


Embed in minutes

#include "kse.hpp"

Engine engine;
engine.loadScript(source, "./scripts", "main.ks");
engine.run();

// Hot-reload changed logic without restarting:
engine.reloadFile("scripts/ai_behavior.ks");

Turn your application into a programmable platform.

Full embedding guide


Built for the AI era

AI systems need a safe surface to act on. KonsolScript provides one.

Eval guard and security


Language reference

Full syntax, types, and module reference:

  1. Var - types, variables, literals, string interpolation, structs
  2. Preprocessor - #define and #include (file and plugin)
  3. Operators - arithmetic, comparison, logical, bitwise, ternary
  4. Control flow - if/else, while, for, foreach, break, continue, switch/case
  5. Functions - define, return, recursion, typed params, entry point
  6. Array - fixed-size typed arrays
  7. Class - OOP classes with fields and methods
  8. Object - root class for all user-defined classes
  9. Exception - built-in error carrier for try / catch
  10. Error handling - try/catch/finally, throw
  11. Modules - Konsol, Math, String, File, Time, List, Map, Json, Path, OS, Regex, Date, Hash, CSV
  12. Plugin system
  13. Plugins - curl, ws, net, sqlite, mysql, pg, redis, zip, crypto, jwt

Notes