Edict
A programming language designed for AI agents. No parser. No syntax. Agents produce AST directly as JSON.
Edict is a statically-typed, effect-tracked programming language where the canonical program format is a JSON AST. It's purpose-built so AI agents can write, verify, and execute programs through a structured pipeline — no text parsing, no human-readable syntax, no ambiguity.
Agent (LLM)
│ produces JSON AST via MCP tool call
↓
Schema Validator ─── invalid? → StructuredError → Agent retries
↓
Name Resolver ────── undefined? → StructuredError + candidates → Agent retries
↓
Type Checker ─────── mismatch? → StructuredError + expected type → Agent retries
↓
Effect Checker ───── violation? → StructuredError + propagation chain → Agent retries
↓
Contract Verifier ── unproven? → StructuredError + counterexample → Agent retries
(Z3/SMT) ↓
Code Generator (pure-JS WASM encoder) → WASM → ExecuteFeatures
- JSON AST — Programs are JSON objects, not text files. No lexer, no parser.
- Structured errors — Every error is a typed JSON object with enough context for an agent to self-repair.
- Type system —
Int,Float,String,Bool,Array<T>,Option<T>,Result<T,E>, records, enums, refinement types. - Effect tracking — Functions declare
pure,reads,writes,io,fails. The compiler verifies consistency. - Contract verification — Pre/post conditions verified at compile time by Z3 (via SMT). Failing contracts return concrete counterexamples.
- WASM compilation — Verified programs compile to WebAssembly via a pure-JS encoder and run in Node.js.
- MCP interface — All tools exposed via Model Context Protocol for direct agent integration.
- Schema migration — ASTs from older schema versions are auto-migrated. No breakage when the language evolves.






