Agent-Native Programming Language Jac: Designed for Intelligent Agent Applications

Jac unifies LLM operations, state, and routing via a Python superset, greatly reducing agent integration code.
The article introduces Agent-Native Programming through Jac, a Python superset that unifies three elements of agent applications: LLM operations, workflow structure/state, and model-guided routing. Jac offers three core constructs: `by llm()` for typed model and tool calls, Object-Spatial Programming for workflow structure and state, and `visit ... by llm()` for model-guided dispatch. The key design maps model routing choices directly to executable workflow steps, creating an explicit link between model decisions and program execution so the compiler and runtime share dependency analysis. Across five benchmarks and five baselines, Jac achieves 1.8–8.7× less AI integration code than the OpenAI SDK with competitive task quality. Case studies show speculative execution and service partitioning achievable via configuration alone. The authors see value in the direction, though ecosystem compatibility, optimization generality, and effectiveness gains remain to be verified.
Building agentic applications often requires stitching together three things: large language model (LLM) operations, workflow structure and state, and model-guided routing. Developers use SDKs and frameworks, stringing together model input preparation, state passing, and dispatch logic with a large amount of supporting code. The cost of this approach: whenever the workflow changes, the supporting code must change along with it, sharply increasing development and testing burden; execution logic is scattered across application code and framework internals, making it hard for compilers to see control flow and state dependencies, leaving no room for automatic optimization.
Unified Execution Semantics: The Starting Point of Agent-Native Programming
This work proposes an approach called "Agent-Native Programming," which uses shared execution semantics to unify the three components above. The implementation vehicle is Jac—a Python superset language. It achieves integration through three core constructs: by llm() handles typed model operations and tool calls; Object-Spatial Programming handles workflow structure and state; and visit ... by llm() handles model-guided routing.

The key insight lies in the design of the routing construct: the model's choices are derived directly from executable workflow steps, and once selected, they are dispatched for execution by the language. This creates an explicit connection between model decisions and program execution, allowing the compiler and runtime to share the same foundation for dependency analysis, making automatic optimization possible.
This "language-native" design stands in sharp contrast to framework-level approaches. In the traditional SDK model, which option the model chose and which step it was dispatched to are partly hidden inside the framework and partly expressed implicitly by glue code, leaving compilers almost unable to reason about them. Jac instead "reifies" routing decisions as executable steps, effectively semi-structuring dynamic model behavior and giving static analysis something to grasp.
Object-Spatial Programming (OSP) is a programming paradigm that models program state as a graph structure: objects serve as nodes, and the reference relationships between objects form a "space," with computation advancing through movement and traversal within that space. In agent scenarios, each step of a workflow can be represented as an object or a method on an object, while the ordering and dependencies between steps are expressed as edges in the space. This modeling makes state propagation no longer a matter of variable assignments scattered through the code, but explicit graph traversal, so the compiler can analyze data flow and control flow along edges and identify which steps have real dependencies. Jac uses OSP to unify workflow structure and state at the language level, giving subsequent dependency analysis and automatic optimization a stable graph model as their foundation.
by llm() is the core construct in Jac for triggering large language model calls, and its distinguishing feature is that it declares calls as "typed": developers declare input types and expected output types (for example, returning an enum or a structured object), and the language runtime handles constructing prompts, parsing model output, and validating types. When the output type is a set of executable workflow steps, visit ... by llm() requires the model to choose from among these candidates rather than freely generating arbitrary text. The selection result is tagged with a type label and handed directly to the language dispatcher for execution, so a "model decision" is semantically equivalent to a type-constrained dispatch. This type-constrained design both reduces the fragility of output parsing and enables the compiler to treat model calls as nodes with definite signatures and possible branches, thereby incorporating them into dependency analysis.
Quantitative Validation: Five Benchmarks and Five Baselines
The authors compared against five baselines on five benchmarks. Relative to the OpenAI SDK, Jac achieves a 1.8–8.7× reduction in AI integration code volume while maintaining competitive task quality, and the development effort for coding agents decreases.
The magnitude of code reduction varies by scenario, but the direction is consistent: state propagation and step dispatch logic that was originally scattered everywhere is absorbed by language constructs, letting developers focus more on the workflow itself. The drop in development effort is also noteworthy—it means that when modifying a workflow, the amount of supporting code that must be changed in sync is greatly reduced.
The phrasing "maintains competitive task quality" is cautious and does not claim to surpass the baselines, indicating that task completion quality in the evaluation is roughly on par, and the gains come mainly from engineering efficiency rather than improved model performance.
Two Case Studies: Speculative Execution and Service Partitioning
The paper also presents two case studies: speculative execution and service partitioning, both achievable through configuration alone, relying on program analysis and runtime checks to preserve workflow behavior under given conditions.
Speculative execution means executing potentially selected steps ahead of time to reduce latency; service partitioning means distributing different steps of a workflow across different services. Traditionally, such optimizations require changes to business code or framework internals, but Jac turns them into configuration-level operations through the compiler's dependency analysis and runtime guards. This is the direct dividend of "compiler visibility."
Speculative execution is originally a classic technique in CPU pipelines: when a branch outcome is not yet determined, execute the most likely path ahead of time; if the prediction is correct, waiting time is saved, and if wrong, the results are discarded. In agent workflows, model routing likewise involves uncertainty; Jac uses the compiler's dependency analysis to identify which subsequent steps might be selected, and at runtime uses guards to record side effects, thereby pre-executing before the model returns and then validating and committing or rolling back after it returns. Service partitioning refers to splitting a workflow across different processes or services for deployment based on data dependencies and call frequencies between steps, in order to reduce cross-service communication. Both require the program's control flow and state dependencies to be transparent to the compiler—exactly the structural advantage of language-native design over framework-level approaches.
Professional Observation
The value of this work lies in elevating the "glue layer" problem in agent application development to the level of language design. Current mainstream agent frameworks—whether Python-based orchestration libraries or various SDKs—essentially layer runtime conventions on top of general-purpose languages, and developers still need to hand-write a large amount of connective code. Jac's approach is to make the language itself understand "model calls" and "model routing" as two first-class citizens, thereby returning the space for optimization to the compiler and runtime.
Potential limitations should also be noted: as a Python superset, Jac's adoption curve depends on compatibility with the existing Python ecosystem and migration costs; the optimization cases reported in the paper depend on specific conditions, and generality remains to be further verified; "maintains competitive task quality" means that in the short term the main selling point is still development efficiency rather than a breakthrough in effectiveness. For teams building complex multi-step agent workflows, this design direction is worth tracking, but adoption decisions still need to be evaluated against one's own technology stack.
One-line Summary
Jac uses a Python superset to unify LLM operations, state, and routing, greatly reducing agent integration code.
Paragraph Summary
The article introduces an approach called Agent-Native Programming, which through the Python superset language Jac unifies the three elements of agent applications: LLM operations, workflow structure and state, and model-guided routing. Jac provides three core constructs: by llm() handles typed model calls and tool calls, Object-Spatial Programming handles workflow structure and state, and visit ... by llm() handles model-guided dispatch. The key design is to map the model's routing choices directly to executable workflow steps, creating an explicit connection between model decisions and program execution and allowing the compiler and runtime to share a foundation for dependency analysis. In comparisons across five benchmarks and five baselines, Jac achieves a 1.8–8.7× reduction in AI integration code relative to the OpenAI SDK while maintaining competitive task quality. Case studies show that speculative execution and service partitioning can be achieved through configuration alone. The authors consider the direction valuable, but ecosystem compatibility, generality of the optimizations, and improvements in effectiveness still need verification.
Related articles

Google Stitch Skills: Connecting Coding Agents to the Design Workflow
Google Stitch Skills is an Agent Skills library following the open standard, adding a design-to-code workflow to the Stitch MCP Server. This article breaks down its three skill groups, SKILL.md directory structure, installation paths, and dependency pitfalls.

40.5-Inch Color E-Paper Art Frame: An Art Display You Charge Once a Year
The Ink Poster Tella 40.5-inch color e-paper art frame uses the E Ink Spectra 6 full-color solution: A1 format, no backlight, no noise, about one charge a year, 2,000+ licensed artworks built in, and automatic adaptation of phone photos.

Jingle Jam Memories: RT's Awkward First Encounter with Lewis
RT shares his awkward first Jingle Jam experience: unexpectedly pushed into the studio, meeting Lewis and Yogg's cast, and Toddy appearing in armor.