The OpenAI Agents SDK offers two ways to combine agents, and the choice is about who stays in control. With agent-as-tool, the calling agent stays in charge, calls the specialist like a function, and receives its answer back. With a handoff, the specialist takes over the conversation and the caller steps aside. Use agent-as-tool when the caller must combine several specialists’ answers into one reply; use a handoff when one specialist owns the rest of the conversation, such as a billing agent taking over a refund.
What you need
- A task that needs two agents, for example triage plus a specialist
- A decision about who owns the final reply: the caller or the specialist
- One test request that exercises the combination
Step 1: Decide who owns the final reply
If the caller must combine answers from several specialists, the caller owns the reply and the specialists are tools. If one specialist owns the rest of the conversation, that specialist takes over by handoff.
Step 2: Wire the chosen pattern only
Configure either agent-as-tool or a handoff for the pair, not both. Offering both lets the model choose, and it will choose inconsistently.
Step 3: Run the test request and check who answered
Run the test request and confirm the final reply came from the agent that should own it. If the wrong agent answered, the pattern is wired the wrong way round.
Worked example: synthetic pattern check
The table below is a synthetic example. It shows the expected result of the pattern choice; no agent was run.
| Task | Pattern | Final reply from |
|---|---|---|
| Combine search and price answers | Agent-as-tool | Caller |
| Refund handled by billing | Handoff | Billing agent |
| Two specialists, one summary | Agent-as-tool | Caller |
| Escalate to a human specialist | Handoff | Specialist |
Expected result (UNTESTED). the caller answers when it combines specialists, and the specialist answers when it takes over, in all four cases. This check was not run live; the table shows the expected result for the synthetic example.
Limits
- Agent-as-tool keeps control with the caller, so the caller pays for the extra coordination.
- A handoff gives up control, so the caller cannot combine the specialist’s answer with anything else.
- Offering both patterns for the same pair makes the choice inconsistent.
- The pattern is about control, not capability: either pattern can call the same tools.
