cs.PLMar 7, 2026

Turn: A Language for Agentic Computation

Authors: Muyukani Kizito

Organizations: Turn Lang · Prescott Data

Abstract

We present Turn, a compiled, actor-based programming language -- statically typed for schema inference, dynamically typed at the value level -- for agentic software: programs that reason and act autonomously by delegating inference to large language models (LLMs). Existing approaches augment general-purpose languages with frameworks, encoding critical invariants (bounded context, typed inference output, credential isolation, durable state) as application-level conventions rather than language guarantees. Turn introduces five language-level constructs that address this gap. Cognitive Type Safety makes LLM inference a typed primitive: the compiler generates a JSON Schema from a struct definition and the VM validates model output before binding. The confidence operator enables deterministic control flow gated on model certainty. Turn's actor-based process model, derived from Erlang, gives each agent an isolated context window, persistent memory, and mailbox. A capability-based identity system returns opaque, unforgeable handles from the VM host, ensuring raw credentials never enter agent memory. Finally, compile-time schema absorption (use schema::<protocol>) synthesizes typed API bindings from external specifications at compile time; the openapi adapter is shipped with graphql, fhir, and mcp in active development. We describe the language design, type rules, schema semantics, and a Rust-based bytecode VM, and evaluate Turn against representative agentic workloads. Turn is open source at https://github.com/ekizito96/Turn.

Figures & tables

Explore similar work

CardsList
  1. λAλ_A: A Typed Lambda Calculus for LLM Agent Composition

    Apr 13, 2026Qin LiuLLM AgentsLLM Agent Orchestration

  2. LLM-as-Code: Agentic Programming for Agent Harness

    Jun 14, 2026Junjia Qi, Zichuan Fu, Jingtong Gao +4AI Agent ReliabilityLLM Agent Orchestration

  3. LACUNA: Safe Agents as Recursive Program Holes

    May 27, 2026Yaoyu Zhao, Yichen Xu, Oliver Bračevac +3AI Agent ReliabilityLLM Agents