Multi-agent teams using the OpenAI API: patterns from running 9 agents that ship products autonomously #3335
avoronov-explyt
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
We built a team of 9 AI agents (PO, BA, Designer, SM, Backend, Frontend, QA, DevOps, Manager) that uses the OpenAI API to autonomously build and ship software products. Here are patterns that worked:
1. Structured outputs as the contract layer
Every agent-to-agent handoff uses structured outputs (JSON mode / function calling). This turned out to be more important than any prompting trick — structured handoffs eliminated 80% of our integration bugs between agents.
2. Temperature per role
Creative roles (Designer, PO) run at 0.7-0.9. Implementation roles (Backend, Frontend, QA) run at 0.0-0.1. The Manager agent runs at 0.0 for routing decisions. This simple tuning dramatically reduced hallucinations in code-generation tasks.
3. Token budget per agent per task
We assign a token budget to each agent per task (e.g., Backend gets 8K tokens per feature). When the budget runs out, the agent must hand off — even if unfinished. This prevents the common failure mode of one agent burning the entire context window.
4. GPT-4 for orchestration, GPT-4o-mini for execution
Not every agent needs the most capable model. Our Manager and PO use GPT-4; implementation agents use GPT-4o-mini. This cut costs by ~60% with minimal quality impact.
5. The Manager pattern
A single dedicated agent that does NO implementation work — only task routing, blocker resolution, and priority enforcement. This was the highest-ROI architectural decision we made.
What patterns have others found for multi-agent coordination with OpenAI models? Especially interested in cost optimization strategies for teams running at scale.
Beta Was this translation helpful? Give feedback.
All reactions