Skip to main content

Run Agents

Execute agents with JIT (Just-in-Time):
JIT generates code optimized for each input, then executes it.

Compile Agents into Tools

AOT (Ahead-of-Time) compilation turns agents into reusable tools:
Caching: Compiled agents are cached in .a1/ directory by default.
Agents as tools: Compiled agents are tools that can be used in other agents.

How It Works

Both AOT and JIT follow this pipeline:

Configuration

Control code generation with Strategy:
See Strategies for detailed configuration.

Agentic While Loop

Use IsLoop verifier to compile agents into standard agentic while loops (like LangGraph, AutoGen):
This creates an ahead-of-time compiled Python function with a while loop, instead of interpreted runtime execution.

Performance Tuning

Parallel candidates: Generate multiple code candidates in parallel and select the best.
Candidate generation happens in parallel:
For more advanced configuration (custom verify, cost, generate), see Strategies.