The only repo that shows the same agent implemented across ALL major frameworks with production deployment configs.
- Reference Implementations: Same agent built across 6 frameworks for direct comparison
- Production Configs: Real deployment code, not localhost demos
- MCP Servers: Reusable tool integration patterns
- Cost Analysis: Actual production cost data
- Evaluation Suites: Standard testing patterns
This repository implements the 7 Pillars of Production Agent Systems:
| Pillar | What It Solves |
|---|---|
| Orchestration | Multi-agent coordination |
| Memory | State persistence across sessions |
| Guardrails | Safety and validation |
| Observability | Tracing and debugging |
| Security | Access control and audit |
| Cost Management | Token and resource budgets |
| Lifecycle (AgentOps) | CI/CD for agents |
production-agent-patterns/
βββ docs/ # Framework documentation
β βββ 7-pillars.md # The core framework
β βββ provider-comparison.md # Detailed matrix
β βββ decision-guide.md # How to choose
β
βββ agents/ # Reference agent implementations
β βββ research-assistant/ # Primary reference agent
β βββ openai-sdk/ # OpenAI Agents SDK
β βββ claude-sdk/ # Claude Agent SDK
β βββ langraph/ # LangGraph
β βββ aws-strands/ # AWS Strands
β βββ google-adk/ # Google ADK
β βββ oracle-adk/ # Oracle ADK
β
βββ mcp-servers/ # Model Context Protocol servers
β βββ template/ # Starter template
β βββ database-connector/ # PostgreSQL/MySQL example
β
βββ deployment/ # Infrastructure as Code
β βββ aws/ # Terraform + CDK
β βββ gcp/ # Terraform
β βββ azure/ # Bicep + Terraform
β βββ oracle/ # OCI Terraform
β βββ docker/ # Local development
β
βββ monitoring/ # Observability setup
β βββ langfuse/ # Open-source tracing
β βββ dashboards/ # Grafana dashboards
β
βββ evaluation/ # Testing and benchmarks
βββ test-suites/ # Standard evaluation patterns
βββ benchmarks/ # Performance baselines
git clone https://github.com/frankxai/production-agent-patterns.git
cd production-agent-patterns
# Choose your framework
cd agents/research-assistant/openai-sdk # or claude-sdk, etc.
# Install dependencies
pip install -r requirements.txt
# Set environment variables
cp .env.example .env
# Edit .env with your API keys# OpenAI version
python main.py "Research the latest developments in quantum computing"
# Claude version
cd ../claude-sdk
python main.py "Research the latest developments in quantum computing"All implementations produce the same output format, making direct comparison possible.
Our reference agent is a Research Assistant that:
- Searches the web for information
- Reads and summarizes documents
- Synthesizes findings into reports
- Cites sources
This agent is complex enough to demonstrate all 7 pillars while simple enough to understand.
agent:
name: ResearchAssistant
description: Researches topics and produces synthesized reports
tools:
- web_search: Search the web for information
- fetch_url: Retrieve and parse web pages
- summarize: Condense long documents
memory:
short_term: conversation context
long_term: research history, user preferences
guardrails:
input: content_policy, pii_detection
output: citation_required, format_validation
output_format:
- summary: 2-3 paragraph synthesis
- key_findings: bullet points
- sources: cited URLsBuild once, use with any agent framework.
# mcp-servers/database-connector/server.py
from mcp import Server, Tool
server = Server("database-connector")
@server.tool()
async def query_database(sql: str) -> dict:
"""Execute read-only SQL query"""
# Implementation with safety checks
return execute_safe_query(sql)cd deployment/aws
terraform init
terraform apply -var="agent_name=research-assistant"cd deployment/gcp
terraform init
terraform applycd deployment/azure
az deployment group create \
--resource-group myResourceGroup \
--template-file main.bicepcd deployment/oracle
terraform init
terraform apply -var="compartment_id=ocid1.compartment..."cd deployment/docker
docker-compose upcd monitoring/langfuse
docker-compose up -d
# Open http://localhost:3000
# Default credentials: admin / admincd monitoring/dashboards
./import-to-grafana.shcd evaluation
pytest test-suites/ -v --benchmark| Suite | Tests |
|---|---|
| Functional | Agent produces correct outputs |
| Safety | Guardrails block bad inputs/outputs |
| Performance | Latency and throughput |
| Cost | Token usage tracking |
| Adversarial | Red team attack resistance |
Based on 1,000 research queries (as of January 2026):
| Framework | Avg Cost/Query | Latency (p50) | Notes |
|---|---|---|---|
| OpenAI SDK | $0.08 | 2.3s | GPT-4o |
| Claude SDK | $0.07 | 2.1s | Claude Sonnet 4 |
| AWS Bedrock | $0.06 | 2.5s | Claude via Bedrock |
| Google ADK | $0.07 | 2.4s | Gemini 2.0 |
| Oracle ADK | $0.05 | 2.6s | Cohere Command A |
Costs include all API calls, tool usage, and retry logic.
We welcome contributions! See CONTRIBUTING.md for guidelines.
- Additional agent implementations (AutoGen, CrewAI)
- More MCP server examples
- Cost optimization patterns
- Evaluation benchmark improvements
MIT License - see LICENSE for details.
Built with β€οΈ by Frank | AI Architect
Helping you ship production agents, not just demos.