AI Agent Architecture Decision Guide
Which AI Agent Framework Should We Build On?
Direct Answer
There is no single best AI agent framework for every system. The right choice depends on workflow complexity, state management, integrations, model providers, deployment requirements, and governance. For complex stateful workflows, evaluate LangGraph. For OpenAI-centered architectures with lightweight agent primitives, evaluate the OpenAI Agents SDK. Microsoft-heavy environments point toward Semantic Kernel. Google Cloud organizations should evaluate Google's Agent Development Kit. Systems requiring maximum control or unusual enterprise constraints may benefit from a thin custom orchestration layer rather than a large framework.
Architecture Questions First
13
questions to answer before evaluating any framework
Frameworks Worth Evaluating
7
LangGraph, OpenAI SDK, Semantic Kernel, ADK, CrewAI, PydanticAI, LlamaIndex
Example Decision Scenarios
6
mapped to specific frameworks and architecture patterns
Framework Selection Methodology
Start With the Architecture, Not the Framework
Choosing an agent framework before defining the workflow is similar to choosing an application framework before knowing what the application needs to do.
Agent systems are not just LLM calls. A production system typically combines LLM reasoning, deterministic business logic, tool execution, database and API interactions, retrieval, memory, state management, human approval workflows, background jobs, event-driven triggers, observability infrastructure, and evaluation pipelines. An agent framework may control only part of that stack. Selecting the framework first means the architecture gets designed around the framework's abstractions, rather than the actual system requirements.
Define these before evaluating any framework
Answer these questions first. Then evaluate frameworks against those requirements, not the other way around.
Architectural Options
Do You Actually Need an AI Agent Framework?
Not always. Three architectures are worth considering, and the correct one depends on the actual system requirements.
Direct Model APIs + Application Code
Best for
Simple tool-calling applications, short workflows, limited state, highly deterministic logic, teams wanting maximum control.
- +Minimal abstraction
- +Easier debugging
- +Lower framework dependency
- +Full architectural control
Tradeoff
The engineering team must implement more orchestration itself.
Agent Framework or SDK
Best for
Tool execution, handoffs, multi-step interactions, state management, agent loops, guardrails, and reusable agent abstractions.
- +Faster development
- +Less orchestration code
- +Common patterns already implemented
- +Runtime handles more of the agent loop
Tradeoff
Abstraction complexity, framework dependency, migration difficulty, and APIs that can evolve rapidly.
Custom Orchestration Layer
Best for
Complex enterprise integrations, regulated environments, strong governance requirements, multiple models or providers, unusual deployment environments, and systems expected to evolve significantly.
- +Maximum control over execution
- +Strong portability across providers
- +Purpose-built governance and authorization
- +No framework migration risk
Tradeoff
Higher initial engineering investment and longer time to first deployment.
Custom orchestration is a legitimate architectural choice. It requires real engineering work. It can combine a deterministic workflow engine, model APIs, routing logic, MCP servers, enterprise APIs, authorization, observability, and human approval flows as a coherent system.
Framework Reference
AI Agent Frameworks Worth Evaluating
These are the frameworks most commonly evaluated for production AI agent systems. The right one depends on what the architecture actually requires.
LangGraph
Workflow Orchestration Framework
Graph-based stateful workflow orchestration for complex agents
Evaluate when
- ·The problem involves complex stateful workflows
- ·Execution must follow graph-based logic with explicit branching
- ·The workflow requires checkpoints and resume capability
- ·Long-running processes with human intervention are required
- ·You need fine-grained control over state, retries, and interruptions
LangGraph's primary differentiation is workflow and state orchestration. It gives teams explicit control over the execution graph, which matters when the workflow itself is the difficult engineering problem.
OpenAI Agents SDK
Lightweight Agent Runtime
Agent primitives, tools, handoffs, guardrails, and tracing
Evaluate when
- ·The architecture is primarily built around OpenAI models
- ·You want lightweight agent primitives without heavy framework abstractions
- ·Built-in tracing and guardrails are important
- ·Tool use, handoffs between agents, and session management are the core requirements
- ·Development speed matters more than deep workflow control
OpenAI explicitly distinguishes between using the Responses API directly (own the execution loop, tool dispatch, and state) and using the Agents SDK (let the runtime handle turns, tools, handoffs, guardrails, and sessions). Both are valid depending on how much control the application needs.
Microsoft Semantic Kernel
Enterprise Agent Framework
Microsoft-ecosystem agent and orchestration tooling
Evaluate when
- ·The company already has a Microsoft-heavy technology stack
- ·Azure integration is central to the architecture
- ·.NET matters for backend implementation
- ·Enterprise-oriented components and multi-model orchestration are required
- ·Different orchestration patterns (sequential, concurrent, handoff, group chat) are needed
Semantic Kernel exposes enterprise-oriented capabilities around observability, security, filters, plugins, and agent abstractions. Review current Microsoft documentation for the stability status of specific orchestration features before committing to a production deployment.
Microsoft currently labels parts of Semantic Kernel's agent orchestration functionality as experimental. Verify current stability status against official Microsoft documentation before treating any specific orchestration feature as production-ready.
Google Agent Development Kit (ADK)
Agent Development Platform
Google Cloud and Gemini-centered agent development lifecycle
Evaluate when
- ·Gemini is central to the model strategy
- ·Google Cloud is the preferred deployment environment
- ·Vertex AI and Google agent infrastructure are important
- ·Agent-to-agent (A2A) architectures are part of the design
- ·Teams want Google's integrated agent development, evaluation, and deployment lifecycle
ADK itself (the development kit and local runtime) is distinct from Google's broader managed agent platform and deployment tooling. They serve related but different purposes in the agent development lifecycle.
CrewAI
Multi-Agent Collaboration Framework
Role-oriented agent collaboration for multi-agent workflows
Evaluate when
- ·Workflow organization around multiple specialized agent roles provides a real architectural benefit
- ·Tasks can genuinely run in parallel across independent agents
- ·Responsibilities are clearly separated between specialized domains
- ·The Flow architecture fits your orchestration needs
Multi-agent capability alone is not a reason to choose CrewAI or any multi-agent framework. Many workflows that appear to need multiple agents are simpler and easier to maintain as one agent with multiple tools and deterministic routing. Evaluate whether the architecture genuinely benefits from independent specialized agents before choosing a multi-agent framework.
PydanticAI
Python Agent SDK
Typed, Pydantic-native agent development for Python teams
Evaluate when
- ·The team works primarily in Python with Pydantic-based development patterns
- ·Structured validation and typed application development are priorities
- ·Relatively thin agent abstractions are preferred over large framework runtimes
- ·The architecture values developer experience and type safety
Verify current support for durable execution, human-in-the-loop approvals, observability, and the full list of supported model providers against current PydanticAI documentation before making architectural decisions.
LlamaIndex
Data and Retrieval Framework
Enterprise knowledge and retrieval for document-centric agents
Evaluate when
- ·Retrieval, enterprise knowledge integration, or RAG is central to the agent architecture
- ·The system interacts heavily with documents, internal data, or structured knowledge bases
- ·Knowledge-intensive workflows require deep data connectors and indexing
- ·The agent's primary job is information retrieval and synthesis rather than autonomous workflow execution
LlamaIndex may be most relevant when the agent system is closely tied to enterprise information retrieval. It can be combined with a separate orchestration layer for systems that need both strong retrieval and complex workflow control. Verify current agent and workflow capabilities against current documentation.
Framework Selector
Choose What Your System Needs Most
Select the primary requirements and see which frameworks are worth evaluating.
Select a requirement above to see which frameworks are worth evaluating.
Selection Guide
How to Choose an AI Agent Framework
Match your primary requirements to the technologies worth investigating. These are starting points for evaluation, not rankings.
| Requirement | Technologies Worth Investigating |
|---|---|
| Complex stateful workflows with branching and checkpoints | Workflow/graph-oriented frameworks such as LangGraph |
| Simple agent with a small set of tools | Lightweight SDK or direct model API |
| OpenAI-centric architecture | OpenAI Agents SDK |
| Microsoft or Azure environment | Microsoft agent ecosystem, Semantic Kernel |
| Google Cloud or Gemini environment | Google ADK |
| Heavy enterprise RAG and document retrieval | LlamaIndex combined with appropriate orchestration |
| Role-based multi-agent workflows | Multi-agent frameworks such as CrewAI |
| Maximum architectural control | Custom orchestration layer |
| Strong provider independence | Provider-agnostic framework or custom orchestration |
| Human approval workflows with pause and resume | Frameworks with explicit HITL support such as LangGraph or OpenAI Agents SDK |
| Long-running durable workflows | Durable workflow or state management systems |
| Strict compliance and auditability | Explicit orchestration with authorization, audit logging, and deterministic boundaries |
| Typed Python development patterns | PydanticAI |
| Very simple use case with one model and few tools | Do not introduce a complex framework. Direct model APIs and application logic may be sufficient. |
Head-to-Head Comparison
LangGraph vs. OpenAI Agents SDK
They solve overlapping but not identical architectural problems. The right choice depends on where the complexity lives in your system.
Teams frequently compare these two because both support multi-step agent workflows with tool use. The difference is in what each one handles well.
LangGraph
“How do I control state, branches, retries, interruptions, and complex agent workflows?”
Best for
- +Workflows where execution itself is complicated
- +Systems that need explicit control over state transitions
- +Long-running processes with checkpoints
- +Complex branching logic with human intervention points
- +Multi-agent subgraph composition
Less suited for
Teams that want a quick path to a working agent with tools, handoffs, and tracing around OpenAI models.
OpenAI Agents SDK
“How do I quickly build agents with tools, guardrails, handoffs, and tracing around OpenAI's ecosystem?”
Best for
- +Applications primarily built around OpenAI models
- +Agents that benefit from built-in guardrails and tracing
- +Tool execution, agent handoffs, and session management
- +Teams that want the runtime to handle more of the agent loop
- +Faster development with fewer orchestration concerns
Less suited for
Systems where the workflow graph itself is the complex problem and needs explicit state control across many steps.
If the workflow is the hard problem, evaluate LangGraph. If getting a capable agent running quickly with OpenAI's tools and tracing is the priority, evaluate the OpenAI Agents SDK.
Head-to-Head Comparison
LangGraph vs. CrewAI
The question is not which framework has better agents. Ask whether the system is fundamentally a stateful workflow or a collaboration between specialized agents.
LangGraph gives teams explicit control over workflow state, execution graphs, and interruption points. It works well when the engineering challenge is managing how steps connect, branch, and persist across a complex process. CrewAI organizes work around multiple specialized agent roles, each with defined responsibilities, and is commonly evaluated when the architectural model is delegation across independent agents rather than a single controlled workflow.
| Question | LangGraph | CrewAI |
|---|---|---|
| Primary model | Stateful execution graph | Role-based agent collaboration |
| Complexity sweet spot | Complex workflow orchestration with branching and state | Multi-agent task delegation with specialized roles |
| State management | Explicit, checkpointed, graph-level state | Shared state and context between agents |
| Human-in-the-loop | Built-in pause, resume, and interrupt | Supported through Flow and process configuration |
| When to prefer | When execution control is the hard problem | When role specialization drives the architecture |
Many systems that appear to need multiple agents would be simpler as one agent with multiple tools and deterministic routing between them. Before choosing any multi-agent framework, confirm that the architecture genuinely benefits from independent specialized agents rather than a more controlled single-agent design.
Architecture Guidance
Should We Build a Multi-Agent System?
More agents do not automatically create a better system. Each additional agent adds real operational cost.
Every agent added to a system means more prompts, more model calls, greater latency, greater cost, additional state to manage, more failure modes, harder debugging, and more complicated observability. A two-agent system that feels elegant in a demo can become the most expensive part of the infrastructure in production.
Start with one agent when:
- 01One reasoning context is enough to complete the workflow
- 02Tools are clearly defined and scoped
- 03Responsibilities overlap or are hard to separate cleanly
- 04The workflow is mostly linear
Consider multiple agents when:
- 01Responsibilities are genuinely independent and clearly separated
- 02Different agents need different tools or permission sets
- 03Tasks can run in parallel with real throughput benefit
- 04Specialized contexts provide clear accuracy or safety benefits
- 05Control needs to transfer between genuinely different operational domains
If the workflow could work as one agent with deterministic routing and multiple tools, that is almost always the simpler, more maintainable starting point.
Evaluation Criteria
What Matters More Than Framework Popularity
GitHub stars and community buzz do not predict whether a framework will hold up in a production enterprise system.
Workflow Control
Can the team explicitly control branches, retries, approvals, failure states, tool execution order, and termination conditions? Or does the framework decide?
State Management
How is state persisted between steps? Can executions stop and resume after hours or days? What happens to in-flight state when a process fails?
Model Flexibility
Can the application use OpenAI, Anthropic, Gemini, open models, Azure OpenAI, and Amazon Bedrock without rewriting the architecture? Different providers expose different capabilities, so perfect portability is unlikely, but the degree of lock-in matters.
Tool Integration
Can agents safely interact with internal databases, SaaS platforms, enterprise APIs, and MCP servers? What authorization model controls which tools an agent can call?
Human Oversight
Can execution pause for human approval, review, escalation, or correction? Is this built into the framework or a custom implementation requirement?
Observability
Can developers inspect model calls, tool calls, latency, token usage, failures, traces, cost, and workflow state? Does the framework emit OpenTelemetry-compatible traces?
Evaluation
Can agent behavior be tested against golden datasets before deployment? Can production traces be sampled and evaluated for drift or regression?
Security
How does the framework handle authentication, authorization, scoped tool permissions, secrets management, data boundaries, and auditability? These are not optional in enterprise deployments.
Deployment Fit
Does the framework fit the target infrastructure, whether AWS, Azure, Google Cloud, containers, Kubernetes, serverless, or private infrastructure?
Framework Risk
How deep are the framework's abstractions? How stable is the API? How mature is the project? How difficult is migration if requirements change? How tightly does the framework tie the application to a specific model provider?
Enterprise Evaluation
What Makes an Agent Framework Enterprise-Ready?
Enterprise readiness is not measured by GitHub stars, benchmark demos, or social media traction. Evaluate whether the resulting system can support real production requirements.
Security
- +Identity and authentication for agents and tools
- +Scoped permissions per agent
- +Secrets management without hardcoded credentials
- +Data boundaries and access policies
Reliability
- +Retry logic and error recovery
- +Checkpoint and resume capability
- +Fallback behavior on model or tool failure
- +Deterministic boundaries for high-risk operations
Governance
- +Human approval workflows for sensitive actions
- +Audit logs with complete execution traces
- +Traceability from input to output
- +Model and version control for agent behavior
Observability
- +Distributed traces for agent execution spans
- +Tool call logging with input/output capture
- +Latency and token usage metrics
- +Cost attribution per workflow or agent
Evaluation
- +Offline regression testing against golden datasets
- +Production trace sampling and automated review
- +Behavioral comparison across framework or prompt versions
Operations
- +Deployment to target infrastructure
- +Versioning and rollback for agent definitions
- +Monitoring and alerting on workflow anomalies
Decision Scenarios
Example Architecture Decisions
These six scenarios show how requirements map to frameworks. Use them as orientation points rather than prescriptions.
Complex Enterprise Approval Workflow
Requirements
- ·Multiple integrated systems
- ·Persistent state across long-running steps
- ·Human approval at defined checkpoints
- ·Workflow resume after approval
- ·Auditability for compliance
Evaluate
OpenAI-Based Customer Service Agent
Requirements
- ·Tool use for order lookup, returns, and escalation
- ·Agent handoffs between specialized agents
- ·Guardrails for policy compliance
- ·Built-in tracing for quality review
Evaluate
Azure-Heavy Enterprise Agent
Requirements
- ·.NET backend environment
- ·Azure OpenAI integration
- ·Enterprise identity and permission controls
- ·Multiple agent collaboration patterns
Evaluate
Gemini + Google Cloud Organization
Requirements
- ·Gemini as primary model
- ·Google Cloud deployment
- ·Evaluation and monitoring through Google infrastructure
- ·Agent-to-agent architecture as a future option
Evaluate
Enterprise Knowledge Assistant
Requirements
- ·RAG over internal documents and knowledge bases
- ·Multiple enterprise data source integrations
- ·Retrieval quality and precision are central
- ·Synthesis across structured and unstructured data
Evaluate
Simple Internal Automation
Requirements
- ·One model
- ·Three or four clearly defined tools
- ·No persistent state between runs
- ·Linear execution with clear exit conditions
Evaluate
Golabs Approach
How Golabs Approaches Agent Architecture
Before any framework is discussed, Golabs maps the business process: what the agent must accomplish, which systems it needs to access, where AI reasoning adds value, where deterministic control is necessary, how humans stay involved, and how the system gets deployed and operated. From there, the implementation combines agent frameworks, model APIs, enterprise integrations, workflow logic, and custom orchestration depending on the client's actual requirements. The framework supports the solution rather than defining it.
Vendor-neutral selection
Golabs works with LangGraph, OpenAI Agents SDK, Google ADK, Semantic Kernel, and custom orchestration layers. The choice follows requirements, not partnerships.
Production-first engineering
Golabs designs for observability, state management, human-in-the-loop control, and enterprise integrations from the start. These are not features added later.
Senior nearshore talent
AI agent projects at Golabs are staffed by senior engineers with production deployment experience, not junior teams running demos.
What Golabs delivers
- +Architecture review and framework selection support
- +Production agent system design and implementation
- +Custom orchestration layer development for enterprise requirements
- +Integration with existing enterprise APIs, databases, and SaaS platforms
- +Observability, evaluation, and governance infrastructure
- +Human-in-the-loop workflow design
AI Orchestrator
Golabs designs AI orchestration architecture that combines agent frameworks, model APIs, enterprise integrations, and deterministic workflow logic into production-grade systems.
Tailored AI Agents
Custom AI agent implementations built around your specific workflow, systems, governance requirements, and deployment environment.
Frequently Asked Questions
Questions About AI Agent Framework Selection
Direct answers to the architecture questions engineering leaders ask when evaluating production AI agent systems.
There is no universally best framework. The appropriate choice depends on workflow complexity, state requirements, integrations, model providers, deployment environment, and governance. A framework that works well for a simple customer service agent will not necessarily suit a complex stateful approval workflow, and vice versa.
They address different architectural problems. LangGraph is typically evaluated for explicit workflow and state orchestration, where the team needs fine-grained control over execution graphs, checkpoints, and interruptions. CrewAI is commonly evaluated for role-oriented multi-agent systems where work is delegated across specialized agents. If the primary challenge is workflow control, LangGraph is the natural candidate. If the primary challenge is multi-agent role coordination, CrewAI is worth evaluating.
Evaluate LangGraph when workflow and state orchestration is the difficult engineering problem. Evaluate the OpenAI Agents SDK when you want a lightweight runtime around agents, tools, handoffs, guardrails, tracing, and OpenAI's ecosystem, and development speed matters more than deep workflow control.
Not necessarily. Simple applications can often use model APIs, tool definitions, and ordinary application logic without introducing a large framework. If the workflow is short, state is minimal, and the logic is mostly deterministic, a framework adds abstraction without much benefit. The engineering team should implement more orchestration, but that cost may be lower than the abstraction cost and migration risk of adopting a large framework prematurely.
Start with one agent unless the architecture has a clear reason for multiple. Each additional agent adds model calls, latency, cost, state complexity, and failure modes. Many workflows that seem to need multiple agents work better as one agent with multiple tools and deterministic routing. Consider multiple agents only when responsibilities are genuinely independent, tasks can run in parallel, or different agents need distinct permissions.
The model provider is one input, not the only one. OpenAI-centric architectures naturally point toward the OpenAI Agents SDK, Microsoft-heavy environments point toward Semantic Kernel, and Gemini-centered organizations should evaluate Google's ADK. But workflow control, state management, integrations, deployment requirements, and governance usually matter just as much as which models the framework supports.
No. MCP can standardize how agents connect to external tools and context providers, which reduces integration friction. But orchestration, state management, prompts, model interaction, and runtime behavior can still depend heavily on the framework. MCP addresses tool connectivity. Framework lock-in is a separate concern determined by how tightly domain logic, state, and tools are coupled to framework-specific abstractions.
Yes, but switching becomes harder when domain logic, tools, prompts, and persistence are tightly coupled to framework-specific abstractions. Migration is realistic when tools are ordinary functions, domain logic lives outside the framework, models are accessed behind adapters, and observability uses open standards. The architecture decision that most affects future portability is treating the agent framework as one infrastructure component rather than the entire application foundation.
Architecture Guidance
Not sure which agent framework fits your architecture?
Golabs can help evaluate the workflow requirements, integration constraints, model ecosystem, and operational environment before committing to a framework or building a custom orchestration layer.
Talk directly with Golabs AI engineers. No sales scripts.
Explore AI Orchestrator