{"slug": "one-agent-or-many-orchestrating-ai-agents-without-the-mess", "title": "One Agent or Many? Orchestrating AI Agents Without the Mess", "summary": "Maneshwar, building git-lrc, explains that a single agent with a growing toolbox should be maxed out before splitting into multiple agents. When splitting is necessary, two patterns emerge: a manager agent that coordinates specialists as tools, and a handoff pattern where peers transfer control. The advice helps developers orchestrate AI agents without unnecessary complexity.", "body_md": "*Hello, I'm Maneshwar. I'm building git-lrc, a Micro AI code reviewer that runs on every commit. It is free and source-available on Github. Star git-lrc to help devs discover the project. Do give it a try and share your feedback.*\n\nYesterday we landed on a definition: an agent is a system that independently completes a task on your behalf, built from three pieces (a model, tools, and instructions).\n\nNow the fun question.\n\nOnce you have one agent, how do you get it to actually *do* things in a loop? And when does it make sense to split the work across several agents instead of one?\n\nEvery agent needs the concept of a \"run.\"\n\nIt is usually a loop: the model runs, maybe calls a tool, looks at the result, and runs again, until some exit condition is reached.\n\nCommon exit conditions are a final structured output, an error, or hitting a max number of turns.\n\nThis while-loop is the heartbeat of every agent.\n\nIt is true for a single agent, and it is true for a network of them.\n\nThe only thing that changes in bigger systems is *who* gets to run on each turn.\n\nHere is the advice that saves people the most pain: **max out a single agent before you reach for many.**\n\nA single agent handles more than you would expect.\n\nNeed a new capability? Add a tool.\n\nEach tool widens what the agent can do without forcing you to coordinate multiple models, manage handoffs, or debug who-did-what.\n\nOne agent, one loop, a growing toolbox.\n\nThis keeps evaluation and maintenance simple, which matters a lot more than it sounds when you are debugging at 11pm.\n\nA neat trick for managing complexity without splitting: use a prompt template with variables instead of a pile of separate prompts.\n\n```\n\"\"\"You are a call center agent for {{company}}. You are talking to\n{{user_name}}, a member for {{tenure}}. Greet them, thank them for\nbeing a loyal customer, and help with their question.\"\"\"\n```\n\nNew use case? Update the variables, not the whole workflow.\n\nYou split when a single agent starts to buckle.\n\nTwo symptoms to watch for:\n\nWhen you do split, there are two patterns worth knowing.\n\nOne central agent (the \"manager\") coordinates specialists by calling them *as tools*.\n\nThe specialists do their thing and return results.\n\nThe manager stays in control and stitches everything together into one reply.\n\nThis fits any time you want a single agent holding the thread with the user.\n\nIn code, the specialists are literally passed in as tools:\n\n```\nmanager_agent = Agent(\n    name=\"manager_agent\",\n    instructions=\"You are a translation agent. Use the tools given \"\n                 \"to you to translate. If asked for multiple \"\n                 \"translations, call the relevant tools.\",\n    tools=[\n        spanish_agent.as_tool(tool_name=\"translate_to_spanish\",\n                              tool_description=\"Translate to Spanish\"),\n        french_agent.as_tool(tool_name=\"translate_to_french\",\n                             tool_description=\"Translate to French\"),\n        italian_agent.as_tool(tool_name=\"translate_to_italian\",\n                              tool_description=\"Translate to Italian\"),\n    ],\n)\n```\n\nHere there is no boss.\n\nAgents are peers, and one can *hand off* the whole conversation to another.\n\nA handoff is a one-way transfer: the new agent takes over execution and the current state, and the original agent steps out.\n\nThis is perfect for triage.\n\nA first agent figures out what the user wants, then passes them to the right specialist.\n\nThe triage agent reads the question, recognizes it is about an order, and hands off to the order management agent, which replies directly to the user.\n\n```\ntriage_agent = Agent(\n    name=\"Triage Agent\",\n    instructions=\"You are the first point of contact. Assess the \"\n                 \"customer's request and route it to the right \"\n                 \"specialized agent.\",\n    handoffs=[technical_support_agent, sales_assistant_agent,\n              order_management_agent],\n)\n```\n\nUse the **manager** when you want one voice talking to the user and combining results.\n\nUse **handoffs** when you are happy to let a specialist fully take the wheel.\n\nWhichever you pick, the same rule holds: keep components flexible, composable, and driven by clear prompts.\n\nYou can now run a single agent in a loop, and you know the two ways to scale to many when one is not enough.\n\nThere is one piece left, and it is the one that decides whether your agent is safe to put in front of real users: guardrails.\n\nIn part 3 lets look at layered defenses, prompt injection, PII, and knowing when to pull a human into the loop.\n\nDisclaimer: This article was written by me; AI was used to fix grammar and improve readability.\n\nAI agents write code fast. They also silently remove logic, change behavior, and introduce bugs — without telling you. You often find out in production.\n\ngit-lrc fixes this. It hooks into git commit and reviews every diff before it lands. 60-second setup. Completely free.\n\nAny feedback or contributors are welcome! It's online, source-available, and ready for anyone to use.\n\n⭐ Star it on GitHub:\n\n| [🇩🇰 Dansk](https://github.com/HexmosTech/git-lrc/readme/README.da.md) | [🇪🇸 Español](https://github.com/HexmosTech/git-lrc/readme/README.es.md) | [🇮🇷 Farsi](https://github.com/HexmosTech/git-lrc/readme/README.fa.md) | [🇫🇮 Suomi](https://github.com/HexmosTech/git-lrc/readme/README.fi.md) | [🇯🇵 日本語](https://github.com/HexmosTech/git-lrc/readme/README.ja.md) | [🇳🇴 Norsk](https://github.com/HexmosTech/git-lrc/readme/README.nn.md) | [🇵🇹 Português](https://github.com/HexmosTech/git-lrc/readme/README.pt.md) | [🇷🇺 Русский](https://github.com/HexmosTech/git-lrc/readme/README.ru.md) | [🇦🇱 Shqip](https://github.com/HexmosTech/git-lrc/readme/README.sq.md) | [🇨🇳 中文](https://github.com/HexmosTech/git-lrc/readme/README.zh.md) | [🇮🇳 हिन्दी](https://github.com/HexmosTech/git-lrc/readme/README.hi.md) |\n\nGenAI today is a **race car without brakes**. It accelerates fast -- you describe something, and large blocks of code appear instantly. But AI agents *silently break things*: they remove logic, relax constraints, introduce expensive cloud calls, leak credentials, and change behavior -- without telling you. You often find out in production.\n\n** git-lrc is your braking system.** It hooks into\n\n`git commit`\n\nand runs an AI review on every diff In short, git-lrc helps **Prevent Outages, Breaches, and Technical Debt Before They Happen**\n\n**At a glance:** [10 risk categories](https://github.com/HexmosTech/git-lrc#what-git-lrc-checks-for) · [100+ failure patterns tracked](https://github.com/HexmosTech/git-lrc#what-git-lrc-checks-for) · every commit…", "url": "https://wpnews.pro/news/one-agent-or-many-orchestrating-ai-agents-without-the-mess", "canonical_source": "https://dev.to/lovestaco/one-agent-or-many-orchestrating-ai-agents-without-the-mess-1g1l", "published_at": "2026-06-25 17:44:06+00:00", "updated_at": "2026-06-25 18:13:47.339564+00:00", "lang": "en", "topics": ["ai-agents", "developer-tools", "large-language-models"], "entities": ["Maneshwar", "git-lrc"], "alternates": {"html": "https://wpnews.pro/news/one-agent-or-many-orchestrating-ai-agents-without-the-mess", "markdown": "https://wpnews.pro/news/one-agent-or-many-orchestrating-ai-agents-without-the-mess.md", "text": "https://wpnews.pro/news/one-agent-or-many-orchestrating-ai-agents-without-the-mess.txt", "jsonld": "https://wpnews.pro/news/one-agent-or-many-orchestrating-ai-agents-without-the-mess.jsonld"}}