Design-time governance for AI agents.
This project demonstrates a compile-only system for AI agents: Intent → Plan → Diff → Publish
It does NOT execute agents. It generates reviewable artifacts that can later be consumed by runtimes like LangGraph.
A design-time system for compiling human intent into executable agent topologies
Agent Compiler is not a runtime.
It does not execute tools.
It does not orchestrate workflows.
Agent Compiler is a design-time compiler that converts plain-English intent into a structured agent topology that downstream runtimes (LangGraph, LangChain, n8n, Temporal, etc.) can execute later.
Think of it as the layer that turns “what should we do?” into a reviewable, versioned plan before anything runs.
In most organizations:
- Signals live in Datadog, LaunchDarkly, dashboards, logs, and tickets
- Decisions live in Slack threads and meetings
- Execution logic lives in engineers’ heads
This creates friction, delays, and inconsistency.
Agent Compiler makes decision logic explicit.
Instead of relying on ad-hoc reasoning, teams express intent, and the system compiles it into a standardized, explainable agent plan.
Agent Compiler outputs artifacts, not actions.
A structured, machine-readable plan describing:
- ordered steps
- dependencies
- decision points
- approval gates
- failure paths
- success criteria
This topology is runtime-agnostic.
Each referenced tool is expressed as a contract, including:
- input and output schema
- authentication requirements
- permission boundaries
- rate limits
- redaction rules
- retry and fallback behavior
No tools are executed by the compiler.
- allowed vs disallowed actions
- steps requiring human approval
- risk classification
- data access constraints
- safety boundaries
- Baseline plan for first-time intents
- Diff plan for repeated intents, showing what changed and why
This creates a decision ledger instead of one-off reasoning.
Agent Compiler is not:
- a runtime
- a scheduler
- a workflow engine
- a LangGraph replacement
- an n8n replacement
Agent Compiler thinks and plans.
Runtimes execute.
A natural-language goal, for example:
- Investigate checkout latency regression after release 2.3
- Evaluate feature flag impact and recommend next steps
- Draft a stakeholder update with risks and mitigation
A structured representation of how an intent should be executed, including:
- investigation flow
- decision logic
- approval checkpoints
- communication steps
Topology is not code.
It is operational structure.
- Baseline: first time an intent appears
- Diff: subsequent compilations compared against prior plans and outcomes
Simulation does not mean training on internal data.
It means:
- validating logical completeness
- checking tool availability and permissions
- testing failure paths with synthetic placeholders
- estimating complexity, time, and risk
- identifying missing inputs and access gaps
The topology is not hallucinated by an LLM.
It comes from three explicit sources, combined at compile time.
Agent Compiler maintains a curated library of topology patterns.
These are pre-designed execution shapes, such as:
- Incident Investigation
- Experiment Analysis
- Release Validation
- Root Cause Analysis
- Rollback Decision
- Stakeholder Communication
- Risk Assessment
Each topology is a template, not a finished plan.
Example skeleton:
Observe → Correlate → Validate → Decide → Communicate
This library is:
- hand-authored
- opinionated
- reusable
- versioned over time
This is product and platform knowledge, not model output.
When an intent is submitted, the compiler classifies it by:
- problem type (incident, experiment, decision, communication)
- domain (observability, performance, product, operations)
- urgency and risk level
Example:Checkout latency spiked after release 2.3
Classified as:
- domain: performance and observability
- urgency: high
- risk: medium-high
- topology family: Incident Investigation
This step selects a base topology from the library.
At this stage:
- no tools are attached
- no steps are specialized
- this is only the structural skeleton
A deep agent is used internally to specialize the selected topology.
This is a multi-step planning agent, not a runtime workflow.
The deep agent iteratively:
- interprets intent nuances
- detects ambiguity
- specializes steps
- selects relevant tool contracts
- inserts approval gates
- applies policies and constraints
- validates completeness
- generates rationale
- prepares baseline or diff plans
Example transformation:
Base topology:Observe → Correlate → Validate → Decide → Communicate
Specialized topology:Retrieve checkout latency metrics → Correlate with deployments and feature flags → Isolate payment vs checkout services → Validate external dependency bottleneck → Decide rollback vs mitigation → Require human approval for rollback
This happens entirely at design time.
- not auto-generated workflows
- not execution traces
- not tool-driven reasoning
- not hallucinated plans
Topology is structured operational knowledge, reused and refined over time.
Deep agents are used inside the compiler, not in execution.
They are responsible for:
- intent interpretation
- topology specialization
- policy application
- plan validation
- diff generation
- simulation reasoning
- explanation and summaries
They do not:
- call Datadog or LaunchDarkly
- run workflows
- make production changes
Execution always belongs to the runtime.
- Intent ingestion
- Classification and routing
- Topology selection from library
- Deep agent specialization
- Policy and guardrail application
- Validation and simulation
- Baseline or diff plan output
Intent:Checkout latency spiked today. Identify cause and propose mitigation.
Compiled topology includes:
- metric retrieval
- correlation with releases and flags
- dependency isolation
- rollback vs mitigation decision
- approval gate
- stakeholder communication
Intent:
Feature flag improved conversion but increased support tickets.
Compiled topology includes:
- uplift analysis
- cost and risk trade-off
- mitigation options
- rollout recommendation
- executive summary
- intent text
- optional metadata (risk, environment)
- prior plans for diffing
- intent parser
- topology library
- deep agent planner
- tool registry
- policy engine
- validator
- diff engine
- topology artifact (JSON or YAML)
- tool contracts
- validation report
- baseline or diff plan
- human-readable summary
- LangGraph
- LangChain
- n8n
- Temporal
- custom orchestrators
- Datadog
- LaunchDarkly
- Splunk
- Grafana
- Cloudflare logs
- ticketing systems
This project focuses on design-time decisions, not runtime autonomy.
Agents should not decide:
- what they are allowed to do
- which tools they can access
- when humans must approve actions
Those decisions belong in a compile-time layer.
This repository explores what that layer could look like.
cd backend
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
uvicorn app.main:app --reloadOpen: http://localhost:8000/health
- Rich intent schema (capabilities, constraints, risk tiers)
- Deterministic topology selection rules
- Capability diffing across versions
- Export adapters for agent runtimes (e.g. LangGraph)
- Design-time approval workflows