curl --request POST \
--url https://api.smith.langchain.com/v1/deepagents/agents \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"name": "research-assistant",
"description": "Research assistant that can search the web and summarize sources.",
"permissions": {
"identity": "personal",
"visibility": "user"
},
"runtime": {
"model": {
"model_id": "openai:gpt-5.5"
}
},
"instructions": "You are a careful research assistant. Search for sources, 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"
}
],
"interrupt_config": {
"https://tools.langchain.com::tavily_web_search::Fleet": true
}
}
}
'import requests
url = "https://api.smith.langchain.com/v1/deepagents/agents"
payload = {
"name": "research-assistant",
"description": "Research assistant that can search the web and summarize sources.",
"permissions": {
"identity": "personal",
"visibility": "user"
},
"runtime": { "model": { "model_id": "openai:gpt-5.5" } },
"instructions": "You are a careful research assistant. Search for sources, 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"
}
],
"interrupt_config": { "https://tools.langchain.com::tavily_web_search::Fleet": True }
}
}
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'research-assistant',
description: 'Research assistant that can search the web and summarize sources.',
permissions: {identity: 'personal', visibility: 'user'},
runtime: {model: {model_id: 'openai:gpt-5.5'}},
instructions: 'You are a careful research assistant. Search for sources, 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'
}
],
interrupt_config: {'https://tools.langchain.com::tavily_web_search::Fleet': true}
}
})
};
fetch('https://api.smith.langchain.com/v1/deepagents/agents', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'research-assistant',
'description' => 'Research assistant that can search the web and summarize sources.',
'permissions' => [
'identity' => 'personal',
'visibility' => 'user'
],
'runtime' => [
'model' => [
'model_id' => 'openai:gpt-5.5'
]
],
'instructions' => 'You are a careful research assistant. Search for sources, 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'
]
],
'interrupt_config' => [
'https://tools.langchain.com::tavily_web_search::Fleet' => true
]
]
]),
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"
payload := strings.NewReader("{\n \"name\": \"research-assistant\",\n \"description\": \"Research assistant that can search the web and summarize sources.\",\n \"permissions\": {\n \"identity\": \"personal\",\n \"visibility\": \"user\"\n },\n \"runtime\": {\n \"model\": {\n \"model_id\": \"openai:gpt-5.5\"\n }\n },\n \"instructions\": \"You are a careful research assistant. Search for sources, 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 \"interrupt_config\": {\n \"https://tools.langchain.com::tavily_web_search::Fleet\": true\n }\n }\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.smith.langchain.com/v1/deepagents/agents")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"research-assistant\",\n \"description\": \"Research assistant that can search the web and summarize sources.\",\n \"permissions\": {\n \"identity\": \"personal\",\n \"visibility\": \"user\"\n },\n \"runtime\": {\n \"model\": {\n \"model_id\": \"openai:gpt-5.5\"\n }\n },\n \"instructions\": \"You are a careful research assistant. Search for sources, 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 \"interrupt_config\": {\n \"https://tools.langchain.com::tavily_web_search::Fleet\": true\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.smith.langchain.com/v1/deepagents/agents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"research-assistant\",\n \"description\": \"Research assistant that can search the web and summarize sources.\",\n \"permissions\": {\n \"identity\": \"personal\",\n \"visibility\": \"user\"\n },\n \"runtime\": {\n \"model\": {\n \"model_id\": \"openai:gpt-5.5\"\n }\n },\n \"instructions\": \"You are a careful research assistant. Search for sources, 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 \"interrupt_config\": {\n \"https://tools.langchain.com::tavily_web_search::Fleet\": true\n }\n }\n}"
response = http.request(request)
puts response.read_bodyCreate an agent
Create an agent with metadata, runtime configuration, and an optional file tree. Creation is atomic: either the agent is fully created or no state is persisted.
curl --request POST \
--url https://api.smith.langchain.com/v1/deepagents/agents \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"name": "research-assistant",
"description": "Research assistant that can search the web and summarize sources.",
"permissions": {
"identity": "personal",
"visibility": "user"
},
"runtime": {
"model": {
"model_id": "openai:gpt-5.5"
}
},
"instructions": "You are a careful research assistant. Search for sources, 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"
}
],
"interrupt_config": {
"https://tools.langchain.com::tavily_web_search::Fleet": true
}
}
}
'import requests
url = "https://api.smith.langchain.com/v1/deepagents/agents"
payload = {
"name": "research-assistant",
"description": "Research assistant that can search the web and summarize sources.",
"permissions": {
"identity": "personal",
"visibility": "user"
},
"runtime": { "model": { "model_id": "openai:gpt-5.5" } },
"instructions": "You are a careful research assistant. Search for sources, 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"
}
],
"interrupt_config": { "https://tools.langchain.com::tavily_web_search::Fleet": True }
}
}
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'research-assistant',
description: 'Research assistant that can search the web and summarize sources.',
permissions: {identity: 'personal', visibility: 'user'},
runtime: {model: {model_id: 'openai:gpt-5.5'}},
instructions: 'You are a careful research assistant. Search for sources, 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'
}
],
interrupt_config: {'https://tools.langchain.com::tavily_web_search::Fleet': true}
}
})
};
fetch('https://api.smith.langchain.com/v1/deepagents/agents', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'research-assistant',
'description' => 'Research assistant that can search the web and summarize sources.',
'permissions' => [
'identity' => 'personal',
'visibility' => 'user'
],
'runtime' => [
'model' => [
'model_id' => 'openai:gpt-5.5'
]
],
'instructions' => 'You are a careful research assistant. Search for sources, 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'
]
],
'interrupt_config' => [
'https://tools.langchain.com::tavily_web_search::Fleet' => true
]
]
]),
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"
payload := strings.NewReader("{\n \"name\": \"research-assistant\",\n \"description\": \"Research assistant that can search the web and summarize sources.\",\n \"permissions\": {\n \"identity\": \"personal\",\n \"visibility\": \"user\"\n },\n \"runtime\": {\n \"model\": {\n \"model_id\": \"openai:gpt-5.5\"\n }\n },\n \"instructions\": \"You are a careful research assistant. Search for sources, 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 \"interrupt_config\": {\n \"https://tools.langchain.com::tavily_web_search::Fleet\": true\n }\n }\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.smith.langchain.com/v1/deepagents/agents")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"research-assistant\",\n \"description\": \"Research assistant that can search the web and summarize sources.\",\n \"permissions\": {\n \"identity\": \"personal\",\n \"visibility\": \"user\"\n },\n \"runtime\": {\n \"model\": {\n \"model_id\": \"openai:gpt-5.5\"\n }\n },\n \"instructions\": \"You are a careful research assistant. Search for sources, 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 \"interrupt_config\": {\n \"https://tools.langchain.com::tavily_web_search::Fleet\": true\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.smith.langchain.com/v1/deepagents/agents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"research-assistant\",\n \"description\": \"Research assistant that can search the web and summarize sources.\",\n \"permissions\": {\n \"identity\": \"personal\",\n \"visibility\": \"user\"\n },\n \"runtime\": {\n \"model\": {\n \"model_id\": \"openai:gpt-5.5\"\n }\n },\n \"instructions\": \"You are a careful research assistant. Search for sources, 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 \"interrupt_config\": {\n \"https://tools.langchain.com::tavily_web_search::Fleet\": true\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"
Query Parameters
Include the raw file map in the agent response. Accepted truthy values are true and 1.
Body
Human-readable agent name. Must not be blank.
Short 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
Subagents. Each entry is written to subagents/<name>/AGENTS.md and, when provided, subagents/<name>/tools.json.
Show child attributes
Show child attributes
Inline skills. Each entry is written to skills/<name>/SKILL.md and supporting files.
Show child attributes
Show child attributes
Caller-defined key-value metadata attached to the agent.
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
Agent system prompt. Written to AGENTS.md. Preferred over deprecated instructions when both are provided.
Caller-defined runtime configuration merged into the agent config. Typed runtime fields win on key collision.
Response
Agent created.
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?

