Declarative, framework-agnostic AI agent orchestration via YAML.
Define your agent graph in a YAML file. Generate production-ready code for LangGraph, CrewAI, or plain Python — no boilerplate.
abp init my-agent
abp generate my-agent.yml --target langgraphBuilding multi-agent systems with LangGraph, CrewAI, or AutoGen means writing a lot of framework-specific boilerplate. Changing frameworks means rewriting everything. agent-blueprint separates the what (your agent logic) from the how (the framework).
| Without abp | With abp |
|---|---|
| Write LangGraph state classes, node functions, graph builders | Write a 30-line YAML file |
| Rewrite everything when switching frameworks | Change --target flag |
| No standard schema — every project looks different | Consistent, validated blueprint format |
Requirements: Python 3.11+
pip install agent-blueprintOr with pipx (recommended for CLI tools — keeps abp isolated):
pipx install agent-blueprintOr install from source:
git clone https://github.com/ahmetatar/agent-blueprint
cd agent-blueprint
pip install -e ".[dev]"After installation, the abp CLI is available:
abp --helpabp init my-agent
# or for a multi-agent setup:
abp init my-agent --template multi-agentThis creates my-agent.yml:
blueprint:
name: "my-agent"
version: "1.0"
description: "A simple single-agent blueprint"
settings:
default_model: "gpt-4o"
default_temperature: 0.7
state:
fields:
messages:
type: "list[message]"
reducer: append
agents:
assistant:
model: "${settings.default_model}"
system_prompt: |
You are a helpful assistant.
graph:
entry_point: assistant
nodes:
assistant:
agent: assistant
description: "Main assistant node"
edges:
- from: assistant
to: END
memory:
backend: in_memoryabp validate my-agent.yml╭──────────────────────── Valid — my-agent.yml ────────────────────────╮
│ Blueprint my-agent │
│ Version 1.0 │
│ Agents 1 │
│ Tools 0 │
│ Nodes 1 │
│ Entry point assistant │
╰───────────────────────────────────────────────────────────────────────╯
abp inspect my-agent.ymlOutputs a Mermaid diagram you can paste directly into any Mermaid renderer.
abp generate my-agent.yml --target langgraph╭────────────── Generated — my-agent (langgraph) ──────────────╮
│ my-agent-langgraph/__init__.py │
│ my-agent-langgraph/state.py │
│ my-agent-langgraph/tools.py │
│ my-agent-langgraph/nodes.py │
│ my-agent-langgraph/graph.py │
│ my-agent-langgraph/main.py │
│ my-agent-langgraph/requirements.txt │
│ my-agent-langgraph/.env.example │
╰───────────────────────────────────────────────────────────────╯
cd my-agent-langgraph
pip install -r requirements.txt
cp .env.example .env # add your OPENAI_API_KEY
python main.py "Hello, how are you?"A blueprint YAML has these top-level sections:
| Section | Required | Description |
|---|---|---|
blueprint |
Yes | Name, version, description |
settings |
No | Default model, temperature, retries |
state |
No | Shared state fields flowing through the graph |
model_providers |
No | Model provider connections (details) |
mcp_servers |
No | MCP server connections (details) |
agents |
Yes | Agent definitions (model, prompt, tools) |
tools |
No | Tool definitions (details) |
graph |
Yes | Nodes, edges, entry point |
memory |
No | Checkpointing / persistence (details) |
input |
No | Input schema for the agent |
output |
No | Output schema for the agent |
deploy |
No | Cloud deployment configuration (details) |
blueprint:
name: "my-agent" # Required. Used for naming generated files.
version: "1.0" # Optional. Default: "1.0"
description: "..." # Optional.
author: "..." # Optional.
tags: [support, nlp] # Optional.settings:
default_model: "gpt-4o" # Default model for all agents
default_model_provider: openai_gpt # Default provider (references model_providers)
default_temperature: 0.7
max_retries: 3
timeout_seconds: 300Settings values can be referenced anywhere with ${settings.field_name}.
Variable interpolation supports two namespaces:
${settings.field}— resolved from the blueprint'ssettingssection${env.VAR_NAME}— resolved from environment variables at load time; if the variable is not set, the placeholder is kept as-is
Defines the typed state object shared across all nodes:
state:
fields:
messages:
type: "list[message]" # Built-in message list type
reducer: append # How concurrent updates merge: append | replace | merge
department:
type: string
default: null
enum: [billing, technical, general]
resolved:
type: boolean
default: falseagents:
my_agent:
name: "Friendly Name" # Optional display name
model: "gpt-4o" # or ${settings.default_model}
model_provider: openai_gpt # References model_providers
system_prompt: |
You are a helpful assistant.
tools: [tool_a, tool_b] # References to tools section
temperature: 0.5
max_tokens: 2048
output_schema: # Structured output fields
department:
type: string
enum: [billing, technical]
memory:
type: conversation_buffer # conversation_buffer | summary | vector
max_tokens: 4000
human_in_the_loop:
enabled: true
trigger: before_tool_call # before_tool_call | after_tool_call | before_response | always
tools: [dangerous_tool] # Only require approval for specific tools
reasoning:
enabled: true # Enable extended thinking (Anthropic only)
budget_tokens: 8000See Model Providers for provider configuration and Reasoning Patterns for reasoning strategies.
Four tool types are supported: function, api, retrieval, and mcp.
tools:
classify_intent:
type: function
impl: "myapp.classifiers.classify_intent" # optional: wire existing code
description: "Classify customer intent"
parameters:
message:
type: string
required: true
lookup_invoice:
type: api
method: GET
url: "https://api.example.com/invoices/{invoice_id}"
auth:
type: bearer
token_env: "BILLING_API_KEY"See Tools for full documentation on all tool types including
impl,api,retrieval, andmcp.
Defines the agent workflow as a directed graph:
graph:
entry_point: router
nodes:
router:
agent: router
description: "Route requests"
handle_billing:
agent: billing_agent
escalate:
type: handoff
channel: slack
edges:
# Simple edge
- from: handle_billing
to: END
# Conditional routing
- from: router
to:
- condition: "state.department == 'billing'"
target: handle_billing
- condition: "state.department == 'technical'"
target: handle_technical
- default: ENDCondition expressions support: ==, !=, <, >, <=, >=, in, not in, and, or, not. They reference state fields: state.field_name.
memory:
backend: in_memory # in_memory | sqlite | postgres | redisSee Memory & Checkpointing for all backend options and configuration.
| Command | Description |
|---|---|
abp init <name> |
Scaffold a new blueprint (--template basic|multi-agent) |
abp validate <file> |
Validate a blueprint against the schema (--quiet for CI) |
abp generate <file> |
Generate framework code (--target langgraph|plain, --dry-run) |
abp run <file> [input] |
Generate to temp dir and run locally (single-shot or REPL) |
abp deploy <file> |
Deploy to cloud (--platform azure|aws|gcp, details) |
abp editor |
Open visual Blueprint editor in browser (--port 7842) |
abp inspect <file> |
Visualize graph as Mermaid diagram |
abp schema |
Export JSON Schema (--format json|yaml) |
abp github |
Open the GitHub repository |
# Single-shot
abp run my-agent.yml "What is the capital of France?"
# Interactive REPL (omit input)
abp run my-agent.yml
# With options
abp run my-agent.yml --thread-id session-1 --install --env .env.local| Flag | Default | Description |
|---|---|---|
--target |
langgraph |
Target framework |
--thread-id |
default |
Conversation thread ID |
--install |
false |
Run pip install -r requirements.txt before executing |
--env |
.env |
Path to a .env file to load |
Open the visual Blueprint editor in your browser — design agents and edges interactively, then export to YAML or generate code directly:
abp editor [--blueprint blueprint.yml] [--port 7842] [--no-browser]The editor provides a drag-and-drop canvas where you can add nodes, connect them, edit properties, preview YAML, and run blueprints directly.
Requires UI extras:
pip install 'agent-blueprint[ui]'The examples/ directory contains ready-to-use blueprints:
| Example | Description |
|---|---|
basic-chatbot.yml |
Single-agent chatbot — the simplest possible blueprint |
customer-support.yml |
Three-agent system: router → billing specialist / technical support |
research-team.yml |
Sequential pipeline: planner → researcher → writer |
abp generate examples/customer-support.yml --target langgraph
abp inspect examples/customer-support.ymlSee Reasoning Patterns for advanced patterns: Chain-of-Thought, ReAct, Self-Reflection, and Extended Thinking.
my-agent-langgraph/
├── __init__.py # Package init
├── state.py # AgentState TypedDict
├── tools.py # Tool functions (fill in implementations)
├── nodes.py # Node functions (one per agent node)
├── graph.py # StateGraph construction with edges and routing
├── main.py # Entrypoint: run(user_input) → str
├── requirements.txt # langgraph, langchain-openai, httpx, ...
└── .env.example # Required environment variables
The generated code is human-readable and fully editable. It's a starting point, not a black box.
Export the JSON Schema and configure the YAML extension for autocompletion and inline validation:
abp schema --output blueprint-schema.jsonAdd to .vscode/settings.json:
{
"yaml.schemas": {
"./blueprint-schema.json": "*.blueprint.yml"
}
}git clone https://github.com/ahmetatar/agent-blueprint
cd agent-blueprint
pip install -e ".[dev]"
# Run tests
python3 -m pytest tests/ -v
# Lint
ruff check src/src/agent_blueprint/
├── cli/ # Typer CLI commands (validate, generate, inspect, init, schema)
├── models/ # Pydantic v2 schema models
├── ir/ # Intermediate representation: compiler + expression parser
├── generators/ # Code generators (langgraph, plain, crewai stub)
├── deployers/ # Cloud deployers
├── templates/ # Jinja2 templates per target framework
└── utils/ # YAML loader, Mermaid visualizer
- Create
src/agent_blueprint/generators/<framework>.pyimplementingBaseGenerator - Add Jinja2 templates to
src/agent_blueprint/templates/<framework>/ - Register in
src/agent_blueprint/cli/generate.py
The AgentGraph IR in src/agent_blueprint/ir/compiler.py is the single input to all generators — you don't touch the parser or validator.
- YAML schema + Pydantic validation
- Variable interpolation (
${settings.field},${env.VAR}) - Safe condition expression parser
- LangGraph code generator
- Plain Python generator
- CLI:
validate,generate,inspect,init,schema - MCP server configuration and
mcptool type - Model provider configuration (OpenAI, Anthropic, Google, Ollama, Azure, Bedrock)
-
implfield for function tools -
abp run— generate and execute locally -
abp deploy --platform azure|aws|gcp - PyPI publish (
pip install agent-blueprint) - CrewAI generator
- AutoGen generator
- VS Code extension
MIT
