A practical guide to building agents
Source: OpenAI; OpenAI business guide (PDF, 32 pp.) · 2025
Large language models are becoming increasingly capable of handling complex, multi-step tasks. Advances in reasoning, multimodality, and tool use have unlocked a new category of LLM-powered systems known as agents.
This guide is designed for product and engineering teams exploring how to build their first agents, distilling insights from numerous customer deployments into practical and actionable best practices. It includes frameworks for identifying promising use cases, clear patterns for designing agent logic and orchestration, and best practices to ensure your agents run safely, predictably, and effectively.
After reading this guide, you’ll have the foundational knowledge you need to confidently start building your first agent.
Introduction. While conventional software enables users to streamline and automate workflows, agents are able to perform the same workflows on the users’ behalf with a high degree of independence.
Agents are systems that independently accomplish tasks on your behalf.
A workflow is a sequence of steps that must be executed to meet the user’s goal, whether that's resolving a customer service issue, booking a restaurant reservation, committing a code change, or generating a report.
Applications that integrate LLMs but don’t use them to control workflow execution—think simple chatbots, single-turn LLMs, or sentiment classifiers—are not agents.
More concretely, an agent possesses core characteristics that allow it to act reliably and consistently on behalf of a user:
01 It leverages an LLM to manage workflow execution and make decisions. It recognizes when a workflow is complete and can proactively correct its actions if needed. In case of failure, it can halt execution and transfer control back to the user.
02 It has access to various tools to interact with external systems—both to gather context and to take actions—and dynamically selects the appropriate tools depending on the workflow’s current state, always operating within clearly defined guardrails.
Method. Building agents requires rethinking how your systems make decisions and handle complexity. Unlike conventional automation, agents are uniquely suited to workflows where traditional deterministic and rule-based approaches fall short.
Consider the example of payment fraud analysis. A traditional rules engine works like a checklist, flagging transactions based on preset criteria. In contrast, an LLM agent functions more like a seasoned investigator, evaluating context, considering subtle patterns, and identifying suspicious activity even when clear-cut rules aren’t violated. This nuanced reasoning capability is exactly what enables agents to manage complex, ambiguous situations effectively.
As you evaluate where agents can add value, prioritize workflows that have previously resisted automation, especially where traditional methods encounter friction:
01 Complex decision-making:
Workflows involving nuanced judgment, exceptions, or context-sensitive decisions, for example refund approval in customer service workflows.
02 Difficult-to-maintain rules:
Systems that have become unwieldy due to extensive and intricate rulesets, making updates costly or error-prone, for example performing vendor security reviews.
03 Heavy reliance on unstructured data:
Scenarios that involve interpreting natural language, extracting meaning from documents, or interacting with users conversationally, for example processing a home insurance claim.
Before committing to building an agent, validate that your use case can meet these criteria clearly. Otherwise, a deterministic solution may suffice.
In its most fundamental form, an agent consists of three core components:
01 Model The LLM powering the agent’s reasoning and decision-making 02 Tools External functions or APIs the agent can use to take action 03 Instructions Explicit guidelines and guardrails defining how the agent behaves Selecting your models Different models have different strengths and tradeoffs related to task complexity, latency, and cost. As we’ll see in the next section on Orchestration, you might want to consider using a variety of models for different tasks in the workflow.
Not every task requires the smartest model—a simple retrieval or intent classification task may be handled by a smaller, faster model, while harder tasks like deciding whether to approve a refund may benefit from a more capable model.
An approach that works well is to build your agent prototype with the most capable model for every task to establish a performance baseline. From there, try swapping in smaller models to see if they still achieve acceptable results. This way, you don’t prematurely limit the agent’s abilities, and you can diagnose where smaller models succeed or fail.
In summary, the principles for choosing a model are simple:
01 Set up evals to establish a performance baseline 02 Focus on meeting your accuracy target with the best models available 03 Optimize for cost and latency by replacing larger models with smaller ones where possible Defining tools Tools extend your agent’s capabilities by using APIs from underlying applications or systems. For legacy systems without APIs, agents can rely on computer-use models to interact directly with those applications and systems through web and application UIs—just as a human would.
Each tool should have a standardized definition, enabling flexible, many-to-many relationships between tools and agents. Well-documented, thoroughly tested, and reusable tools improve discoverability, simplify version management, and prevent redundant definitions.
Broadly speaking, agents need three types of tools:
Type Description Examples Data Enable agents to retrieve context and information necessary for executing the workflow.
Query transaction databases or systems like CRMs, read PDF documents, or search the web.
Action Enable agents to interact with systems to take actions such as adding new information to databases, updating records, or sending messages.
Send emails and texts, update a CRM record, hand-off a customer service ticket to a human.
Conclusion. Agents mark a new era in workflow automation, where systems can reason through ambiguity, take action across tools, and handle multi-step tasks with a high degree of autonomy. Unlike simpler LLM applications, agents execute workflows end-to-end, making them well-suited for use cases that involve complex decisions, unstructured data, or brittle rule-based systems.
To build reliable agents, start with strong foundations: pair capable models with well-defined tools and clear, structured instructions. Use orchestration patterns that match your complexity level, starting with a single agent and evolving to multi-agent systems only when needed. Guardrails are critical at every stage, from input filtering and tool use to human-in-the-loop intervention, helping ensure agents operate safely and predictably in production.
The path to successful deployment isn’t all-or-nothing. Start small, validate with real users, and grow capabilities over time. With the right foundations and an iterative approach, agents can deliver real business value—automating not just tasks, but entire workflows with intelligence and adaptability.
If you’re exploring agents for your organization or preparing for your first deployment, feel free to reach out. Our team can provide the expertise, guidance, and hands-on support to ensure your success.
Lines of inquiry this paper opens 11
Research framings built by reading the notes related to this paper — the questions it feeds into.
How should control and autonomy be allocated in human-AI collaboration?- What specific AI technologies count as augmentation versus automation?
- How do augmentation and automation differ as organizational responses to AI?
- How do variance and standardization guide automation type selection?
- How do organizations redesign workflows to capture AI economic value?
- How does workflow redesign create more value than improving agent sophistication?