curl --request PATCH \
--url https://api.smith.langchain.com/v1/deepagents/agents/{agent_id} \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"description": "Research assistant that searches the web, reads URLs, and summarizes sources.",
"instructions": "You are a careful research assistant. Search for sources, read relevant pages, keep notes, and return concise answers with citations.",
"tools": {
"tools": [
{
"name": "tavily_web_search",
"mcp_server_url": "https://tools.langchain.com",
"mcp_server_name": "Fleet",
"display_name": "tavily_web_search"
},
{
"name": "read_url_content",
"mcp_server_url": "https://tools.langchain.com",
"mcp_server_name": "Fleet",
"display_name": "read_url_content"
}
],
"interrupt_config": {
"https://tools.langchain.com::tavily_web_search::Fleet": true,
"https://tools.langchain.com::read_url_content::Fleet": false
}
}
}
'import requests
url = "https://api.smith.langchain.com/v1/deepagents/agents/{agent_id}"
payload = {
"description": "Research assistant that searches the web, reads URLs, and summarizes sources.",
"instructions": "You are a careful research assistant. Search for sources, read relevant pages, keep notes, and return concise answers with citations.",
"tools": {
"tools": [
{
"name": "tavily_web_search",
"mcp_server_url": "https://tools.langchain.com",
"mcp_server_name": "Fleet",
"display_name": "tavily_web_search"
},
{
"name": "read_url_content",
"mcp_server_url": "https://tools.langchain.com",
"mcp_server_name": "Fleet",
"display_name": "read_url_content"
}
],
"interrupt_config": {
"https://tools.langchain.com::tavily_web_search::Fleet": True,
"https://tools.langchain.com::read_url_content::Fleet": False
}
}
}
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
description: 'Research assistant that searches the web, reads URLs, and summarizes sources.',
instructions: 'You are a careful research assistant. Search for sources, read relevant pages, keep notes, and return concise answers with citations.',
tools: {
tools: [
{
name: 'tavily_web_search',
mcp_server_url: 'https://tools.langchain.com',
mcp_server_name: 'Fleet',
display_name: 'tavily_web_search'
},
{
name: 'read_url_content',
mcp_server_url: 'https://tools.langchain.com',
mcp_server_name: 'Fleet',
display_name: 'read_url_content'
}
],
interrupt_config: {
'https://tools.langchain.com::tavily_web_search::Fleet': true,
'https://tools.langchain.com::read_url_content::Fleet': false
}
}
})
};
fetch('https://api.smith.langchain.com/v1/deepagents/agents/{agent_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.smith.langchain.com/v1/deepagents/agents/{agent_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'description' => 'Research assistant that searches the web, reads URLs, and summarizes sources.',
'instructions' => 'You are a careful research assistant. Search for sources, read relevant pages, keep notes, and return concise answers with citations.',
'tools' => [
'tools' => [
[
'name' => 'tavily_web_search',
'mcp_server_url' => 'https://tools.langchain.com',
'mcp_server_name' => 'Fleet',
'display_name' => 'tavily_web_search'
],
[
'name' => 'read_url_content',
'mcp_server_url' => 'https://tools.langchain.com',
'mcp_server_name' => 'Fleet',
'display_name' => 'read_url_content'
]
],
'interrupt_config' => [
'https://tools.langchain.com::tavily_web_search::Fleet' => true,
'https://tools.langchain.com::read_url_content::Fleet' => false
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Api-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.smith.langchain.com/v1/deepagents/agents/{agent_id}"
payload := strings.NewReader("{\n \"description\": \"Research assistant that searches the web, reads URLs, and summarizes sources.\",\n \"instructions\": \"You are a careful research assistant. Search for sources, read relevant pages, keep notes, and return concise answers with citations.\",\n \"tools\": {\n \"tools\": [\n {\n \"name\": \"tavily_web_search\",\n \"mcp_server_url\": \"https://tools.langchain.com\",\n \"mcp_server_name\": \"Fleet\",\n \"display_name\": \"tavily_web_search\"\n },\n {\n \"name\": \"read_url_content\",\n \"mcp_server_url\": \"https://tools.langchain.com\",\n \"mcp_server_name\": \"Fleet\",\n \"display_name\": \"read_url_content\"\n }\n ],\n \"interrupt_config\": {\n \"https://tools.langchain.com::tavily_web_search::Fleet\": true,\n \"https://tools.langchain.com::read_url_content::Fleet\": false\n }\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-Api-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.smith.langchain.com/v1/deepagents/agents/{agent_id}")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"description\": \"Research assistant that searches the web, reads URLs, and summarizes sources.\",\n \"instructions\": \"You are a careful research assistant. Search for sources, read relevant pages, keep notes, and return concise answers with citations.\",\n \"tools\": {\n \"tools\": [\n {\n \"name\": \"tavily_web_search\",\n \"mcp_server_url\": \"https://tools.langchain.com\",\n \"mcp_server_name\": \"Fleet\",\n \"display_name\": \"tavily_web_search\"\n },\n {\n \"name\": \"read_url_content\",\n \"mcp_server_url\": \"https://tools.langchain.com\",\n \"mcp_server_name\": \"Fleet\",\n \"display_name\": \"read_url_content\"\n }\n ],\n \"interrupt_config\": {\n \"https://tools.langchain.com::tavily_web_search::Fleet\": true,\n \"https://tools.langchain.com::read_url_content::Fleet\": false\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.smith.langchain.com/v1/deepagents/agents/{agent_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"description\": \"Research assistant that searches the web, reads URLs, and summarizes sources.\",\n \"instructions\": \"You are a careful research assistant. Search for sources, read relevant pages, keep notes, and return concise answers with citations.\",\n \"tools\": {\n \"tools\": [\n {\n \"name\": \"tavily_web_search\",\n \"mcp_server_url\": \"https://tools.langchain.com\",\n \"mcp_server_name\": \"Fleet\",\n \"display_name\": \"tavily_web_search\"\n },\n {\n \"name\": \"read_url_content\",\n \"mcp_server_url\": \"https://tools.langchain.com\",\n \"mcp_server_name\": \"Fleet\",\n \"display_name\": \"read_url_content\"\n }\n ],\n \"interrupt_config\": {\n \"https://tools.langchain.com::tavily_web_search::Fleet\": true,\n \"https://tools.langchain.com::read_url_content::Fleet\": false\n }\n }\n}"
response = http.request(request)
puts response.read_bodyUpdate an agent
Update the specified agent. Top-level scalar fields merge field-by-field. Nested objects such as runtime, permissions, tools, subagents, skills, and extras are replaced in full when provided. Providing file-tree fields such as instructions, tools, subagents, skills, or files creates a new file tree commit.
curl --request PATCH \
--url https://api.smith.langchain.com/v1/deepagents/agents/{agent_id} \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"description": "Research assistant that searches the web, reads URLs, and summarizes sources.",
"instructions": "You are a careful research assistant. Search for sources, read relevant pages, keep notes, and return concise answers with citations.",
"tools": {
"tools": [
{
"name": "tavily_web_search",
"mcp_server_url": "https://tools.langchain.com",
"mcp_server_name": "Fleet",
"display_name": "tavily_web_search"
},
{
"name": "read_url_content",
"mcp_server_url": "https://tools.langchain.com",
"mcp_server_name": "Fleet",
"display_name": "read_url_content"
}
],
"interrupt_config": {
"https://tools.langchain.com::tavily_web_search::Fleet": true,
"https://tools.langchain.com::read_url_content::Fleet": false
}
}
}
'import requests
url = "https://api.smith.langchain.com/v1/deepagents/agents/{agent_id}"
payload = {
"description": "Research assistant that searches the web, reads URLs, and summarizes sources.",
"instructions": "You are a careful research assistant. Search for sources, read relevant pages, keep notes, and return concise answers with citations.",
"tools": {
"tools": [
{
"name": "tavily_web_search",
"mcp_server_url": "https://tools.langchain.com",
"mcp_server_name": "Fleet",
"display_name": "tavily_web_search"
},
{
"name": "read_url_content",
"mcp_server_url": "https://tools.langchain.com",
"mcp_server_name": "Fleet",
"display_name": "read_url_content"
}
],
"interrupt_config": {
"https://tools.langchain.com::tavily_web_search::Fleet": True,
"https://tools.langchain.com::read_url_content::Fleet": False
}
}
}
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
description: 'Research assistant that searches the web, reads URLs, and summarizes sources.',
instructions: 'You are a careful research assistant. Search for sources, read relevant pages, keep notes, and return concise answers with citations.',
tools: {
tools: [
{
name: 'tavily_web_search',
mcp_server_url: 'https://tools.langchain.com',
mcp_server_name: 'Fleet',
display_name: 'tavily_web_search'
},
{
name: 'read_url_content',
mcp_server_url: 'https://tools.langchain.com',
mcp_server_name: 'Fleet',
display_name: 'read_url_content'
}
],
interrupt_config: {
'https://tools.langchain.com::tavily_web_search::Fleet': true,
'https://tools.langchain.com::read_url_content::Fleet': false
}
}
})
};
fetch('https://api.smith.langchain.com/v1/deepagents/agents/{agent_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.smith.langchain.com/v1/deepagents/agents/{agent_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'description' => 'Research assistant that searches the web, reads URLs, and summarizes sources.',
'instructions' => 'You are a careful research assistant. Search for sources, read relevant pages, keep notes, and return concise answers with citations.',
'tools' => [
'tools' => [
[
'name' => 'tavily_web_search',
'mcp_server_url' => 'https://tools.langchain.com',
'mcp_server_name' => 'Fleet',
'display_name' => 'tavily_web_search'
],
[
'name' => 'read_url_content',
'mcp_server_url' => 'https://tools.langchain.com',
'mcp_server_name' => 'Fleet',
'display_name' => 'read_url_content'
]
],
'interrupt_config' => [
'https://tools.langchain.com::tavily_web_search::Fleet' => true,
'https://tools.langchain.com::read_url_content::Fleet' => false
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Api-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.smith.langchain.com/v1/deepagents/agents/{agent_id}"
payload := strings.NewReader("{\n \"description\": \"Research assistant that searches the web, reads URLs, and summarizes sources.\",\n \"instructions\": \"You are a careful research assistant. Search for sources, read relevant pages, keep notes, and return concise answers with citations.\",\n \"tools\": {\n \"tools\": [\n {\n \"name\": \"tavily_web_search\",\n \"mcp_server_url\": \"https://tools.langchain.com\",\n \"mcp_server_name\": \"Fleet\",\n \"display_name\": \"tavily_web_search\"\n },\n {\n \"name\": \"read_url_content\",\n \"mcp_server_url\": \"https://tools.langchain.com\",\n \"mcp_server_name\": \"Fleet\",\n \"display_name\": \"read_url_content\"\n }\n ],\n \"interrupt_config\": {\n \"https://tools.langchain.com::tavily_web_search::Fleet\": true,\n \"https://tools.langchain.com::read_url_content::Fleet\": false\n }\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-Api-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.smith.langchain.com/v1/deepagents/agents/{agent_id}")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"description\": \"Research assistant that searches the web, reads URLs, and summarizes sources.\",\n \"instructions\": \"You are a careful research assistant. Search for sources, read relevant pages, keep notes, and return concise answers with citations.\",\n \"tools\": {\n \"tools\": [\n {\n \"name\": \"tavily_web_search\",\n \"mcp_server_url\": \"https://tools.langchain.com\",\n \"mcp_server_name\": \"Fleet\",\n \"display_name\": \"tavily_web_search\"\n },\n {\n \"name\": \"read_url_content\",\n \"mcp_server_url\": \"https://tools.langchain.com\",\n \"mcp_server_name\": \"Fleet\",\n \"display_name\": \"read_url_content\"\n }\n ],\n \"interrupt_config\": {\n \"https://tools.langchain.com::tavily_web_search::Fleet\": true,\n \"https://tools.langchain.com::read_url_content::Fleet\": false\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.smith.langchain.com/v1/deepagents/agents/{agent_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"description\": \"Research assistant that searches the web, reads URLs, and summarizes sources.\",\n \"instructions\": \"You are a careful research assistant. Search for sources, read relevant pages, keep notes, and return concise answers with citations.\",\n \"tools\": {\n \"tools\": [\n {\n \"name\": \"tavily_web_search\",\n \"mcp_server_url\": \"https://tools.langchain.com\",\n \"mcp_server_name\": \"Fleet\",\n \"display_name\": \"tavily_web_search\"\n },\n {\n \"name\": \"read_url_content\",\n \"mcp_server_url\": \"https://tools.langchain.com\",\n \"mcp_server_name\": \"Fleet\",\n \"display_name\": \"read_url_content\"\n }\n ],\n \"interrupt_config\": {\n \"https://tools.langchain.com::tavily_web_search::Fleet\": true,\n \"https://tools.langchain.com::read_url_content::Fleet\": false\n }\n }\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
Headers
IANA timezone name (for example, America/Los_Angeles) stamped into the agent's runtime configuration when the agent is created or updated. The runtime uses this timezone to inject a localized current-date line into the agent's system prompt, so the agent reasons about dates in the user's local time. Optional. Defaults to UTC when omitted; invalid values fall back to UTC.
"America/Los_Angeles"
Path Parameters
Managed Deep Agent ID.
Query Parameters
Include the raw file map in the agent response. Accepted truthy values are true and 1.
Body
Sparse update payload. Omitted fields are left unchanged.
Updated agent name.
Updated agent description.
Agent visibility and sharing configuration. When omitted on create, defaults to personal identity, tenant visibility, and read tenant access.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Deprecated alias for system_prompt. Accepted for backwards compatibility; system_prompt takes precedence when both are set.
Show child attributes
Show child attributes
Updated subagent definitions. Replaces the existing subagents field in full.
Show child attributes
Show child attributes
Updated inline skills. Replaces the existing skills field in full.
Show child attributes
Show child attributes
Updated caller-defined metadata. Replaces the existing extras field in full.
Raw file map for paths not covered by typed fields. Keys are relative file paths. Setting a typed field and the corresponding files entry returns 422.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Updated agent system prompt. Written to AGENTS.md. Preferred over deprecated instructions when both are provided.
Updated caller-defined runtime configuration. Typed runtime fields win on key collision.
Relative file paths to remove from the file tree.
Response
Agent updated.
Agent visibility and sharing configuration. When omitted on create, defaults to personal identity, tenant visibility, and read tenant access.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Caller access level for this agent.
READ, RUN, WRITE Whether the authenticated caller owns this agent.
Show child attributes
Show child attributes
Revision token for the latest file tree commit.
Deprecated alias echoed alongside system_prompt for backwards compatibility.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Raw file map for paths not covered by typed fields. Keys are relative file paths. Setting a typed field and the corresponding files entry returns 422.
Show child attributes
Show child attributes
Agent system prompt parsed from AGENTS.md.
Was this page helpful?

