You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/labs/deep-agents/built-in-components.mdx
+32Lines changed: 32 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -58,3 +58,35 @@ Built-in support for calling specialized sub-agents with the following:
58
58
-**Tool access control**: Subagents can have different tool sets
59
59
60
60
A general-purpose sub-agent with the same instructions and tools as the main agent is always available.
61
+
62
+
## MCP
63
+
64
+
The `deepagents` library can be ran with MCP tools. This can be achieved by using the [Langchain MCP Adapter library](https://github.com/langchain-ai/langchain-mcp-adapters).
65
+
66
+
For example:
67
+
68
+
```python
69
+
# pip install langchain-mcp-adapters
70
+
71
+
import asyncio
72
+
from langchain_mcp_adapters.client import MultiServerMCPClient
73
+
from deepagents import create_deep_agent
74
+
75
+
asyncdefmain():
76
+
# Collect MCP tools
77
+
mcp_client = MultiServerMCPClient(...)
78
+
mcp_tools =await mcp_client.get_tools()
79
+
80
+
# Create agent
81
+
agent = create_deep_agent(tools=mcp_tools, ....)
82
+
83
+
# Stream the agent
84
+
asyncfor chunk in agent.astream(
85
+
{"messages": [{"role": "user", "content": "what is langgraph?"}]},
Custom models are only supported in the Python implementation.
99
+
100
+
</Note>
101
+
102
+
By default, `deepagents` uses `"claude-sonnet-4-20250514"`. You can customize this by passing any [LangChain model object](https://python.langchain.com/docs/integrations/chat/).
103
+
104
+
For example, use OpenAI's `gpt-oss` model via Ollama:
0 commit comments