Agent workflow
Agents, regions, blocks, topology, tools, state, memory, model calls, and protocol edges.
Agent Intermediate Representation
A formal IR for agent code, prompts, tools, and protocols.
AIR models LLM-based agent systems before deployment. It lowers framework code and natural-language instructions into one conservative representation so static passes can check dataflow, authority, topology, and policy intent.
What AIR Represents
AIR is not an agent runtime. It is a compiler target for analysis: frontends recover the real agent workflow, collect the full prompt assembly, run shared prompt autoformalization, and merge everything into the same checkable module.
Agents, regions, blocks, topology, tools, state, memory, model calls, and protocol edges.
Prompt sources, templates, sections, slots, semantic roles, comments, docstrings, and manifests.
Autoformalized persona, obligations, prohibitions, capabilities, and grounded prompt evidence.
Pipeline
Known frameworks use direct parsers. Unknown systems use generic discovery.
Frontends gather natural-language prompt, skill, tool, and manifest evidence.
The shared layer turns prompt evidence into formalized prompt AIR.
Workflow AIR, prompt assembly AIR, and formalized prompt AIR become one module.
Use AIR
Start with the frontend that matches your source. The generated `.air` file is meant to be read, formatted, diffed, and checked in CI.
cargo check --workspace
cargo run -q -p air-driver --bin airc -- agent --framework langgraph ./app > app.air
cargo run -q -p air-driver --bin air-fmt -- --write app.air
cargo run -q -p air-driver --bin air-check -- app.air
Documentation
The manual lives in `docs/air/*.md`, is generated into `/api/docs/*.json`, and is displayed by the docs page. Internal design notes stay out of the public docs API.