Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/langsmith/managed-deep-agents-deploy.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Credentials must belong to the target region. Set `LANGSMITH_ENDPOINT` before th
For more information on regions, see the [Regions FAQ](/langsmith/regions-faq).

<Note>
LangSmith managed tools are available in GCP US only.
[Tool Gateway](/langsmith/tool-gateway) tools, including built-in [web search](/langsmith/managed-deep-agents-search), are available only in the regions Tool Gateway supports.
</Note>

## Select a BYOC data plane
Expand Down
52 changes: 49 additions & 3 deletions src/langsmith/managed-deep-agents-mcp-connectors.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import ManagedDeepAgentsPublicBetaNote from '/snippets/langsmith/managed-deep-ag

Connect a managed deep agent to remote [Model Context Protocol (MCP)](/oss/deepagents/mcp) servers to add their tools to the agent. Managed Deep Agents creates the MCP client and loads the tools.

Most remote MCP servers require authentication. A [connection](/langsmith/managed-deep-agents-connections) supplies it, and declaring the connection as user-owned makes each caller authorize their own account.
Most remote MCP servers require authentication. A [connection](/langsmith/managed-deep-agents-connections) supplies it, and declaring the connection as user-owned makes each caller authorize their own account. For tools your workspace already manages in [Tool Gateway](/langsmith/tool-gateway), see [Use Tool Gateway tools](#use-tool-gateway-tools).

<ManagedDeepAgentsPublicBetaNote />

Expand Down Expand Up @@ -134,9 +134,55 @@ If an MCP server requires credentials, declare a connection on the server config

For create modes, owners, and runtime authorization, see [Manage connections](/langsmith/managed-deep-agents-connections).

For a Tool Gateway server or tool kit, set `auth` instead of a connection. See [Use Tool Gateway tools](#use-tool-gateway-tools).

</Step>
</Steps>

## Use Tool Gateway tools

[Tool Gateway](/langsmith/tool-gateway) serves the tools and connected accounts your LangSmith workspace manages. Declare a Tool Gateway kit or server with `"auth": "langsmith"`, and the agent calls its tools with the credentials of the person running the agent, or of the agent in an agent-owned schedule, with no connection to create.

<Note>
Using Tool Gateway with Managed Deep Agents requires `managed-deepagents` version 0.10.5 or later, in both the Python and TypeScript packages.
</Note>

For example, to give the agent every tool the caller can use, declare the [me kit](/langsmith/tool-gateway-tool-kits#use-the-me-kit) in [search mode](/langsmith/tool-gateway-clients#use-search-mode-for-large-kits):

:::python
```python tools/mcp.py
from managed_deepagents import define_mcp

mcp = define_mcp(
servers={
"tool_gateway": {
"transport": "http",
"url": "https://api.smith.langchain.com/v1/managed-tools/kits/me/mcp?mode=search",
"auth": "langsmith",
},
},
)
```
:::

:::js
```ts tools/mcp.ts
import { defineMcp } from "managed-deepagents";

export const mcp = defineMcp({
servers: {
tool_gateway: {
transport: "http",
url: "https://api.smith.langchain.com/v1/managed-tools/kits/me/mcp?mode=search",
auth: "langsmith",
},
},
});
```
:::

The URL must be on your deployment's LangSmith API origin. For a saved kit, profiles, version requirements, and local development, see [Connect Managed Deep Agents to Tool Gateway](/langsmith/tool-gateway-clients#managed-deep-agents).

## Configure MCP servers

Each server supports the following core options:
Expand All @@ -146,6 +192,7 @@ Each server supports the following core options:
| `transport` | Required. Use `http` for Streamable HTTP or `sse` for legacy SSE. |
| `url` | Required. The remote MCP endpoint URL. |
| `headers` | Static headers to send to the server. |
| `auth` | Set to `"langsmith"` for a [Tool Gateway](#use-tool-gateway-tools) server or kit. Cannot be combined with `connection`. Requires `managed-deepagents` 0.10.5 or later. |
| `include_tools` / `includeTools` | Raw MCP tool names to expose. |
| `exclude_tools` / `excludeTools` | Raw MCP tool names to hide. |
| `default_tool_timeout` / `defaultToolTimeout` | Timeout for each tool call, in seconds for Python and milliseconds for TypeScript. |
Expand All @@ -158,15 +205,13 @@ The MCP definition also accepts these options:
| Option | Default | Description |
| --- | --- | --- |
| `throw_on_load_error` | `True` | Fail loading instead of starting with a partial tool set. |
| `jit_auth` | `False` | For LangSmith managed-tools URLs only. When `True`, the model also gets tools for providers the caller has not connected. The first call to one of those tools asks the user to connect. When `False`, the run asks for every missing connection before it starts. Requires `managed-deepagents` 0.10.2 or later. |
:::

:::js
| Option | Default | Description |
| --- | --- | --- |
| `prefixToolNameWithServerName` | `true` | Prefix each tool with `{server}_`. |
| `throwOnLoadError` | `true` | Fail loading instead of starting with a partial tool set. |
| `jitAuth` | `false` | For LangSmith managed-tools URLs only. When `true`, the model also gets tools for providers the caller has not connected. The first call to one of those tools asks the user to connect. When `false`, the run asks for every missing connection before it starts. Requires `managed-deepagents` 0.10.2 or later. |
:::

## Deployment
Expand All @@ -178,6 +223,7 @@ The MCP definition also accepts these options:
| Concept | Kind | How it reaches the agent |
| --- | --- | --- |
| **MCP servers** | Managed configuration | Declared in the MCP module under `tools/`; no import into the agent entry |
| **[Tool Gateway](/langsmith/tool-gateway)** | Workspace tools | Declared as an MCP server with `auth: "langsmith"` |
| **[MCP endpoint](/langsmith/managed-deep-agents-mcp-endpoint)** | Deployment API | Exposes the agent as a tool to MCP clients |
| **[Authored tools](/langsmith/managed-deep-agents-tools)** | Application code | Import and pass in the agent definition |
| **[Channels](/langsmith/managed-deep-agents-channels)** | Managed configuration | Receive external messages that start agent runs and deliver responses |
Expand Down
9 changes: 8 additions & 1 deletion src/langsmith/managed-deep-agents-search.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,17 @@ LangSmith manages the search infrastructure, so you can add search without hosti
<Note>
Built-in search is available only on LangSmith Plus and Startup plans. Usage is free during private beta.

Built-in search runs on LangSmith managed tools, which are available in GCP US only. [BYOC](/langsmith/byoc) data planes cannot use it.
Built-in search uses [Tool Gateway](/langsmith/tool-gateway) endpoints, so it is available only in the regions Tool Gateway supports. [BYOC](/langsmith/byoc) data planes cannot use it.
</Note>

## Before you begin

You need an existing [Managed Deep Agents project](/langsmith/managed-deep-agents-quickstart), your LangSmith workspace ID, and a personal LangSmith API key for use in Studio.

<Note>
Built-in search with `"auth": "langsmith"` requires `managed-deepagents` version 0.10.5 or later.
</Note>

## Add Parallel search

To add Parallel search to your agent:
Expand Down Expand Up @@ -56,6 +60,7 @@ mcp = define_mcp(
"Parallel": {
"transport": "http",
"url": "https://api.smith.langchain.com/v1/managed-tools/servers/parallel/mcp",
"auth": "langsmith",
Comment thread
robin-agent[bot] marked this conversation as resolved.
Resolved
},
},
)
Expand All @@ -72,6 +77,7 @@ export const mcp = defineMcp({
"Parallel": {
transport: "http",
url: "https://api.smith.langchain.com/v1/managed-tools/servers/parallel/mcp",
auth: "langsmith",
},
},
});
Expand All @@ -88,4 +94,5 @@ Your use of this integration must comply with Parallel's terms of service, inclu
## See also

- [Connect to MCP servers](/langsmith/managed-deep-agents-mcp-connectors)
- [Use Tool Gateway tools](/langsmith/managed-deep-agents-mcp-connectors#use-tool-gateway-tools)
- [Add custom tools](/langsmith/managed-deep-agents-tools)
Loading