ModelRefs / Agent as Tool — AI Glossary

Agent as Tool — AI Glossary

A design pattern exposing a full AI agent as a callable tool for another agent, enabling hierarchical agent composition.

Overview

Agent-as-tool enables parent agents to delegate to specialized child agents by calling them as tool invocations. The child agent handles a complete sub-task and returns its result. Used in Claude's computer use (shell agent callable from a parent), LangGraph subgraphs, and CrewAI agent delegation. Enables modular, testable agent hierarchies.

Reference details

Topicagents
Also known asnested agent, hierarchical agent
Last reviewed2026-06-24

How it works

  1. A child agent is registered in the parent's tool schema, so from the parent's side invoking it is indistinguishable from calling a function: a name, a described purpose and typed arguments.
  2. That typed boundary is the pattern's contribution. The parent is forced to state the sub-task explicitly rather than sharing a conversation, which makes the interface reviewable and the child independently testable.
  3. The child runs its own loop with its own tools and context, and returns a structured result that the parent receives as a tool message.
  4. Hierarchies compose, since a child may expose its own children the same way — which is how a deep agent tree is built without any component knowing more than its immediate neighbours.
  5. The crucial asymmetry with a real tool is cost. A function's cost is bounded and known; an agent's is variable and unbounded, so a parent's own budget does not constrain what happens inside the call.
  6. Each child therefore needs its own stopping conditions and its own budget, because nothing in the tool abstraction supplies them and the parent cannot see past the boundary it declared.

Example: Why a parent's budget does not bound the tree

A parent agent is given a 50,000-token budget — a reasonable control, and a complete illusion if its tools are agents. Suppose it calls three agent-tools, each of which runs its own loop and consumes 80,000 tokens before returning. The tree has spent 3 x 80,000 = 240,000 tokens, which is 240,000 / 50,000 = 4.8x the parent's stated limit, and the parent's own accounting is untouched because from its side three tool calls returned three short results. Add a second level — each child calling two grandchildren at 80,000 each — and the total becomes 3 x (80,000 + 2 x 80,000) = 3 x 240,000 = 720,000, or 14.4x the parent's budget, from a configuration that looks like one agent with three tools. The fix is not a bigger parent budget but a budget per node, with the tree's total bounded by construction: three children at 20,000 each caps the subtree at 60,000 regardless of what they do inside. Any agent hierarchy without per-node budgets has no cost ceiling, and the first time that matters is a billing surprise rather than an error.

Commonly confused with

An agent exposed as a tool is still an agent, and the tool framing is a convenience that hides every property that makes agents different: non-determinism, unbounded cost, the ability to loop, and the ability to return a confident summary of work it did not do. Compared with the handoff pattern, the difference is control flow — here the parent retains control and receives a value, whereas a handoff transfers control and returns nothing to the caller. Compared with a subagent in the general sense, this is specifically the variant where the boundary is the tool schema, which is what makes the sub-task declaration explicit rather than conversational.

When to use it

Reach for it when:

  • Hierarchical decomposition where each level should be independently testable against a declared interface.
  • Sub-tasks needing a different tool set or permission scope, where the boundary is a safety property.
  • Reusing a capability across several parents, since a typed interface is what makes the child a component.
  • With per-node budgets and stopping conditions, without which the hierarchy has no cost ceiling.

Reach for something else when:

  • Without a budget on each child, where the parent's limit bounds nothing and the tree's cost is unbounded.
  • For sub-tasks needing the parent's full conversation, since the typed boundary transmits only what the arguments state.
  • Short deterministic operations, which should be functions — an agent adds non-determinism and cost for nothing.
  • Deep trees without per-level observability, since a failure three levels down surfaces as a vague result at the top.

Continue your research

Use these connected ModelRefs sections to compare alternatives, inspect implementation paths, and review the evidence and governance boundaries relevant to Agent as Tool — AI Glossary.

Frequently asked questions

What is Agent as Tool?

A design pattern exposing a full AI agent as a callable tool for another agent, enabling hierarchical agent composition.

Is Agent as Tool the same as nested agent?

Yes — nested agent, hierarchical agent are common aliases for Agent as Tool.

What concepts are related to Agent as Tool?

Closely related concepts include subagent, worker agent, tool agent.