Skip to content

Semantic Prompt Language (SPL)

An agent-first, strongly-typed functional language with row polymorphism, first-class prompts, compile-time JSON Schemas, and colorless async — compiled cleanly to ES Module JavaScript.

Click through live examples — structured LLM extraction, streaming tool agents, row polymorphism, ADTs, sandboxed codegen, and reified generics:

First-Class Prompts & Schemas

Write auto-dedented, brace-balanced @{ … } prompts with ${expr} interpolation, attach ‘’ LLM hints directly to fields, and generate JSON Schemas + decoders at compile time via type_schema<T>() and decode<T>().

Hindley-Milner, Rows & Nominal Newtypes

Zero null or undefined. Structural records, open records (..r), hybrid dynamic records (..extra: Dict<Str, Json>), zero-overhead nominal newtypes, type-level & runtime typeof, and exhaustive match.

Colorless Async & Agents

No async/await clutter. The compiler infers suspension automatically, runs map sequentially to prevent runaway fan-out, and offers opt-in par_map, multi-provider std/llm, and deterministic agent_replay<T>.

Clean ESM & Built-In CLI Tooling

Targets Browser and Node 22+ / Bun / Deno with zero runtime dependencies, self-tail-call optimization, universal reified generics, interactive spl debug & spl trace TUIs, and a built-in LSP server for VS Code.