New Tool Radar

AI Agents & Automation

How to Use a Specialist Agent as a Tool Inside a Manager Agent in the OpenAI Agents SDK

Expose a specialist agent as a tool on a manager agent so the manager consults it and keeps control of the conversation.

Schematic diagram with three steps: Create the specialist, Expose it as a tool, then Test a consult.

A handoff transfers the conversation, but an agent as a tool reports back: the main agent calls it, gets the result, and keeps the floor. Use an agent as a tool when the main agent should stay in charge and merely consult a specialist for a bounded subtask.

Before you start

You need a working OpenAI Agents SDK manager agent and a specialist agent that does one bounded job. Write the specialist job in one sentence, because that sentence becomes the tool description the manager reads.

Expose the specialist with as_tool

Call as_tool on the specialist agent with a tool name and a tool description, and add the result to the manager agent tools list. The description should state the one job and the input it needs. The manager model sees the specialist as one function among its tools, alongside any hosted tools and MCP servers.

Test with a question that needs the specialist

Ask the manager a question that needs the specialist job and check the run calls the specialist tool once, then the manager replies using the result. Then ask a question that does not need it and check the tool is not called.

Worked example: Manager and refund specialist for a fictional shop

Maple Shop is a fictional online shop. Its manager agent consults a refund specialist as a tool. The table shows the split.

Agent Job Calls
Manager Reads the question and owns the reply Refund specialist, when a refund is asked for
Refund specialist Checks the refund rules for one order None

Expected result (UNTESTED): the refund question produces one specialist tool call and a manager reply using the result, while a general question gets no tool call. We checked the OpenAI Agents SDK guides, which describe agents as tools and how they differ from handoffs, but we did not run the agents on this machine.

Limits

A specialist used as a tool costs a model call per consultation, and a vague tool description makes the manager call it for everything. Keep the specialist job narrow and its output short, so the manager has little to misread.

Sources

See all