curl --request POST \
--url https://api.smith.langchain.com/v1/deepagents/agents/{agent_id}/clone \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"name": "<string>",
"permissions": {
"identity": "personal",
"visibility": "tenant",
"tenant_access_level": "read",
"shared_users": {
"read": [
"<string>"
],
"run": [
"<string>"
],
"update": [
"<string>"
]
}
}
}
'import requests
url = "https://api.smith.langchain.com/v1/deepagents/agents/{agent_id}/clone"
payload = {
"name": "<string>",
"permissions": {
"identity": "personal",
"visibility": "tenant",
"tenant_access_level": "read",
"shared_users": {
"read": ["<string>"],
"run": ["<string>"],
"update": ["<string>"]
}
}
}
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: '<string>',
permissions: {
identity: 'personal',
visibility: 'tenant',
tenant_access_level: 'read',
shared_users: {read: ['<string>'], run: ['<string>'], update: ['<string>']}
}
})
};
fetch('https://api.smith.langchain.com/v1/deepagents/agents/{agent_id}/clone', 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}/clone",
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' => '<string>',
'permissions' => [
'identity' => 'personal',
'visibility' => 'tenant',
'tenant_access_level' => 'read',
'shared_users' => [
'read' => [
'<string>'
],
'run' => [
'<string>'
],
'update' => [
'<string>'
]
]
]
]),
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}/clone"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"permissions\": {\n \"identity\": \"personal\",\n \"visibility\": \"tenant\",\n \"tenant_access_level\": \"read\",\n \"shared_users\": {\n \"read\": [\n \"<string>\"\n ],\n \"run\": [\n \"<string>\"\n ],\n \"update\": [\n \"<string>\"\n ]\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/{agent_id}/clone")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"permissions\": {\n \"identity\": \"personal\",\n \"visibility\": \"tenant\",\n \"tenant_access_level\": \"read\",\n \"shared_users\": {\n \"read\": [\n \"<string>\"\n ],\n \"run\": [\n \"<string>\"\n ],\n \"update\": [\n \"<string>\"\n ]\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.smith.langchain.com/v1/deepagents/agents/{agent_id}/clone")
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\": \"<string>\",\n \"permissions\": {\n \"identity\": \"personal\",\n \"visibility\": \"tenant\",\n \"tenant_access_level\": \"read\",\n \"shared_users\": {\n \"read\": [\n \"<string>\"\n ],\n \"run\": [\n \"<string>\"\n ],\n \"update\": [\n \"<string>\"\n ]\n }\n }\n}"
response = http.request(request)
puts response.read_bodyClone an agent
Create a new agent that mirrors the source agent behavior but is owned by the caller. The clone copies runtime, backend, file tree, tools, subagents, and skills; caller metadata and sharing state start fresh.
curl --request POST \
--url https://api.smith.langchain.com/v1/deepagents/agents/{agent_id}/clone \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"name": "<string>",
"permissions": {
"identity": "personal",
"visibility": "tenant",
"tenant_access_level": "read",
"shared_users": {
"read": [
"<string>"
],
"run": [
"<string>"
],
"update": [
"<string>"
]
}
}
}
'import requests
url = "https://api.smith.langchain.com/v1/deepagents/agents/{agent_id}/clone"
payload = {
"name": "<string>",
"permissions": {
"identity": "personal",
"visibility": "tenant",
"tenant_access_level": "read",
"shared_users": {
"read": ["<string>"],
"run": ["<string>"],
"update": ["<string>"]
}
}
}
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: '<string>',
permissions: {
identity: 'personal',
visibility: 'tenant',
tenant_access_level: 'read',
shared_users: {read: ['<string>'], run: ['<string>'], update: ['<string>']}
}
})
};
fetch('https://api.smith.langchain.com/v1/deepagents/agents/{agent_id}/clone', 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}/clone",
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' => '<string>',
'permissions' => [
'identity' => 'personal',
'visibility' => 'tenant',
'tenant_access_level' => 'read',
'shared_users' => [
'read' => [
'<string>'
],
'run' => [
'<string>'
],
'update' => [
'<string>'
]
]
]
]),
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}/clone"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"permissions\": {\n \"identity\": \"personal\",\n \"visibility\": \"tenant\",\n \"tenant_access_level\": \"read\",\n \"shared_users\": {\n \"read\": [\n \"<string>\"\n ],\n \"run\": [\n \"<string>\"\n ],\n \"update\": [\n \"<string>\"\n ]\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/{agent_id}/clone")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"permissions\": {\n \"identity\": \"personal\",\n \"visibility\": \"tenant\",\n \"tenant_access_level\": \"read\",\n \"shared_users\": {\n \"read\": [\n \"<string>\"\n ],\n \"run\": [\n \"<string>\"\n ],\n \"update\": [\n \"<string>\"\n ]\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.smith.langchain.com/v1/deepagents/agents/{agent_id}/clone")
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\": \"<string>\",\n \"permissions\": {\n \"identity\": \"personal\",\n \"visibility\": \"tenant\",\n \"tenant_access_level\": \"read\",\n \"shared_users\": {\n \"read\": [\n \"<string>\"\n ],\n \"run\": [\n \"<string>\"\n ],\n \"update\": [\n \"<string>\"\n ]\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
Response
Agent cloned.
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?

