What are AI Agents, Really? › Orchestration is the Hard Part
Michael BrenndoerferMay 27, 20253 min read
What are AI Agents, Really? › Orchestration is the Hard PartOne section · Sections in this article9 / 13 ↓
Sections in this article13
LLMs are powerful reasoning engines, but they don't do anything on their own. What turns them into functioning agents is orchestration.
Orchestration is the glue that binds prompts, logic, tools, memory, and decisions into a working system.
Chaining together API calls is the easy part. The hard part is coordinating an evolving, partially deterministic process with tools that weren't designed to behave like functions, and doing so reliably.
## What Does Orchestration Actually Involve?
Think of orchestration as building the runtime brain of the agent. It must:
- Track state across steps
- Route data between prompts, tools, and memory
- Decide what to do next (or when to stop)
- Manage errors and retries
- Optimize for cost, latency, and quality
In practice, this means:
- Structuring workflows as state machines (with branching and looping logic)
- Calling LLMs at the right points with the right context
- Choosing and calling tools based on LLM output
- Persisting intermediate decisions and outputs
- Monitoring for task completion or failure
The moment you go beyond a single prompt-response, you're in orchestration territory.
## Why Orchestration Is So Hard
Here's why building orchestrated agents is orders of magnitude harder than calling an LLM directly:
**Unpredictable Outputs** LLMs are non-deterministic. The same prompt can yield different outputs. This makes control flow fuzzy - unlike traditional code, you can't always rely on the same state transition.
**Fragile Prompt Logic** Prompt engineering becomes brittle when prompts act as function calls. A small change in wording can cause an LLM to miss a tool call, misinterpret intent, or generate unexpected output.
**Limited Testing Infrastructure** You can't write unit tests for every LLM call. Most orchestration frameworks rely on evaluations, heuristics, or spot checks - making regression testing and CI/CD workflows hard to implement.
**Complex Error Handling** You must build logic for:
- LLM failure modes (nonsense, hallucinations, omissions)
- Tool call errors (timeouts, bad inputs)
- Loops that don't converge
- Ambiguous states
This often means adding layers of fallback logic or human-in-the-loop checkpoints.
## Frameworks for Agents
The ecosystem is rapidly maturing, and several frameworks now help abstract away some of the pain of orchestration.
**Open-source**
- [CrewAI](https://github.com/crewAIInc/crewAI): Python, Focuses on team-based agent collaboration. Great for use cases with defined roles and communication patterns.
- [Mastra](https://github.com/mastra-ai/mastra): TypeScript, Built around state-machine-style workflows and browser-based interactions. Designed for TypeScript-heavy stacks.
**Cloud Platforms**
- [AWS Agent Squad](https://github.com/awslabs/agent-squad) A managed orchestration layer that integrates with Bedrock models, Lambda, and Step Functions.
- [Cloudflare Agents SDK](https://developers.cloudflare.com/agents/) Focused on edge-deployed agents running lightweight, low-latency workflows in serverless environments.
- [GCP Vertex AI Agent Builder](https://cloud.google.com/products/agent-builder) Graph-based orchestration with tool and memory integration. Good for enterprise-grade pipelines.
- [Azure AI Foundry Agent Service](https://learn.microsoft.com/en-us/azure/ai-services/agents/overview) Combines Azure OpenAI, function calling, and memory modules into a production-oriented orchestration framework.