Skip to main content
QUICK REVIEW

[論文レビュー] Turn: A Language for Agentic Computation

Muyukani Kizito|arXiv (Cornell University)|Mar 7, 2026
Multi-Agent Systems and Negotiation被引用数 0
ひとこと要約

Turn is a compiled, actor-based language that makes LLM-driven inference a typed primitive, provides probabilistic control, and enforces strong safety and persistence guarantees for agentic software.

ABSTRACT

We present \textbf{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. \emph{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 \emph{confidence operator} enables deterministic control flow gated on model certainty. Turn's \emph{actor-based process model}, derived from Erlang, gives each agent an isolated context window, persistent memory, and mailbox. A \emph{capability-based identity system} returns opaque, unforgeable handles from the VM host, ensuring raw credentials never enter agent memory. Finally, \emph{compile-time schema absorption} (\texttt{use schema::}) synthesizes typed API bindings from external specifications at compile time; the \texttt{openapi} adapter is shipped with \texttt{graphql}, \texttt{fhir}, and \texttt{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.

研究の動機と目的

  • エージェント的ソフトウェアにおける言語レベルの不変条件の必要性を動機づけ、無限のコンテキスト、型なし推論、断片化された状態、永続的実行なし、資格情報の漏洩といった一般的な故障モードを防ぐ。
  • Turnの言語レベルでこの不変条件を強制する五つのコア言語プリミティブを導入する。
  • 認知的型安全性、確率的制御フロー、エージェントプロセス、能力ベースのアイデンティティ、コンパイル時のスキーマ吸収を提示する。
  • Turnの設計、意味論、実装を説明し、Rust VMとLLM推論を含むエンドツーエンドのワークフローを示す。

提案手法

  • 型付き推論プリミティブinfer T { … }を定義する。Turn構造体からコンパイル時にJSONスキーマが生成され、VMが結合前にLLM出力を検証する。
  • 信頼度演算子を導入し、モデルの確実性を抽出して確率的出力を決定論的制御フローに組み込む。
  • Erlangに似たアクタモデルを採用し、プロセスごとにコンテキストウィンドウ、永続メモリ、サスペンド/リジュームのチェックポイントを介した耐久実行を提供する。
  • 資格情報の漏洩を防ぐために、不正改変不能なIdentity能力としてグラントアイデンティティを実装する。
  • use schema::<protocol>("url")マクロを提供して、コンパイル時にAPI仕様を取得し、APIバインディングのネイティブな構造体とクロージャを合成する。

実験結果

リサーチクエスチョン

  • RQ1LLM推論を言語レベルで型安全にし、応答の構造的一致性を保証できるか。
  • RQ2確率モデルの確実性を決定論的な制御フローに統合できるか。
  • RQ3アクターベースの、プロセスごとのコンテキストアーキテクチャはエージェント計算の recalling と分離性を改善するか。
  • RQ4資格情報を漏洩させずに安全に管理できるか、ツールアクセスを犠牲にせずに。
  • RQ5コンパイル時のスキーマ吸収は外部API仕様から安全なネイティブバインディングを合成できるか。

主な発見

KWriteReadB/entryNote
1 K51957476.8baseline
10 K1021867$10\times$
100 K594430$100\times$
  • 推論式infer T { … }は成功時にTに構造的に適合する値を生成し、コンパイル時スキーマ生成と実行時検証を伴う。
  • 信頼度演算子はモデル確信性に基づく決定論的分岐を可能にし、確信の伝播の代数を定義する。
  • Turnのエージェントプロセスは孤立したコンテキストと永続メモリを持ち、リンクされたプロセスによる障害耐性の監視を行う。
  • Identity能力は生の資格情報がエージェントメモリへ入るのを防ぎ、資格情報の不透明性を保証する。
  • コンパイル時スキーマ吸収は外部仕様から型付きAPIバインディングを合成し、LLM駆動エージェントによる安全なAPI利用を実現する。
  • 実験では5つのスイートを通じて105/105のテストがすべて合格し、各ケースで資格情報の不透明性、確信意味論、コンテキストの優先/新しさ、メモリ分離、正確な耐久実行を評価した。

より良い研究を、今すぐ始めましょう

論文設計から論文執筆まで、研究時間を劇的に削減しましょう。

クレジットカード登録不要

このレビューはAIが作成し、人間の編集者が確認しました。