Full Code — Python & TypeScript SDK
Full programmatic control over agent definition, deployment, and orchestration.
Build agents entirely in code with the AgentBreeder SDK. Full type safety, custom routing logic, state machines, and programmatic deploy pipelines.
Who this is for: Senior engineers, AI researchers, ML scientists, and teams building production systems that need custom orchestration, complex evals, or CI/CD-driven deploys.
Install
pipx install agentbreeder-sdk # or: python3 -m pip install agentbreeder-sdknpm install @agentbreeder/sdkSupported Frameworks
The SDK supports all 6 frameworks. Pass the framework name as a string — AgentBreeder resolves the right runtime.
| Value | Framework |
|---|---|
"langgraph" | LangGraph (LangChain) |
"openai_agents" | OpenAI Agents SDK |
"claude_sdk" | Anthropic Claude SDK |
"crewai" | CrewAI |
"google_adk" | Google Agent Development Kit |
"custom" | Bring your own entrypoint |
Supported Deployment Targets
All 7 deployment targets available via .with_deploy():
cloud | Default runtime | Also supports |
|---|---|---|
"local" | "docker-compose" | — |
"aws" | "ecs-fargate" | "app-runner" |
"gcp" | "cloud-run" | — |
"azure" | "container-apps" | — |
"kubernetes" | "deployment" | — |
"claude-managed" | (no container) | — |
Python SDK
Install and full-featured deploy
from agenthub import Agent
agent = (
Agent("support-agent")
.with_version("1.0.0")
.with_description("Handles tier-1 customer support")
.with_team("customer-success")
.with_owner("alice@company.com")
.with_tags(["support", "zendesk", "production"])
.with_framework("langgraph")
.with_model(
primary="claude-sonnet-4",
fallback="gpt-4o",
temperature=0.7,
)
.with_tools([
"tools/zendesk-mcp",
"tools/order-lookup",
])
.with_knowledge_bases([
"kb/product-docs",
"kb/return-policy",
])
.with_prompts(system="prompts/support-system-v3")
.with_guardrails(["pii_detection", "hallucination_check", "content_filter"])
.with_access(
visibility="team",
allowed_callers=["team:engineering", "team:customer-success"],
require_approval=False,
)
.with_deploy(
cloud="aws",
runtime="app-runner",
region="us-east-1",
scaling={"min": 1, "max": 10, "target_cpu": 70},
secrets=["ZENDESK_API_KEY", "OPENAI_API_KEY"],
)
)
result = agent.deploy()
print(result.endpoint)Framework-specific config
from agenthub import Agent
agent = (
Agent("research-agent")
.with_framework("langgraph")
.with_model(primary="claude-sonnet-4")
.with_tools(["tools/web-search", "tools/arxiv"])
.with_deploy(cloud="gcp", runtime="cloud-run")
)from agenthub import Agent
from agenthub.config import ClaudeSDKConfig
agent = (
Agent("reasoning-agent")
.with_framework("claude_sdk")
.with_model(primary="claude-opus-4")
.with_framework_config(ClaudeSDKConfig(
thinking={"type": "adaptive", "effort": "high"},
prompt_caching=True,
))
.with_deploy(cloud="aws", runtime="app-runner")
)from agenthub import Agent
agent = (
Agent("research-crew")
.with_framework("crewai")
.with_model(primary="gpt-4o")
.with_tools(["tools/web-search", "tools/wikipedia"])
.with_deploy(cloud="local")
)from agenthub import Agent
from agenthub.config import GoogleADKConfig
agent = (
Agent("workspace-agent")
.with_framework("google_adk")
.with_model(primary="gemini-2.0-flash")
.with_framework_config(GoogleADKConfig(
session_backend="database",
memory_service="vertex_ai_bank",
artifact_service="gcs",
gcs_bucket="my-agent-artifacts",
))
.with_deploy(cloud="gcp", runtime="cloud-run")
)from agenthub import Agent
agent = (
Agent("triage-agent")
.with_framework("openai_agents")
.with_model(primary="gpt-4o-mini", fallback="gpt-4o")
.with_tools(["tools/zendesk-mcp"])
.with_deploy(cloud="azure", runtime="container-apps")
)from agenthub import Agent
agent = (
Agent("legacy-wrapper")
.with_framework("custom")
.with_model(primary="claude-sonnet-4")
.with_entrypoint("server:app") # your ASGI/WSGI app
.with_deploy(cloud="kubernetes")
)Deploy to Claude Managed Agents
from agenthub import Agent
from agenthub.config import ClaudeManagedConfig
agent = (
Agent("managed-support")
.with_framework("claude_sdk")
.with_model(primary="claude-sonnet-4")
.with_deploy(
cloud="claude-managed",
secrets=["ANTHROPIC_API_KEY"],
)
.with_claude_managed(ClaudeManagedConfig(
environment={"networking": "unrestricted"},
tools=[{"type": "agent_toolset_20260401"}],
))
)
result = agent.deploy()
# result.endpoint = "anthropic://agents/agt_01...?env=env_01..."
print(result.endpoint)Generate and validate agent.yaml
agent.to_yaml("agent.yaml") # export for YAML-based workflows
agent.validate() # validate without deployingTypeScript SDK
import { Agent } from "@agentbreeder/sdk";
const agent = new Agent("support-agent", {
version: "1.0.0",
description: "Handles tier-1 customer support",
team: "customer-success",
owner: "alice@company.com",
tags: ["support", "zendesk", "production"],
})
.withFramework("langgraph")
.withModel({
primary: "claude-sonnet-4",
fallback: "gpt-4o",
temperature: 0.7,
})
.withTools(["tools/zendesk-mcp", "tools/order-lookup"])
.withKnowledgeBases(["kb/product-docs", "kb/return-policy"])
.withPrompts({ system: "prompts/support-system-v3" })
.withGuardrails(["pii_detection", "hallucination_check"])
.withAccess({ visibility: "team", allowedCallers: ["team:engineering"] })
.withDeploy({
cloud: "aws",
runtime: "app-runner",
region: "us-east-1",
secrets: ["ZENDESK_API_KEY"],
});
const result = await agent.deploy();
console.log(result.endpoint);Export as YAML:
agent.toYaml("agent.yaml");Multi-Agent Orchestration (Full Code)
The Full Code tier unlocks the Orchestration SDK — define pipelines of agents with custom routing, state, and execution strategies.
from agenthub.orchestration import Pipeline, Agent
pipeline = (
Pipeline("support-pipeline")
.add_agent("triage", Agent("triage-agent").with_model("claude-haiku-4-5"))
.add_agent("specialist", Agent("specialist-agent").with_model("claude-sonnet-4"))
.add_agent("escalation", Agent("escalation-agent").with_model("claude-opus-4"))
.with_strategy("router") # router | sequential | parallel | supervisor | hierarchical | fan-out
.with_routing(lambda ctx: (
"specialist" if ctx.intent in ("billing", "technical")
else "escalation" if ctx.priority == "urgent"
else "triage"
))
.with_deploy(cloud="aws", runtime="app-runner")
)
result = pipeline.deploy()Supported strategies:
| Strategy | Description |
|---|---|
router | Classifies the request and routes to the right agent |
sequential | Runs agents in order, passing output as input |
parallel | Runs all agents simultaneously, merges results |
supervisor | One agent manages sub-agents dynamically |
hierarchical | Tree of supervisors and workers |
fan-out | One input split across N agents, results aggregated |
Agent-to-Agent (A2A) Calls
Agents deployed with AgentBreeder automatically expose an A2A endpoint. Call other agents directly:
from agenthub.a2a import A2AClient
# Discover agents in your org registry
client = A2AClient()
agents = client.list() # returns all A2A-enabled agents
# Call another agent
response = client.call(
agent="specialist-agent",
message="Customer is asking about order #12345",
context={"team": "customer-success"},
)
print(response.text)Restrict which agents can call yours via access.allowed_callers in agent.yaml:
access:
allowed_callers:
- team:engineering
- agent:triage-agentCI/CD Integration
# deploy.py — run in GitHub Actions / GitLab CI
import os
from agenthub import Agent
agent = (
Agent("support-agent")
.with_version(os.environ["AGENT_VERSION"])
.with_framework("langgraph")
.with_model(primary="claude-sonnet-4")
.with_deploy(
cloud="aws",
runtime="app-runner",
region=os.environ["AWS_REGION"],
)
)
result = agent.deploy()
print(f"Deployed: {result.endpoint}")Or use the CLI in CI:
agentbreeder deploy agent.yaml \
--target app-runner \
--region us-east-1 \
--version ${{ github.sha }}All Frameworks × All Deployment Targets
Every framework compiles to every deployment target. The full matrix — and the per-target governance caveats — live in the agent.yaml reference → All Frameworks × All Deployment Targets.
Claude Managed + any framework
The claude-managed deployment target works with every framework. When framework is set to anything other than claude_sdk, AgentBreeder wraps your agent in a Claude-managed container adapter automatically.
Next Steps
| What | Where |
|---|---|
| Orchestration strategies | Orchestration SDK → |
| Agent-to-agent protocol | A2A Guide → |
All agent.yaml fields | agent.yaml Reference → |
| All CLI commands | CLI Reference → |
| MCP server setup | MCP Servers → |
| RAG & knowledge bases | RAG → |
| Versioned prompts | Prompts → |
| Start with Studio | No Code → |
| Write plain YAML | Low Code → |
Low Code — agent.yaml + CLI
Configure agents in YAML and deploy with one command. No infrastructure expertise needed.
Polyglot Agents — TypeScript, Go, Python
Build and deploy AgentBreeder agents in TypeScript, Go, or Python. Full RAG, memory, tools, and A2A parity — wired by the platform, not written by you.