From ac328c3fd8f6b246628bf97b19c59c8bd7cfee2c Mon Sep 17 00:00:00 2001 From: Vedant Panchal Date: Tue, 24 Jun 2025 17:14:32 +0530 Subject: [PATCH] [fix] snippet for Agents as a Tool (#5181) snippet had a missing decorator that might lead the user to confuse whether it is really a tool --- docs/docs/concepts/multi_agent.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/docs/concepts/multi_agent.md b/docs/docs/concepts/multi_agent.md index 16cf5e2b6..58f872284 100644 --- a/docs/docs/concepts/multi_agent.md +++ b/docs/docs/concepts/multi_agent.md @@ -87,6 +87,7 @@ One of the most common agent types is a [tool-calling agent](../agents/overview. ```python from langchain_core.tools import tool +@tool def transfer_to_bob(): """Transfer to bob.""" return Command( @@ -414,4 +415,4 @@ There are two high-level approaches to achieve that: An agent might need to have a different state schema from the rest of the agents. For example, a search agent might only need to keep track of queries and retrieved documents. There are two ways to achieve this in LangGraph: - Define [subgraph](./subgraphs.md) agents with a separate state schema. If there are no shared state keys (channels) between the subgraph and the parent graph, it’s important to [add input / output transformations](../how-tos/subgraph.ipynb#different-state-schemas) so that the parent graph knows how to communicate with the subgraphs. -- Define agent node functions with a [private input state schema](../how-tos/graph-api.ipynb/#pass-private-state-between-nodes) that is distinct from the overall graph state schema. This allows passing information that is only needed for executing that particular agent. \ No newline at end of file +- Define agent node functions with a [private input state schema](../how-tos/graph-api.ipynb/#pass-private-state-between-nodes) that is distinct from the overall graph state schema. This allows passing information that is only needed for executing that particular agent.