Agents-as-Tools

Call a specialist like any other tool.

One orchestrating agent calls other agents exactly like tools, hiding their internal logic and coordination behind a standard tool interface.

Level
03 · Multi-Agent
Also known as
Agent Tools, Callable Agents, Specialist-as-Tool
Trade-off
Excellent encapsulation is achieved against limited independence for the sub-agents.
Native in
AWS Strands, OpenAI Agents SDK, LangGraph, Microsoft Agent Framework, Google ADK
The mental model

A shape you can draw on a napkin.

A caller agent invokes a tool-agent through a standard tool interface. The embedded-agent semantics are hidden behind the call.

CallerTool-Agent
Walk it through

A real run, step by step.

Task“Plan three days in Lisbon from 12 May, flying from Berlin.” The orchestrator has two tools, and each tool is an agent:
Illustrative run.
CallCaller seesInside the tool
1flight_expert(…) returns one line: flight, time, priceFour model calls, three searches, a fare comparison
2hotel_expert(…) returns one line: hotel, nights, priceThree model calls, two searches
3Writes the itinerary and answers the userNothing. No tool is called
What this shows: the orchestrator's context holds two short results, not the seven model calls behind them. It keeps control and answers the user itself, which is the difference to a Handoff. The price: a tool agent cannot ask the user a question, and when its answer is wrong the reasoning behind it is out of sight.
In code

The pattern in code.

Plain Pythonpython
def as_tool(agent, name, description):
    def tool(question: str) -> str:
        # the inner steps never reach the caller
        return agent.run(question).final_answer
    tool.__name__, tool.__doc__ = name, description
    return tool

orchestrator = Agent(
    instructions="Plan the trip. You answer the user yourself.",
    tools=[as_tool(flight_agent, "flight_expert", "Finds and compares flights."),
           as_tool(hotel_agent, "hotel_expert", "Finds hotels for given dates.")],
)
Fit

Use it, or not.

When to reach for it

  • Specialists must be encapsulated.
  • The main agent must retain absolute control.
  • Security boundaries must be strictly separated.

When it backfires

  • Equal cooperation is needed.
  • Specialists require long-term autonomy.
  • Interface contracts are unstable.
Pitfalls

Two ways this pattern will hurt you.

Tool-agent latency is invisible to the caller

The caller treats the tool-agent as instant, but it runs a full internal loop. Timeouts fire before the tool-agent finishes.

Countermeasure

Expose expected latency in the tool schema. Use async callbacks or streaming for long-running tool-agents.

Tool-agent failures surface as generic tool errors

The tool-agent throws an internal exception, but the caller only sees 'Tool execution failed.' Debugging requires tool-agent logs.

Countermeasure

Return structured error payloads with a trace_id. Route the caller to a diagnostic node that can fetch and display the full trace.

Threat exposure

What this pattern exposes

Adopting this pattern opens these attack surfaces. Each links to its entry in the threat model.

Full threat model →
Framework support

Where Agents-as-Tools is native.

Search

Search patterns, frameworks, and pages.