Agents
Teams
We can combine multiple Agents to form a team and tackle tasks as a cohesive unit. Here’s a simple example that uses a team of agents to write an article about the top stories on hackernews.
hn_team.py
Run the script to see the output.
How to build Agent Teams
- Add a
name
androle
parameter to the member Agents. - Create a Team Leader that can delegate tasks to team-members.
- Use your Agent team just like you would use a regular Agent.
Open-ended Agentic teams are great to play with, but are not reliable for real-world problems that require high reliability.
They need constant oversight and can get confused on very complex tasks. This drawback should improve as models get better (eagerly waiting for gpt-5o).
In our experience, Agent teams work best for simple tasks that require a small number of steps. We highly recommend using Workflows for production applications.
Was this page helpful?