Minimal Core
The smallest set of primitives Turn must implement to support durable, long-running agentic computation.
Core Primitives
First-class unit of behavior. turn { ... } defines a control cycle — one step of agent execution. Closures are turn(args) -> Type { ... }.
Bounded working context managed by the runtime. The language enforces |context| ≤ N — no unbounded lists.
Persistent process memory as a primitive store. remember(key, value) writes; recall(key) reads. Returns null when key is missing.
External effects suspend execution and resume with a value. call(tool_name, arg) is the single suspension boundary — enables deterministic replay.
Probabilistic effect returning a typed value. infer Type { prompt } invokes an LLM with cognitive type safety — the runtime validates the schema.
Explicit durable checkpoint. suspend; writes the entire VM state to disk for orthogonal persistence.
Actor-style concurrency. spawn turn() { ... } creates an isolated process with its own state and mailbox.
Expressions & Statements
- Literals:
42,"hello",true,false,null,[1, 2, 3],{ key: val } - Variables:
let id = expr; - Operators:
+,==,!=,<,>,<=,>=,and,or,! - Indexing:
expr[index]— lists and maps - Member access:
expr.field— structs and maps - Control flow:
if expr { ... } else { ... },while expr { ... } - Structs:
struct Name { field: Type, ... };
Built-in Tools (Alpha)
| Tool | Purpose |
|---|---|
echo(val) | Returns the value (prints to stdout) |
sleep(seconds) | Pauses execution |
http_get(url) | GET request |
http_post({url, body}) | POST with JSON body |
json_parse(str) | Parse JSON string to Value |
json_stringify(val) | Value to JSON string |
What's Deferred
| Concept | Status |
|---|---|
Supervisor trees (link/monitor) | ✅ Implemented in v0.5.0-alpha |
| Networking / remote PIDs | ✅ Implemented in v0.5.0-alpha |
| Object-Capability security | ✅ Implemented in v0.5.0-alpha |
TIP
Many features marked "deferred" in the original v0.4 spec have since been implemented in v0.5.0-alpha. The spec documents are the original design — the runtime has evolved ahead.