OpenAI just released a 34-page practical guide to building agents,
Here's 10 things it teaches us:
1โ agents are different from workflows: they are complete autonomous systems that perform tasks on your behalf. many applications use LLMs for workflows, but this is not an agent.
2โ use them for tricky stuff: complex decision making, dynamic rules, unstructured data
3โ core recipe: each agent has three main components: Model (the brain), Tools, Instructions on how to behave
4โ choose the right brain: set up evals to get a baseline performance, use a smart model to see what's possible, gradually downgrade the model for cost and speed
5โ tools are key: choose well-defined and tested tools. an agent needs tools to retrieve data and context, and take actions.
6โ instruction matters A LOT: be super clear telling the agent its goals, steps, and rules. Vague instructions = unpredictable agent. Be explicit.
7โ start simple, then scale: often a single agent with several tools is ok. don't jump to complex multi-agent systems immediately.
8โ if you use multi-agents: you can have a "manager" agent directing traffic to specialist agents, or have agents hand off tasks to each other.
9โ gaurdrails are a MUST: check user input for weird stuff, make sure the agent isn't about to do something risky, filter out private info, block harmful content. Don't let it run wild.
10โ build and plan for humans: start small, test, improve. always have a plan for when the agent gets stuck or is about to do something high-risk.