Creates a new agent from an exported agent file: the agent settings plus the prompt (single or multi prompt) or the conversation flow inside it. Conductor runs the same import when you attach an exported .json and say "create this".
Some things are never copied: ids, versions and timestamps, the webhook URL, knowledge base ids, and a voice that isn't in your workspace (the agent gets the default voice). Any field, function or node this platform does not accept is left out and listed in dropped_fields, so the rest of the agent still imports.
Request#
Body#
The exported agent object. It must have agent_name (or a response_engine) and one engine object: a key ending in llm_data or LlmData for a prompt agent, or conversation_flow for a flow agent.
| Field | Type | Required | Description |
|---|---|---|---|
agent_name |
string | Yes | The new agent's name. |
| engine object | object | Yes | The prompt fields (general_prompt, begin_message, general_tools, states ...) or the flow fields (global_prompt, nodes, tools ...). |
| other agent fields | No | Voice and call settings such as language, interruption_sensitivity and max_call_duration_ms, as in Create agent. |
Example request#
curl -X POST "https://api.tried.com.au/import-agent" \
-H "Authorization: Bearer $TRIED_API_KEY" \
-H "Content-Type: application/json" \
-d @exported-agent.jsonimport { readFile } from "node:fs/promises";
const res = await fetch("https://api.tried.com.au/import-agent", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.TRIED_API_KEY}`, "Content-Type": "application/json" },
body: await readFile("exported-agent.json", "utf8"),
});
const agent = await res.json();import os, requests
with open("exported-agent.json") as f:
res = requests.post(
"https://api.tried.com.au/import-agent",
headers={"Authorization": f"Bearer {os.environ['TRIED_API_KEY']}", "Content-Type": "application/json"},
data=f.read(),
)
agent = res.json()Response#
201 Created with the new agent (as in Get agent) plus:
| Field | Type | Description |
|---|---|---|
dropped_fields |
string[] | Fields, functions (general_tools: name) or nodes that were left out. |
next_steps |
string[] | What to redo by hand, such as picking a voice or adding a webhook URL. |
{
"agent_id": "agent_3f9a1c7e5b2d8f0a6c4e1b97",
"agent_name": "Outbound Demo",
"response_engine": { "type": "llm", "llm_id": "llm_7c2e9a4f1b6d3e8a0c5f2b14" },
"dropped_fields": ["general_tools: beam_up"],
"next_steps": [
"The voice isn't in this workspace, so the agent uses the default voice. Pick one under Voice.",
"The webhook URL was not copied. Add your own under Webhook settings if you need one."
]
}Errors#
| Status | When |
|---|---|
400 |
The body is not an exported agent, or a required field is missing. |
401 |
Missing or invalid API key. |
403 |
The key's role cannot create agents. |
429 |
Rate limit exceeded. See Rate limits. |
See Errors for the body format.