TL;DR
Jac is a new "agent-native" programming language that unifies Large Language Model (LLM) calls, workflow logic, and application state into a single, cohesive syntax. By making the connection between model decisions and program execution explicit, Jac slashes boilerplate code by up to 8.7x and enables the compiler to automatically perform advanced optimizations like speculative execution.
What Problem Does This Paper Address?
Building "agentic" applications—where an LLM acts as a central brain making decisions and using tools—is currently a fragmented process. Developers typically use a mix of general-purpose code (like Python) and specialized SDKs or frameworks (like LangGraph or DSPy).
This creates three major headaches:
- Boilerplate Overload: Developers spend massive effort writing "glue code" to format prompts, parse JSON responses, and manually synchronize application state with framework internals.
- Maintenance Fragility: A simple change to a workflow step often requires coordinated updates across multiple, disconnected parts of the codebase.
- Optimization Blindness: Because the execution logic is split between the user's code and a framework's "black box," compilers cannot "see" the full workflow. This prevents automatic optimizations, leading to high latency as the system waits for sequential LLM calls.
Methods
The authors introduce Agent-Native Programming, realized in a new language called Jac (a superset of Python). Jac treats agentic abstractions as first-class citizens:
- Meaning-Typed Model Operations (
by llm()): Instead of manual prompting, you define a typed function and delegate its implementation to an LLM. The runtime automatically handles prompt construction, tool-calling loops, and output type conversion. - Object-Spatial Programming (OSP): Workflows are defined as graphs where
nodesrepresent steps/data andedgesrepresent possible transitions. An active agent is represented as awalkerthat carries state as it moves through the graph. - Model-Guided Routing (
visit ... by llm()): This construct allows the LLM to choose the next node in the graph based on the current state and available paths.
Because these elements are unified, the Jac compiler can perform Dependency and Effect Analysis. It understands which data an LLM call needs and what state it might change. This enables Speculative Execution: the runtime can predict the next likely step and start its LLM request early, overlapping it with the current routing decision to save time.
Datasets
The researchers evaluated Jac against five diverse benchmarks, comparing it to five baselines (OpenAI SDK, LangGraph, CrewAI, DSPy, and NOOA):
- Meeting: Extracting and filing tasks from meeting transcripts.
- Email: Drafting replies based on thread context.
- RagGPT: A multi-specialist documentation assistant.
- YTNavigator: A Q&A agent for YouTube content.
- CodeAgent: An autonomous software repair agent evaluated on the SWE-bench dataset (360 pinned repository issues).
Key Insights and Ideas
- Explicit Connections Enable Optimization: By baking the workflow graph directly into the language, the compiler gains "holistic visibility." It no longer sees an LLM call as an opaque side effect but as a predictable part of a data-flow graph.
- The "Agent-for-Agent" Advantage: As we move toward AI agents writing code for other agents, language simplicity matters. The study found that AI coding assistants (like Claude Code) were significantly more efficient at writing Jac code than traditional SDK code.
- Unified Semantics Reduce Errors: In traditional frameworks, you often have to declare possible next steps in three different places (the graph, the prompt, and the output schema). In Jac, one declaration handles all three, eliminating a major source of synchronization bugs.
Key Results
- Code Reduction: Jac achieved a 1.8–8.7× reduction in AI-integration code compared to the OpenAI SDK.
- Development Effort: When using AI coding agents to build applications, Jac builds consumed 48-51% fewer tokens than SDK builds.
- Latency Savings: Compiler-driven speculative execution yielded median routing-decision latency savings of 29%–39% across three benchmarks.
- Quality & Correctness: Jac maintained competitive task quality compared to expert-written baselines across multiple LLM families (GLM-5.3, Claude Sonnet 5, and Gemma 4 31B).
Limitations and Future Work
- Side-Effect Assumptions: The current speculative execution model assumes that LLM requests don't have external side effects that are impossible to "undo" if a prediction is wrong.
- Dependency on Metadata: The compiler's effectiveness relies on accurate "trusted declarations" of function effects. If these are missing or incorrect, optimizations might be skipped or become unsafe.
- Future Directions: The authors suggest extending this model to more complex multi-agent systems and exploring further compiler-driven optimizations for distributed agentic services.
Summary updated