Import agents in bulk (create)
curl --request POST \
--url https://api.example.com/api/internal/import/agents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"agents": [
{
"created_by_subject": {
"subject_display_name": "<string>",
"subject_id": "<string>",
"subject_type": "<string>"
},
"manifest": {
"model": {
"name": "<string>",
"params": {
"max_tokens": 123,
"parallel_tool_calls": true,
"reasoning_effort": "<string>",
"temperature": 123,
"top_k": 123,
"top_p": 123
}
},
"config": {
"ask_user_questions": {
"enabled": true
},
"context_management": {
"compaction": {
"enabled": true
},
"large_tool_response": {
"enabled": true
}
},
"dynamic_sub_agents": {
"enabled": true
},
"generative_ui": {
"enabled": true
},
"iteration_limit": 100,
"sandbox": {
"enabled": false,
"file_downloads": true
}
},
"instructions": "<string>",
"mcp_servers": [
{
"name": "<string>",
"disable_tools": [],
"enable_tools": [
"@all"
],
"preload": false,
"preload_tools": [],
"require_approval_for_tools": [
"@write",
"@destructive"
]
}
],
"messages": [
{
"content": "<string>",
"type": "user.message"
}
],
"response_format": {
"type": "text"
},
"skills": [
{
"name": "<string>",
"preload": false
}
]
},
"name": "<string>",
"tenant_id": "<string>",
"truefoundry_managed_agent_id": "<string>",
"description": "<string>"
}
]
}
'import requests
url = "https://api.example.com/api/internal/import/agents"
payload = { "agents": [
{
"created_by_subject": {
"subject_display_name": "<string>",
"subject_id": "<string>",
"subject_type": "<string>"
},
"manifest": {
"model": {
"name": "<string>",
"params": {
"max_tokens": 123,
"parallel_tool_calls": True,
"reasoning_effort": "<string>",
"temperature": 123,
"top_k": 123,
"top_p": 123
}
},
"config": {
"ask_user_questions": { "enabled": True },
"context_management": {
"compaction": { "enabled": True },
"large_tool_response": { "enabled": True }
},
"dynamic_sub_agents": { "enabled": True },
"generative_ui": { "enabled": True },
"iteration_limit": 100,
"sandbox": {
"enabled": False,
"file_downloads": True
}
},
"instructions": "<string>",
"mcp_servers": [
{
"name": "<string>",
"disable_tools": [],
"enable_tools": ["@all"],
"preload": False,
"preload_tools": [],
"require_approval_for_tools": ["@write", "@destructive"]
}
],
"messages": [
{
"content": "<string>",
"type": "user.message"
}
],
"response_format": { "type": "text" },
"skills": [
{
"name": "<string>",
"preload": False
}
]
},
"name": "<string>",
"tenant_id": "<string>",
"truefoundry_managed_agent_id": "<string>",
"description": "<string>"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
agents: [
{
created_by_subject: {
subject_display_name: '<string>',
subject_id: '<string>',
subject_type: '<string>'
},
manifest: {
model: {
name: '<string>',
params: {
max_tokens: 123,
parallel_tool_calls: true,
reasoning_effort: '<string>',
temperature: 123,
top_k: 123,
top_p: 123
}
},
config: {
ask_user_questions: {enabled: true},
context_management: {compaction: {enabled: true}, large_tool_response: {enabled: true}},
dynamic_sub_agents: {enabled: true},
generative_ui: {enabled: true},
iteration_limit: 100,
sandbox: {enabled: false, file_downloads: true}
},
instructions: '<string>',
mcp_servers: [
{
name: '<string>',
disable_tools: [],
enable_tools: ['@all'],
preload: false,
preload_tools: [],
require_approval_for_tools: ['@write', '@destructive']
}
],
messages: [{content: '<string>', type: 'user.message'}],
response_format: {type: 'text'},
skills: [{name: '<string>', preload: false}]
},
name: '<string>',
tenant_id: '<string>',
truefoundry_managed_agent_id: '<string>',
description: '<string>'
}
]
})
};
fetch('https://api.example.com/api/internal/import/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.example.com/api/internal/import/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([
'agents' => [
[
'created_by_subject' => [
'subject_display_name' => '<string>',
'subject_id' => '<string>',
'subject_type' => '<string>'
],
'manifest' => [
'model' => [
'name' => '<string>',
'params' => [
'max_tokens' => 123,
'parallel_tool_calls' => true,
'reasoning_effort' => '<string>',
'temperature' => 123,
'top_k' => 123,
'top_p' => 123
]
],
'config' => [
'ask_user_questions' => [
'enabled' => true
],
'context_management' => [
'compaction' => [
'enabled' => true
],
'large_tool_response' => [
'enabled' => true
]
],
'dynamic_sub_agents' => [
'enabled' => true
],
'generative_ui' => [
'enabled' => true
],
'iteration_limit' => 100,
'sandbox' => [
'enabled' => false,
'file_downloads' => true
]
],
'instructions' => '<string>',
'mcp_servers' => [
[
'name' => '<string>',
'disable_tools' => [
],
'enable_tools' => [
'@all'
],
'preload' => false,
'preload_tools' => [
],
'require_approval_for_tools' => [
'@write',
'@destructive'
]
]
],
'messages' => [
[
'content' => '<string>',
'type' => 'user.message'
]
],
'response_format' => [
'type' => 'text'
],
'skills' => [
[
'name' => '<string>',
'preload' => false
]
]
],
'name' => '<string>',
'tenant_id' => '<string>',
'truefoundry_managed_agent_id' => '<string>',
'description' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.example.com/api/internal/import/agents"
payload := strings.NewReader("{\n \"agents\": [\n {\n \"created_by_subject\": {\n \"subject_display_name\": \"<string>\",\n \"subject_id\": \"<string>\",\n \"subject_type\": \"<string>\"\n },\n \"manifest\": {\n \"model\": {\n \"name\": \"<string>\",\n \"params\": {\n \"max_tokens\": 123,\n \"parallel_tool_calls\": true,\n \"reasoning_effort\": \"<string>\",\n \"temperature\": 123,\n \"top_k\": 123,\n \"top_p\": 123\n }\n },\n \"config\": {\n \"ask_user_questions\": {\n \"enabled\": true\n },\n \"context_management\": {\n \"compaction\": {\n \"enabled\": true\n },\n \"large_tool_response\": {\n \"enabled\": true\n }\n },\n \"dynamic_sub_agents\": {\n \"enabled\": true\n },\n \"generative_ui\": {\n \"enabled\": true\n },\n \"iteration_limit\": 100,\n \"sandbox\": {\n \"enabled\": false,\n \"file_downloads\": true\n }\n },\n \"instructions\": \"<string>\",\n \"mcp_servers\": [\n {\n \"name\": \"<string>\",\n \"disable_tools\": [],\n \"enable_tools\": [\n \"@all\"\n ],\n \"preload\": false,\n \"preload_tools\": [],\n \"require_approval_for_tools\": [\n \"@write\",\n \"@destructive\"\n ]\n }\n ],\n \"messages\": [\n {\n \"content\": \"<string>\",\n \"type\": \"user.message\"\n }\n ],\n \"response_format\": {\n \"type\": \"text\"\n },\n \"skills\": [\n {\n \"name\": \"<string>\",\n \"preload\": false\n }\n ]\n },\n \"name\": \"<string>\",\n \"tenant_id\": \"<string>\",\n \"truefoundry_managed_agent_id\": \"<string>\",\n \"description\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.example.com/api/internal/import/agents")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"agents\": [\n {\n \"created_by_subject\": {\n \"subject_display_name\": \"<string>\",\n \"subject_id\": \"<string>\",\n \"subject_type\": \"<string>\"\n },\n \"manifest\": {\n \"model\": {\n \"name\": \"<string>\",\n \"params\": {\n \"max_tokens\": 123,\n \"parallel_tool_calls\": true,\n \"reasoning_effort\": \"<string>\",\n \"temperature\": 123,\n \"top_k\": 123,\n \"top_p\": 123\n }\n },\n \"config\": {\n \"ask_user_questions\": {\n \"enabled\": true\n },\n \"context_management\": {\n \"compaction\": {\n \"enabled\": true\n },\n \"large_tool_response\": {\n \"enabled\": true\n }\n },\n \"dynamic_sub_agents\": {\n \"enabled\": true\n },\n \"generative_ui\": {\n \"enabled\": true\n },\n \"iteration_limit\": 100,\n \"sandbox\": {\n \"enabled\": false,\n \"file_downloads\": true\n }\n },\n \"instructions\": \"<string>\",\n \"mcp_servers\": [\n {\n \"name\": \"<string>\",\n \"disable_tools\": [],\n \"enable_tools\": [\n \"@all\"\n ],\n \"preload\": false,\n \"preload_tools\": [],\n \"require_approval_for_tools\": [\n \"@write\",\n \"@destructive\"\n ]\n }\n ],\n \"messages\": [\n {\n \"content\": \"<string>\",\n \"type\": \"user.message\"\n }\n ],\n \"response_format\": {\n \"type\": \"text\"\n },\n \"skills\": [\n {\n \"name\": \"<string>\",\n \"preload\": false\n }\n ]\n },\n \"name\": \"<string>\",\n \"tenant_id\": \"<string>\",\n \"truefoundry_managed_agent_id\": \"<string>\",\n \"description\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/internal/import/agents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"agents\": [\n {\n \"created_by_subject\": {\n \"subject_display_name\": \"<string>\",\n \"subject_id\": \"<string>\",\n \"subject_type\": \"<string>\"\n },\n \"manifest\": {\n \"model\": {\n \"name\": \"<string>\",\n \"params\": {\n \"max_tokens\": 123,\n \"parallel_tool_calls\": true,\n \"reasoning_effort\": \"<string>\",\n \"temperature\": 123,\n \"top_k\": 123,\n \"top_p\": 123\n }\n },\n \"config\": {\n \"ask_user_questions\": {\n \"enabled\": true\n },\n \"context_management\": {\n \"compaction\": {\n \"enabled\": true\n },\n \"large_tool_response\": {\n \"enabled\": true\n }\n },\n \"dynamic_sub_agents\": {\n \"enabled\": true\n },\n \"generative_ui\": {\n \"enabled\": true\n },\n \"iteration_limit\": 100,\n \"sandbox\": {\n \"enabled\": false,\n \"file_downloads\": true\n }\n },\n \"instructions\": \"<string>\",\n \"mcp_servers\": [\n {\n \"name\": \"<string>\",\n \"disable_tools\": [],\n \"enable_tools\": [\n \"@all\"\n ],\n \"preload\": false,\n \"preload_tools\": [],\n \"require_approval_for_tools\": [\n \"@write\",\n \"@destructive\"\n ]\n }\n ],\n \"messages\": [\n {\n \"content\": \"<string>\",\n \"type\": \"user.message\"\n }\n ],\n \"response_format\": {\n \"type\": \"text\"\n },\n \"skills\": [\n {\n \"name\": \"<string>\",\n \"preload\": false\n }\n ]\n },\n \"name\": \"<string>\",\n \"tenant_id\": \"<string>\",\n \"truefoundry_managed_agent_id\": \"<string>\",\n \"description\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"results": [
{
"name": "<string>",
"status": "created",
"tenant_id": "<string>",
"agent_id": "<string>",
"error": "<string>"
}
]
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"param": "<string>",
"type": "<string>"
}
}Internal
Import agents in bulk (create)
Ops/backfill only. Per-item created | exists | failed.
POST
/
api
/
internal
/
import
/
agents
Import agents in bulk (create)
curl --request POST \
--url https://api.example.com/api/internal/import/agents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"agents": [
{
"created_by_subject": {
"subject_display_name": "<string>",
"subject_id": "<string>",
"subject_type": "<string>"
},
"manifest": {
"model": {
"name": "<string>",
"params": {
"max_tokens": 123,
"parallel_tool_calls": true,
"reasoning_effort": "<string>",
"temperature": 123,
"top_k": 123,
"top_p": 123
}
},
"config": {
"ask_user_questions": {
"enabled": true
},
"context_management": {
"compaction": {
"enabled": true
},
"large_tool_response": {
"enabled": true
}
},
"dynamic_sub_agents": {
"enabled": true
},
"generative_ui": {
"enabled": true
},
"iteration_limit": 100,
"sandbox": {
"enabled": false,
"file_downloads": true
}
},
"instructions": "<string>",
"mcp_servers": [
{
"name": "<string>",
"disable_tools": [],
"enable_tools": [
"@all"
],
"preload": false,
"preload_tools": [],
"require_approval_for_tools": [
"@write",
"@destructive"
]
}
],
"messages": [
{
"content": "<string>",
"type": "user.message"
}
],
"response_format": {
"type": "text"
},
"skills": [
{
"name": "<string>",
"preload": false
}
]
},
"name": "<string>",
"tenant_id": "<string>",
"truefoundry_managed_agent_id": "<string>",
"description": "<string>"
}
]
}
'import requests
url = "https://api.example.com/api/internal/import/agents"
payload = { "agents": [
{
"created_by_subject": {
"subject_display_name": "<string>",
"subject_id": "<string>",
"subject_type": "<string>"
},
"manifest": {
"model": {
"name": "<string>",
"params": {
"max_tokens": 123,
"parallel_tool_calls": True,
"reasoning_effort": "<string>",
"temperature": 123,
"top_k": 123,
"top_p": 123
}
},
"config": {
"ask_user_questions": { "enabled": True },
"context_management": {
"compaction": { "enabled": True },
"large_tool_response": { "enabled": True }
},
"dynamic_sub_agents": { "enabled": True },
"generative_ui": { "enabled": True },
"iteration_limit": 100,
"sandbox": {
"enabled": False,
"file_downloads": True
}
},
"instructions": "<string>",
"mcp_servers": [
{
"name": "<string>",
"disable_tools": [],
"enable_tools": ["@all"],
"preload": False,
"preload_tools": [],
"require_approval_for_tools": ["@write", "@destructive"]
}
],
"messages": [
{
"content": "<string>",
"type": "user.message"
}
],
"response_format": { "type": "text" },
"skills": [
{
"name": "<string>",
"preload": False
}
]
},
"name": "<string>",
"tenant_id": "<string>",
"truefoundry_managed_agent_id": "<string>",
"description": "<string>"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
agents: [
{
created_by_subject: {
subject_display_name: '<string>',
subject_id: '<string>',
subject_type: '<string>'
},
manifest: {
model: {
name: '<string>',
params: {
max_tokens: 123,
parallel_tool_calls: true,
reasoning_effort: '<string>',
temperature: 123,
top_k: 123,
top_p: 123
}
},
config: {
ask_user_questions: {enabled: true},
context_management: {compaction: {enabled: true}, large_tool_response: {enabled: true}},
dynamic_sub_agents: {enabled: true},
generative_ui: {enabled: true},
iteration_limit: 100,
sandbox: {enabled: false, file_downloads: true}
},
instructions: '<string>',
mcp_servers: [
{
name: '<string>',
disable_tools: [],
enable_tools: ['@all'],
preload: false,
preload_tools: [],
require_approval_for_tools: ['@write', '@destructive']
}
],
messages: [{content: '<string>', type: 'user.message'}],
response_format: {type: 'text'},
skills: [{name: '<string>', preload: false}]
},
name: '<string>',
tenant_id: '<string>',
truefoundry_managed_agent_id: '<string>',
description: '<string>'
}
]
})
};
fetch('https://api.example.com/api/internal/import/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.example.com/api/internal/import/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([
'agents' => [
[
'created_by_subject' => [
'subject_display_name' => '<string>',
'subject_id' => '<string>',
'subject_type' => '<string>'
],
'manifest' => [
'model' => [
'name' => '<string>',
'params' => [
'max_tokens' => 123,
'parallel_tool_calls' => true,
'reasoning_effort' => '<string>',
'temperature' => 123,
'top_k' => 123,
'top_p' => 123
]
],
'config' => [
'ask_user_questions' => [
'enabled' => true
],
'context_management' => [
'compaction' => [
'enabled' => true
],
'large_tool_response' => [
'enabled' => true
]
],
'dynamic_sub_agents' => [
'enabled' => true
],
'generative_ui' => [
'enabled' => true
],
'iteration_limit' => 100,
'sandbox' => [
'enabled' => false,
'file_downloads' => true
]
],
'instructions' => '<string>',
'mcp_servers' => [
[
'name' => '<string>',
'disable_tools' => [
],
'enable_tools' => [
'@all'
],
'preload' => false,
'preload_tools' => [
],
'require_approval_for_tools' => [
'@write',
'@destructive'
]
]
],
'messages' => [
[
'content' => '<string>',
'type' => 'user.message'
]
],
'response_format' => [
'type' => 'text'
],
'skills' => [
[
'name' => '<string>',
'preload' => false
]
]
],
'name' => '<string>',
'tenant_id' => '<string>',
'truefoundry_managed_agent_id' => '<string>',
'description' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.example.com/api/internal/import/agents"
payload := strings.NewReader("{\n \"agents\": [\n {\n \"created_by_subject\": {\n \"subject_display_name\": \"<string>\",\n \"subject_id\": \"<string>\",\n \"subject_type\": \"<string>\"\n },\n \"manifest\": {\n \"model\": {\n \"name\": \"<string>\",\n \"params\": {\n \"max_tokens\": 123,\n \"parallel_tool_calls\": true,\n \"reasoning_effort\": \"<string>\",\n \"temperature\": 123,\n \"top_k\": 123,\n \"top_p\": 123\n }\n },\n \"config\": {\n \"ask_user_questions\": {\n \"enabled\": true\n },\n \"context_management\": {\n \"compaction\": {\n \"enabled\": true\n },\n \"large_tool_response\": {\n \"enabled\": true\n }\n },\n \"dynamic_sub_agents\": {\n \"enabled\": true\n },\n \"generative_ui\": {\n \"enabled\": true\n },\n \"iteration_limit\": 100,\n \"sandbox\": {\n \"enabled\": false,\n \"file_downloads\": true\n }\n },\n \"instructions\": \"<string>\",\n \"mcp_servers\": [\n {\n \"name\": \"<string>\",\n \"disable_tools\": [],\n \"enable_tools\": [\n \"@all\"\n ],\n \"preload\": false,\n \"preload_tools\": [],\n \"require_approval_for_tools\": [\n \"@write\",\n \"@destructive\"\n ]\n }\n ],\n \"messages\": [\n {\n \"content\": \"<string>\",\n \"type\": \"user.message\"\n }\n ],\n \"response_format\": {\n \"type\": \"text\"\n },\n \"skills\": [\n {\n \"name\": \"<string>\",\n \"preload\": false\n }\n ]\n },\n \"name\": \"<string>\",\n \"tenant_id\": \"<string>\",\n \"truefoundry_managed_agent_id\": \"<string>\",\n \"description\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.example.com/api/internal/import/agents")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"agents\": [\n {\n \"created_by_subject\": {\n \"subject_display_name\": \"<string>\",\n \"subject_id\": \"<string>\",\n \"subject_type\": \"<string>\"\n },\n \"manifest\": {\n \"model\": {\n \"name\": \"<string>\",\n \"params\": {\n \"max_tokens\": 123,\n \"parallel_tool_calls\": true,\n \"reasoning_effort\": \"<string>\",\n \"temperature\": 123,\n \"top_k\": 123,\n \"top_p\": 123\n }\n },\n \"config\": {\n \"ask_user_questions\": {\n \"enabled\": true\n },\n \"context_management\": {\n \"compaction\": {\n \"enabled\": true\n },\n \"large_tool_response\": {\n \"enabled\": true\n }\n },\n \"dynamic_sub_agents\": {\n \"enabled\": true\n },\n \"generative_ui\": {\n \"enabled\": true\n },\n \"iteration_limit\": 100,\n \"sandbox\": {\n \"enabled\": false,\n \"file_downloads\": true\n }\n },\n \"instructions\": \"<string>\",\n \"mcp_servers\": [\n {\n \"name\": \"<string>\",\n \"disable_tools\": [],\n \"enable_tools\": [\n \"@all\"\n ],\n \"preload\": false,\n \"preload_tools\": [],\n \"require_approval_for_tools\": [\n \"@write\",\n \"@destructive\"\n ]\n }\n ],\n \"messages\": [\n {\n \"content\": \"<string>\",\n \"type\": \"user.message\"\n }\n ],\n \"response_format\": {\n \"type\": \"text\"\n },\n \"skills\": [\n {\n \"name\": \"<string>\",\n \"preload\": false\n }\n ]\n },\n \"name\": \"<string>\",\n \"tenant_id\": \"<string>\",\n \"truefoundry_managed_agent_id\": \"<string>\",\n \"description\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/internal/import/agents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"agents\": [\n {\n \"created_by_subject\": {\n \"subject_display_name\": \"<string>\",\n \"subject_id\": \"<string>\",\n \"subject_type\": \"<string>\"\n },\n \"manifest\": {\n \"model\": {\n \"name\": \"<string>\",\n \"params\": {\n \"max_tokens\": 123,\n \"parallel_tool_calls\": true,\n \"reasoning_effort\": \"<string>\",\n \"temperature\": 123,\n \"top_k\": 123,\n \"top_p\": 123\n }\n },\n \"config\": {\n \"ask_user_questions\": {\n \"enabled\": true\n },\n \"context_management\": {\n \"compaction\": {\n \"enabled\": true\n },\n \"large_tool_response\": {\n \"enabled\": true\n }\n },\n \"dynamic_sub_agents\": {\n \"enabled\": true\n },\n \"generative_ui\": {\n \"enabled\": true\n },\n \"iteration_limit\": 100,\n \"sandbox\": {\n \"enabled\": false,\n \"file_downloads\": true\n }\n },\n \"instructions\": \"<string>\",\n \"mcp_servers\": [\n {\n \"name\": \"<string>\",\n \"disable_tools\": [],\n \"enable_tools\": [\n \"@all\"\n ],\n \"preload\": false,\n \"preload_tools\": [],\n \"require_approval_for_tools\": [\n \"@write\",\n \"@destructive\"\n ]\n }\n ],\n \"messages\": [\n {\n \"content\": \"<string>\",\n \"type\": \"user.message\"\n }\n ],\n \"response_format\": {\n \"type\": \"text\"\n },\n \"skills\": [\n {\n \"name\": \"<string>\",\n \"preload\": false\n }\n ]\n },\n \"name\": \"<string>\",\n \"tenant_id\": \"<string>\",\n \"truefoundry_managed_agent_id\": \"<string>\",\n \"description\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"results": [
{
"name": "<string>",
"status": "created",
"tenant_id": "<string>",
"agent_id": "<string>",
"error": "<string>"
}
]
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"param": "<string>",
"type": "<string>"
}
}Authorizations
Caller credential (Authorization: Bearer <token>). Required on protected routes when auth is enabled. Browser sessions may use the HttpOnly id_token or accessToken cookie instead.
Body
application/json
Agents to create; each carries tenant_id and created_by_subject.
Show child attributes
Show child attributes
Response
Per-agent create results.
Show child attributes
Show child attributes