# When a Security Task Needs More Than One Agent

Use one agent until it fails, then split by privilege or by tool overlap. OpenAI says some agents manage more than 15 distinct tools while others struggle with fewer than 10 overlapping ones. A worked 14-tool split follows. Read 19 Nov 2026.

## Two ways publishers count the patterns

Publishers count differently. OpenAI's [practical guide](https://cdn.openai.com/business-guides-and-resources/a-practical-guide-to-building-agents.pdf) names two categories: manager, where a central agent coordinates specialists through tool calls, and decentralized, where agents "hand off" to one another as peers. LangChain's [multi-agent docs](https://docs.langchain.com/oss/python/langchain/multi-agent) name five: subagents, handoffs, skills, router and custom workflow. The mapping below is this site's reading.

Quotes from LangChain docs, read 19 Nov 2026; the first column is this site's mapping.

| OpenAI category | LangChain pattern | How control moves |
|---|---|---|
| Manager | Subagents | "All routing passes through the main agent" (LangChain) |
| Decentralized | Handoffs | Tool calls change which agent is active, and state travels with it |
| Not a separate category | Skills | "Specialized prompts and knowledge loaded on-demand" while one agent stays in control |
| Not a separate category | Router | A routing step classifies the input and sends it to one or more agents; results are combined |
| Not a separate category | Custom workflow | Fixed code mixes deterministic steps with agent steps |

The case study of one security team's multi-agent design, with its cost-saving model tiers, is on [orchestration and subagents](/agent-harness/orchestration-and-subagents/) and is not repeated here.

## The two reasons OpenAI gives for splitting

OpenAI's recommendation: "maximize a single agent's capabilities first", because more agents "can introduce additional complexity and overhead". It gives two signals to divide. First, complicated instructions: when prompts hold many if-then-else branches and templates get hard to scale, divide each logical segment. Second, tool overload: "The issue isn't solely the number of tools, but their similarity or overlap. Some implementations successfully manage more than 15 well-defined, distinct tools while others struggle with fewer than 10 overlapping tools." Try clearer tool names, parameters and descriptions first, and split only if that "doesn't improve performance".

## Worked split: a disclosure-response agent with 14 tools

Take an agent that handles a new advisory such as OpenSSH CVE-2026-123158, using the sources in the [new disclosure response](/use-cases/new-disclosure-response/) use case. This tool inventory is invented for the example. The 14 tools fall into three groups, and the groups differ in overlap and in privilege.

Invented tool inventory for the worked example.

| Group | Tools | Overlap | Credential |
|---|---|---|---|
| Advisory readers (5) | read_vendor_advisory, read_distro_advisory, read_nvd_record, read_kev_entry, read_exploitation_feed | High: all return advisory text with similar parameters | None needed beyond internet read |
| Host and inventory readers (4) | get_package_version, get_sshd_config, list_accounts_with_hash_state, query_asset_inventory | Medium: all answer 'what is on this host' | Read-only scanner role |
| Writers (5) | create_ticket, comment_ticket, close_finding, trigger_patch_job, apply_config_change | Low: each does a different job | Ticket and change roles; apply_config_change is high risk |

By OpenAI's yardstick, 14 is below the 15 distinct tools some agents manage, but the five advisory readers overlap heavily, which is the pattern the guide warns about. Step one is to merge them: one read_advisory tool with a source parameter, giving 10 tools. If tool selection errors persist on your own findings after that, split. The security reason to split is different from the quality reason: privilege. Keep the readers in a read-only agent and put the five writers behind a second agent with its own credential, so a prompt injection hidden in advisory text cannot make the reader call apply_config_change, because the reader holds no such tool. That limits what injected text can call. It does not stop injected text from being copied into what the reader hands over, which is the next section. The credential split is the control the [tool permissions](/evaluation-checklist/tool-permissions-and-identity/) page asks for.

Cost follows the pattern chosen. LangChain's test asks an agent to compare three languages, each with about 2,000 tokens of documentation. Subagents took 5 model calls and about 9K tokens, a router 5 calls and about 9K, skills 3 calls and about 15K because every later call carries all the loaded text, and handoffs 7 or more calls and about 14K or more because they run in sequence. Reading three advisories of similar size is the same shape of task, so independent readers in parallel are cheaper in tokens than one agent that loads all three. Those are LangChain's figures for its example (checked against the docs page on 19 Nov 2026), not measurements of a security task; the next paragraphs price this example's split, and the [cost guide](/guides/cost-of-running-security-agents/) prices your own.

What the split costs in this example, with constructed token counts and a published price. Assumptions: the system prompt and request are 1,000 tokens; each tool definition is 250 tokens; each advisory result is 2,000 tokens (LangChain's document size) and each host result 200; each model output is 150 tokens; the ticket result is 100. The task is one advisory: read three advisory sources, read four host facts, open one ticket. The single-agent baseline is the 10-tool agent left after the merge in step one. The split gives the reader 5 tools (read_advisory and the four host readers) and the writer the 5 writers. Prices are $2 per million input tokens and $10 per million output tokens, the claude-sonnet-5-5 prices used on the [model choice page](/guides/choosing-a-model-for-a-security-agent/).

Constructed counts. Each call's input is the fixed part (prompt plus tool definitions) plus the history so far. Cost = input x $2/1M + output x $10/1M. The reader's third call writes the 300-token fact sheet.

| Run | Model calls | Input tokens | Output tokens | Token cost |
|---|---|---|---|---|
| One agent, 10 tools | 4 | 34,600 (3,500 + 9,650 + 10,600 + 10,850) | 600 | $0.0752 |
| Reader, 5 tools | 3 | 20,000 (2,250 + 8,400 + 9,350) | 600 | $0.0460 |
| Writer, 5 tools, fact sheet of 300 tokens | 2 | 5,350 (2,550 + 2,800) | 300 | $0.0137 |
| Reader plus writer | 5 | 25,350 | 900 | $0.0597 |

The split makes one more call and costs about 21% less in tokens ($0.0597 against $0.0752), because each agent carries a shorter tool list and the writer never carries the advisory text. The saving depends on these assumptions and shrinks as tool definitions get smaller. The larger cost is the person who confirms the fact sheet: at 5 minutes and $100 an hour that is $8.33, about 140 times the token cost of the whole split run. Budget for the check, not the tokens.

## How the reader's output reaches the writer

The split protects only if the channel between the two agents is narrow. If the reader passes its free-text summary to the writer, an instruction planted in an advisory travels with it and the writer, which holds the write tools, acts on it. The channel is a fact sheet with a fixed schema that code validates before the writer sees it. The [guardrails page](/guides/ai-agent-guardrails/) describes the pattern for a Node.js CVE; this is the sheet for the OpenSSH example.

Fact sheet schema for the 14-tool example; the fields and checks are this site's design.

| Field | Allowed value, checked by code | Why |
|---|---|---|
| cve_id | Matches CVE-YYYY-NNNN with four or more digits, and exists in the NVD record the reader also fetched | A planted ID fails the match |
| affected_versions | A list of version strings in the project's own version format, each present in the vendor advisory text | No free text |
| fixed_version | One version string from the same format, present in the vendor release notes | The value the writer will cite in a ticket |
| source_urls | Hosts on a short allowlist (the vendor, NVD, CISA) | The writer opens no other address |
| kev_listed | true or false, from the CISA catalog fetch, not from advisory text | Set by a tool result, not by prose |
| notes | Not in the schema | Free text is the injection path, so the writer never receives it |

The handover leaves its own record, written by the code that validates the sheet and kept with the run logs. Fields: the SHA-256 hash of the sheet as the writer received it, the schema version, the reader's run ID and the writer's run ID, the name of the person who compared the sheet with the vendor advisory, the time of that confirmation, and the result (confirmed, edited or rejected, with the edit). If the writer's change record later cites a fixed version, the hash ties it to one sheet and the confirmer to one decision.

Schema checks do not make the content true. Injected text can still push a wrong but well-formed value into a field, such as a lower fixed version that makes a vulnerable host look patched. Two controls cover that. The version and host values must also appear in the sources the code fetched, and a person compares the sheet with the vendor advisory before the writer starts. The NCSC's grading of read-only collection as potency 2 carries the same warning: autonomous collection with web access introduces "a risk of exfiltration", so the reader's fetch tool is restricted to the allowlist too ([NCSC, 21 September 2026](https://www.ncsc.gov.uk/blogs/one-does-not-simply-defend-agentically)).

## When splitting is wrong

- The task is one step with one specialist. LangChain's one-shot count is 4 model calls for subagents against 3 for the other patterns, so the manager adds a call for nothing.
- The steps depend on each other and must run in order. Handoffs run sequentially and cannot use parallel calls.
- The tool set is small and distinct. OpenAI's signal is overlap, not count.
- You cannot test the split. Run the multi-agent version and the single agent on the same set of your own findings, as in [evaluating on your findings](/guides/evaluate-a-security-agent-on-your-findings/). Without that baseline the extra agent is unproven.
- The approval would end up in the wrong place. OpenAI's SDK surfaces an approval raised inside a nested agent on the outer run, so confirm the approver sees the nested action; the design of that screen is in [human approval design](/guides/human-approval-design/).

Each added agent is another identity, another tool list and another place for a wrong value to enter. Give each its own credential narrower than a single agent's would be. The general log fields are in [what to keep in agent run logs](/guides/agent-run-logs-what-to-keep/). The staged rollout that a split like this goes through is in [how to use agentic AI in cybersecurity](/guides/how-to-use-agentic-ai-in-cybersecurity/).

## Sources

- [OpenAI, A practical guide to building agents, When to consider creating multiple agents](https://cdn.openai.com/business-guides-and-resources/a-practical-guide-to-building-agents.pdf), read 19 Nov 2026
- [LangChain docs, Multi-agent, patterns and performance comparison](https://docs.langchain.com/oss/python/langchain/multi-agent), read 19 Nov 2026
- [OpenAI Agents SDK, Human-in-the-loop (nested agents)](https://openai.github.io/openai-agents-python/human_in_the_loop/), read 19 Nov 2026
- [OpenSSH 10.6p2 release notes (CVE-2026-123158)](https://www.openssh.org/releasenotes.html#10.6p2), read 19 Nov 2026
- [UK NCSC, One does not simply defend agentically (21 September 2026)](https://www.ncsc.gov.uk/blogs/one-does-not-simply-defend-agentically), read 19 Nov 2026

Last reviewed 19 Nov 2026

Canonical: https://agenticaiincybersecurity.com/guides/multi-agent-systems-in-security-work/
