Turnturnv2.0.0
v2.0.0 preview

The programming language where agents are the execution model.

LLMs generate. Decision models judge. Turn coordinates both through typed effects, isolated actors, managed context, and durable execution.

the idea

Every general-purpose language lets you build agents. Frameworks give you tools, helpers, and patterns. The runtime still knows nothing about agents. When the system gets complex — multi-agent pipelines, failure recovery, probabilistic decisions — you end up building infrastructure to compensate for a runtime that was never designed for this work.

Turn is a programming language where agents are the execution model. Actors, typed LLM inference, probabilistic control flow, and durable state are not libraries you import. They are how the VM works.

Spawn an actor and the runtime isolates its stack and context window. Call infer and the VM passes your schema to a provider, then normalises the structured response before your code touches it. Gate on confidence and the language itself is uncertain-aware. Checkpoint with suspend and the VM writes its full state to disk — not as application code, but as a VM instruction.

what it looks like

analyst.tn
struct Analysis  { verdict: Str, risk_score: Num };
struct NextAction { type: Str, reason: Str };

// each actor has isolated frames, state, mailbox, and managed context
let analyst = spawn_link turn(input: Str) {
    context.system("You are a rigorous analyst. Be concise.");
    return infer Analysis { "Evaluate risk: " + input; };
};

let signal = receive;
let report  = signal["result"];

// confidence is a first-class value — not a parsing concern
if confidence report < 0.82 {
    send supervisor_pid, { "type": "escalate", "payload": report };
    return null;
};

// durable state — persists across VM restarts and suspensions
remember("last_verdict", report.verdict);

let next = infer NextAction {
    "Verdict: " + report.verdict + " — what is the next step?";
};
call("echo", next.type);

A supervisor spawns a child analyst actor. The child infers against a typed schema. The result is confidence-gated before it continues. Pending effects survive restarts with at-least-once replay. No framework. No library. VM instructions.

01 / install

Get Turn.

One CLI with official provider drivers bundled.

shell
cargo install --git https://github.com/ekizito96/Turn --rev 4934d479e4b96cde7fa531c54a4ec64400c1fe27 turn

Installs the reviewed Turn 2 preview commit with bundled providers. Requires Rust.

Verify:

turn --version
turn doctor

02 / playground

Try it.

Each run gets isolated files, state, and environment. The decision example uses Turn's deterministic mock by default; switch to Jev for a live decision.

● requires provider
decision provider

No API key required.

Submitted credentials are held only for this request and are not persisted by the playground.

jev_triage.tn