{
"error": "Unauthorized",
"error_description": "You are not authorized to use this endpoint."
}
{
"error": "Unauthorized",
"error_description": "You are not authorized to use this endpoint."
}
Agent Conversations
Create an agent conversation
Creates a new agent conversation with a pinned system_prompt and a defaults block
that every subsequent run inherits. The conversation starts at version: 0 — your
first run’s expected_version will be 0.
What this endpoint actually does
Validates the defaults block. Failures here (alias regex, duplicate aliases,
wire-name length, missing required fields) return 400 immediately — the
conversation row is not created on validation failure.
Inserts a row in agent_conversations with version = 0, company_id from your
bearer token, and the validated defaults serialized as JSONB.
Returns the persisted conversation echo.
No workflows are started here. The conversation is a long-lived container; the
actual model execution happens later, in POST /agents/conversations/{id}/runs.
What you cannot change later
system_prompt — pinned for the conversation’s lifetime. If you need a
different system prompt, create a new conversation.
company_id / user_id — derived from the bearer token at creation time;
not exposed in the request body. Both gate every subsequent read endpoint on this
conversation: peers in the same company cannot see each other’s conversations,
runs, or messages. Cross-user access surfaces as 404 — the API does not
distinguish “doesn’t exist” from “owned by another user”.
Everything else in defaults (model, max_iterations, tools, etc.) is just a default
— any individual run can override any of those fields via config_override on its
POST .../runs body. See Agent Conversations
Reference
for the override semantics.
Permission
agent_conversations resource with write verb. The same permission gates
POST .../runs; read is required for the GET endpoints.
Example: minimal “hello world” conversation (no tools)
Example: conversation that can search the Narrative docs
The mcp_servers entry registers two tools the model can call server-side. The
platform handles the JSON-RPC calls to https://docs.narrative.io/mcp transparently.
{ "name": "docs search", "system_prompt": "Use the available tools to look things up before answering.", "defaults": { "model": "anthropic.claude-opus-4.6", "data_plane_id": "f79cbdae-4848-47ca-95e8-69588364d185", "execution_cluster": "shared", "max_iterations": 8, "max_tokens": 2048, "temperature": 0.0, "output_format_schema": { "type": "object", "additionalProperties": false, "required": ["text"], "properties": { "text": { "type": "string" } } }, "mcp_servers": [{ "alias": "docs", "url": "https://docs.narrative.io/mcp", "description": "Narrative docs MCP server" }] }}
Example: conversation using an external OAuth-connected MCP server
For an external server that requires user authorization, connect it first via POST /mcp-connections (the user consents in a browser; the connection becomes connected).
Then reference the returned connection_id in the mcp_servers entry — the platform
attaches and refreshes that connection’s bearer token server-side on every tool call. The
token never appears in the payload or run history. alias and url are still required;
the url should match the server you connected.
{ "name": "hugging face tools", "system_prompt": "Use the available tools to look things up before answering.", "defaults": { "model": "anthropic.claude-opus-4.6", "data_plane_id": "f79cbdae-4848-47ca-95e8-69588364d185", "execution_cluster": "shared", "max_iterations": 8, "max_tokens": 2048, "temperature": 0.0, "output_format_schema": { "type": "object", "additionalProperties": false, "required": ["text"], "properties": { "text": { "type": "string" } } }, "mcp_servers": [{ "alias": "hf", "url": "https://huggingface.co/mcp", "description": "Hugging Face MCP server (external, OAuth)", "connection_id": "b3f1c2a4-5d6e-47f8-9a0b-1c2d3e4f5a6b" }] }}
Example: conversation with a caller-declared tool (human in the loop)
Caller-declared tools[] entries cause the model’s call to pause the run with
status: requires_action. The caller answers by posting a follow-up run with
payload.kind: tool_outputs. These tools have no alias — the model sees the bare
name, and the platform routes any dash-free tool call to caller-declared resolution.
MCP alias doesn’t match ^[a-zA-Z][a-zA-Z0-9]{0,7}$
/errors/duplicate-tool-alias
Same alias appears twice across mcp_servers
/errors/invalid-caller-tool-name
Caller-declared tools[].name is empty, contains a dash, or exceeds 64 chars
/errors/duplicate-caller-tool-name
Same tools[].name appears twice
/errors/tool-name-too-long
Some MCP wire name {alias}-{tool_name} > 64 chars
/errors/invalid-mcp-server-url
An mcp_servers[].url is not a public https URL
/errors/reserved-tool-name
A tools[].name takes the name of a platform tool
/errors/unknown-model
thinking is set and model is not a model the platform offers
/errors/thinking-not-supported
thinking is set for a model that is not offered thinking
/errors/thinking-setting-not-accepted
The model does not take this thinking setting
/errors/thinking-budget-too-large
thinking.budget_tokens is not smaller than max_tokens
A body that isn’t valid JSON, or doesn’t decode (a missing defaults field, an unknown
execution_cluster), gets a 400 with an {error, error_description} body instead.
{
"error": "Unauthorized",
"error_description": "You are not authorized to use this endpoint."
}
{
"error": "Unauthorized",
"error_description": "You are not authorized to use this endpoint."
}
Authorizations
Authorization
string
header
required
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Create an empty conversation with a pinned system_prompt and a defaults block
that every subsequent run inherits (and may sparsely override via config_override).
The system_prompt is permanently fixed. Everything in defaults is, well, a
default — runs can replace any individual field.
defaults
object
required
The configuration applied to every run on this conversation by default. Each field
can be overridden per-run via config_override on the POST .../runs body, except
system_prompt which is fixed at conversation creation time.
For mcp_servers and tools, overrides replace the whole list, not individual
entries. There is no per-server or per-tool merge — set the complete catalog you want
for that run.
In a request only model, data_plane_id and execution_cluster are required. A response
(defaults, effective_config) always carries every key, with null for an optional field
that has no value.
Show child attributes
name
string | null
Optional human-readable label for your own use (logs, dashboards). The model
never sees this. Leave it out (or null) and the platform names the conversation
from its first user message.
Example:
"rate-limiting q&a"
system_prompt
string | null
"Stage direction" prepended to every run as a system-role message. Cannot be
overridden per-run — if you need different system prompts, create separate
conversations. Leaving it empty is allowed but rarely useful; even one line
("You are a helpful assistant. Answer concisely.") shapes model behavior.
Example:
"You are an AI assistant that answers questions about the Narrative Data Marketplace. Use the available tools to look things up before answering."
Response
Conversation created. Returns the persisted conversation row.
The conversation row as the API returns it. The same shape comes back from
POST /agents/conversations (201 Created) and GET /agents/conversations/{id} (200 OK).
A conversation may also carry platform-written tags — recording, for instance, the workflow
whose task created it. They are reserved (the _nio_ prefix), are not settable, and are not
returned here.
id
string<uuid>
required
UUID identifying a conversation. Returned from POST /agents/conversations and used
in every other agent endpoint that operates on this conversation.
Example:
"bc2505b7-068d-44ed-8055-a6f6ffe54ab1"
company_id
integer
required
Company ID derived from the bearer token. Pinned for the conversation's lifetime.
Example:
1
user_id
integer
required
User ID derived from the bearer token. Pinned for the conversation's lifetime and
gates every subsequent read endpoint — only the originating user can fetch the
conversation, its messages, or its runs. Peers in the same company see 404.
Example:
407
defaults
object
required
The configuration applied to every run on this conversation by default. Each field
can be overridden per-run via config_override on the POST .../runs body, except
system_prompt which is fixed at conversation creation time.
For mcp_servers and tools, overrides replace the whole list, not individual
entries. There is no per-server or per-tool merge — set the complete catalog you want
for that run.
In a request only model, data_plane_id and execution_cluster are required. A response
(defaults, effective_config) always carries every key, with null for an optional field
that has no value.
Show child attributes
version
integer
required
Monotonic per-conversation counter, bumped by 1 (or more) every time a successful run
appends messages. Two roles:
Delta cursor for GET .../messages?since=N — fetch only messages with
sequence_no > N.
Compare-and-swap token for POST .../runs — set expected_version to the
conversation's current head; if it doesn't match at run-creation time, you get a
Version Conflict
(HTTP 409).
Always start a new run cycle by reading the current version from
GET /agents/conversations/{id} rather than caching a value from earlier.
Required range: x >= 0
Example:
4
created_at
string<date-time>
required
Example:
"2026-05-18T13:21:30.355180Z"
updated_at
string<date-time>
required
Example:
"2026-05-18T13:21:51.983952Z"
name
string | null
system_prompt
string | null
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Narrative I/O Knowledge Base","colors":{"primary":"#1438F5","light":"#F4F7FB","dark":"#010A28"},"logo":{"light":"https://mintcdn.com/narrative-07c7a1f7/ia6SQX79O4nc7uYf/logo/banner.png?fit=max\u0026auto=format\u0026n=ia6SQX79O4nc7uYf\u0026q=85\u0026s=99860b25011c79366624a87d1f648861","dark":"https://mintcdn.com/narrative-07c7a1f7/ia6SQX79O4nc7uYf/logo/banner-dark.png?fit=max\u0026auto=format\u0026n=ia6SQX79O4nc7uYf\u0026q=85\u0026s=604f9688855cf1123b9eddfc8a5bf0e5"},"favicon":"https://mintcdn.com/narrative-07c7a1f7/DaYE2y2_p0IkASZU/favicon.svg?fit=max\u0026auto=format\u0026n=DaYE2y2_p0IkASZU\u0026q=85\u0026s=9961047bdb2aaf9298577e1c3e624c24","navbar":{"links":[{"href":"mailto:[email protected]","label":"Support"}],"primary":{"type":"button","label":"Open Narrative","href":"https://app.narrative.io"}},"footer":{"socials":{"github":"https://github.com/narrative-io","linkedin":"https://linkedin.com/company/narrative-io"}},"seo":{"indexing":"navigable"},"integrations":{"fathom":{"siteId":"WELVPSSZ"},"ga4":{"measurementId":"G-27FP7EFNFW"},"cookies":{}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":true},"navigation":{"global":{"anchors":[{"anchor":"Release Notes","icon":"clock-rotate-left","href":"/release-notes"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"narrative-07c7a1f7","hasAudioNarration":false,"actualSubdomain":"narrative-07c7a1f7","customDomains":["docs.narrative.io"],"gitSource":{"type":"github","owner":"narrative-io","repo":"mintlify-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":true,"agentFeedback":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6b0d42c7dc3d787e20c32976","clientVersion":"0.0.4347","searchFilterCounts":[{"language":"default","tag":"API Documentation","count":233},{"language":"default","tag":"Reference","count":113},{"language":"default","tag":"Connectors","count":112},{"language":"default","tag":"All connectors","count":110},{"language":"default","tag":"Architecture Reference","count":78},{"language":"default","tag":"Agent Conversations","count":65},{"language":"default","tag":"Concepts","count":62},{"language":"default","tag":"Guides","count":59},{"language":"default","tag":"Errors","count":56},{"language":"default","tag":"API reference","count":43}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true,"deflection":{"enabled":true,"email":"[email protected]","showHelpButton":true}},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":false},"customCss":[]}
{"page":{"pagePath":"api-reference/agent-conversations/create-an-agent-conversation","slug":"/api-reference/agent-conversations/create-an-agent-conversation","pageMetadata":{"title":"Create an agent conversation","description":"Creates a new agent conversation with a pinned `system_prompt` and a `defaults` block\nthat every subsequent run inherits. The conversation starts at `version: 0` — your\nfirst run's `expected_version` will be `0`.\n\n## What this endpoint actually does\n\n1. Validates the `defaults` block. Failures here (alias regex, duplicate aliases,\n wire-name length, missing required fields) return 400 immediately — the\n conversation row is **not** created on validation failure.\n2. Inserts a row in `agent_conversations` with `version = 0`, `company_id` from your\n bearer token, and the validated `defaults` serialized as JSONB.\n3. Returns the persisted conversation echo.\n\nNo workflows are started here. The conversation is a long-lived container; the\nactual model execution happens later, in `POST /agents/conversations/{id}/runs`.\n\n## What you cannot change later\n\n- **`system_prompt`** — pinned for the conversation's lifetime. If you need a\n different system prompt, create a new conversation.\n- **`company_id`** / **`user_id`** — derived from the bearer token at creation time;\n not exposed in the request body. Both gate every subsequent read endpoint on this\n conversation: peers in the same company **cannot** see each other's conversations,\n runs, or messages. Cross-user access surfaces as 404 — the API does not\n distinguish \"doesn't exist\" from \"owned by another user\".\n\nEverything else in `defaults` (model, max_iterations, tools, etc.) is just a default\n— any individual run can override any of those fields via `config_override` on its\n`POST .../runs` body. See [Agent Conversations\nReference](https://docs.narrative.io/reference/architecture/agent-conversations#run)\nfor the override semantics.\n\n## Permission\n\n`agent_conversations` resource with `write` verb. The same permission gates\n`POST .../runs`; `read` is required for the GET endpoints.\n\n## Example: minimal \"hello world\" conversation (no tools)\n\n```json\n{\n \"name\": \"hello world\",\n \"system_prompt\": \"You are a helpful assistant. Answer concisely.\",\n \"defaults\": {\n \"model\": \"anthropic.claude-opus-4.6\",\n \"data_plane_id\": \"f79cbdae-4848-47ca-95e8-69588364d185\",\n \"execution_cluster\": \"shared\",\n \"max_iterations\": 10,\n \"max_tokens\": 1024,\n \"temperature\": 0.0,\n \"output_format_schema\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"text\"],\n \"properties\": { \"text\": { \"type\": \"string\" } }\n }\n }\n}\n```\n\n## Example: conversation that can search the Narrative docs\n\nThe `mcp_servers` entry registers two tools the model can call server-side. The\nplatform handles the JSON-RPC calls to `https://docs.narrative.io/mcp` transparently.\n\n```json\n{\n \"name\": \"docs search\",\n \"system_prompt\": \"Use the available tools to look things up before answering.\",\n \"defaults\": {\n \"model\": \"anthropic.claude-opus-4.6\",\n \"data_plane_id\": \"f79cbdae-4848-47ca-95e8-69588364d185\",\n \"execution_cluster\": \"shared\",\n \"max_iterations\": 8,\n \"max_tokens\": 2048,\n \"temperature\": 0.0,\n \"output_format_schema\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"text\"],\n \"properties\": { \"text\": { \"type\": \"string\" } }\n },\n \"mcp_servers\": [{\n \"alias\": \"docs\",\n \"url\": \"https://docs.narrative.io/mcp\",\n \"description\": \"Narrative docs MCP server\"\n }]\n }\n}\n```\n\n## Example: conversation using an external OAuth-connected MCP server\n\nFor an external server that requires user authorization, connect it **first** via `POST\n/mcp-connections` (the user consents in a browser; the connection becomes `connected`).\nThen reference the returned `connection_id` in the `mcp_servers` entry — the platform\nattaches and refreshes that connection's bearer token server-side on every tool call. The\ntoken never appears in the payload or run history. `alias` and `url` are still required;\nthe `url` should match the server you connected.\n\n```json\n{\n \"name\": \"hugging face tools\",\n \"system_prompt\": \"Use the available tools to look things up before answering.\",\n \"defaults\": {\n \"model\": \"anthropic.claude-opus-4.6\",\n \"data_plane_id\": \"f79cbdae-4848-47ca-95e8-69588364d185\",\n \"execution_cluster\": \"shared\",\n \"max_iterations\": 8,\n \"max_tokens\": 2048,\n \"temperature\": 0.0,\n \"output_format_schema\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"text\"],\n \"properties\": { \"text\": { \"type\": \"string\" } }\n },\n \"mcp_servers\": [{\n \"alias\": \"hf\",\n \"url\": \"https://huggingface.co/mcp\",\n \"description\": \"Hugging Face MCP server (external, OAuth)\",\n \"connection_id\": \"b3f1c2a4-5d6e-47f8-9a0b-1c2d3e4f5a6b\"\n }]\n }\n}\n```\n\n## Example: conversation with a caller-declared tool (human in the loop)\n\nCaller-declared `tools[]` entries cause the model's call to **pause** the run with\n`status: requires_action`. The caller answers by posting a follow-up run with\n`payload.kind: tool_outputs`. These tools have no alias — the model sees the bare\n`name`, and the platform routes any dash-free tool call to caller-declared resolution.\n\n```json\n{\n \"name\": \"booking flow\",\n \"system_prompt\": \"You are a booking assistant.\",\n \"defaults\": {\n \"model\": \"anthropic.claude-opus-4.6\",\n \"data_plane_id\": \"f79cbdae-4848-47ca-95e8-69588364d185\",\n \"execution_cluster\": \"shared\",\n \"max_iterations\": 5,\n \"output_format_schema\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"text\"],\n \"properties\": { \"text\": { \"type\": \"string\" } }\n },\n \"tools\": [{\n \"name\": \"confirm_booking\",\n \"description\": \"Ask the user to confirm a proposed booking slot.\",\n \"input_schema\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"proposed_slot\"],\n \"properties\": { \"proposed_slot\": { \"type\": \"string\" } }\n }\n }]\n }\n}\n```\n\n## Common 400 errors\n\n| `type` URL slug | Cause |\n|---|---|\n| `/errors/invalid-tool-alias` | MCP alias doesn't match `^[a-zA-Z][a-zA-Z0-9]{0,7}$` |\n| `/errors/duplicate-tool-alias` | Same alias appears twice across `mcp_servers` |\n| `/errors/invalid-caller-tool-name` | Caller-declared `tools[].name` is empty, contains a dash, or exceeds 64 chars |\n| `/errors/duplicate-caller-tool-name` | Same `tools[].name` appears twice |\n| `/errors/tool-name-too-long` | Some MCP wire name `{alias}-{tool_name}` > 64 chars |\n| `/errors/invalid-mcp-server-url` | An `mcp_servers[].url` is not a public https URL |\n| `/errors/reserved-tool-name` | A `tools[].name` takes the name of a platform tool |\n| `/errors/unknown-model` | `thinking` is set and `model` is not a model the platform offers |\n| `/errors/thinking-not-supported` | `thinking` is set for a model that is not offered thinking |\n| `/errors/thinking-setting-not-accepted` | The model does not take this `thinking` setting |\n| `/errors/thinking-budget-too-large` | `thinking.budget_tokens` is not smaller than `max_tokens` |\n\nA body that isn't valid JSON, or doesn't decode (a missing `defaults` field, an unknown\n`execution_cluster`), gets a 400 with an `{error, error_description}` body instead.\n\nSee [Agent Conversations error\ncatalog](https://docs.narrative.io/reference/architecture/agent-conversations/errors/conversation-not-found)\nfor the full list.","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /agents/conversations","href":"/api-reference/agent-conversations/create-an-agent-conversation","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n a: \"a\",\n code: \"code\",\n h2: \"h2\",\n li: \"li\",\n ol: \"ol\",\n p: \"p\",\n pre: \"pre\",\n span: \"span\",\n strong: \"strong\",\n table: \"table\",\n tbody: \"tbody\",\n td: \"td\",\n th: \"th\",\n thead: \"thead\",\n tr: \"tr\",\n ul: \"ul\",\n ..._provideComponents(),\n ...props.components\n }, {CodeBlock} = _components;\n if (!CodeBlock) _missingMdxReference(\"CodeBlock\", true);\n return _jsxs(_Fragment, {\n children: [_jsxs(_components.p, {\n children: [\"Creates a new agent conversation with a pinned \", _jsx(_components.code, {\n children: \"system_prompt\"\n }), \" and a \", _jsx(_components.code, {\n children: \"defaults\"\n }), \" block\\nthat every subsequent run inherits. The conversation starts at \", _jsx(_components.code, {\n children: \"version: 0\"\n }), \" — your\\nfirst run’s \", _jsx(_components.code, {\n children: \"expected_version\"\n }), \" will be \", _jsx(_components.code, {\n children: \"0\"\n }), \".\"]\n }), \"\\n\", _jsx(_components.h2, {\n children: \"What this endpoint actually does\"\n }), \"\\n\", _jsxs(_components.ol, {\n children: [\"\\n\", _jsxs(_components.li, {\n children: [\"Validates the \", _jsx(_components.code, {\n children: \"defaults\"\n }), \" block. Failures here (alias regex, duplicate aliases,\\nwire-name length, missing required fields) return 400 immediately — the\\nconversation row is \", _jsx(_components.strong, {\n children: \"not\"\n }), \" created on validation failure.\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [\"Inserts a row in \", _jsx(_components.code, {\n children: \"agent_conversations\"\n }), \" with \", _jsx(_components.code, {\n children: \"version = 0\"\n }), \", \", _jsx(_components.code, {\n children: \"company_id\"\n }), \" from your\\nbearer token, and the validated \", _jsx(_components.code, {\n children: \"defaults\"\n }), \" serialized as JSONB.\"]\n }), \"\\n\", _jsx(_components.li, {\n children: \"Returns the persisted conversation echo.\"\n }), \"\\n\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"No workflows are started here. The conversation is a long-lived container; the\\nactual model execution happens later, in \", _jsx(_components.code, {\n children: \"POST /agents/conversations/{id}/runs\"\n }), \".\"]\n }), \"\\n\", _jsx(_components.h2, {\n children: \"What you cannot change later\"\n }), \"\\n\", _jsxs(_components.ul, {\n children: [\"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.strong, {\n children: _jsx(_components.code, {\n children: \"system_prompt\"\n })\n }), \" — pinned for the conversation’s lifetime. If you need a\\ndifferent system prompt, create a new conversation.\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.strong, {\n children: _jsx(_components.code, {\n children: \"company_id\"\n })\n }), \" / \", _jsx(_components.strong, {\n children: _jsx(_components.code, {\n children: \"user_id\"\n })\n }), \" — derived from the bearer token at creation time;\\nnot exposed in the request body. Both gate every subsequent read endpoint on this\\nconversation: peers in the same company \", _jsx(_components.strong, {\n children: \"cannot\"\n }), \" see each other’s conversations,\\nruns, or messages. Cross-user access surfaces as 404 — the API does not\\ndistinguish “doesn’t exist” from “owned by another user”.\"]\n }), \"\\n\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Everything else in \", _jsx(_components.code, {\n children: \"defaults\"\n }), \" (model, max_iterations, tools, etc.) is just a default\\n— any individual run can override any of those fields via \", _jsx(_components.code, {\n children: \"config_override\"\n }), \" on its\\n\", _jsx(_components.code, {\n children: \"POST .../runs\"\n }), \" body. See \", _jsx(_components.a, {\n href: \"https://docs.narrative.io/reference/architecture/agent-conversations#run\",\n children: \"Agent Conversations\\nReference\"\n }), \"\\nfor the override semantics.\"]\n }), \"\\n\", _jsx(_components.h2, {\n children: \"Permission\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [_jsx(_components.code, {\n children: \"agent_conversations\"\n }), \" resource with \", _jsx(_components.code, {\n children: \"write\"\n }), \" verb. The same permission gates\\n\", _jsx(_components.code, {\n children: \"POST .../runs\"\n }), \"; \", _jsx(_components.code, {\n children: \"read\"\n }), \" is required for the GET endpoints.\"]\n }), \"\\n\", _jsx(_components.h2, {\n children: \"Example: minimal “hello world” conversation (no tools)\"\n }), \"\\n\", _jsx(CodeBlock, {\n numberOfLines: \"18\",\n language: \"json\",\n children: _jsx(_components.pre, {\n className: \"shiki shiki-themes github-light-default dark-plus\",\n style: {\n backgroundColor: \"#ffffff\",\n \"--shiki-dark-bg\": \"#0B0C0E\",\n color: \"#1f2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n language: \"json\",\n children: _jsxs(_components.code, {\n language: \"json\",\n numberOfLines: \"18\",\n children: [_jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \"{\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"name\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"hello world\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"system_prompt\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"You are a helpful assistant. Answer concisely.\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"defaults\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": {\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"model\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"anthropic.claude-opus-4.6\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"data_plane_id\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"f79cbdae-4848-47ca-95e8-69588364d185\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"execution_cluster\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"shared\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"max_iterations\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#B5CEA8\"\n },\n children: \"10\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"max_tokens\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#B5CEA8\"\n },\n children: \"1024\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"temperature\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#B5CEA8\"\n },\n children: \"0.0\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"output_format_schema\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": {\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"type\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"object\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"additionalProperties\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#569CD6\"\n },\n children: \"false\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"required\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": [\"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"text\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \"],\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"properties\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": { \"\n }), _jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \"\\\"text\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": { \"\n }), _jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \"\\\"type\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"string\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \" } }\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \" }\"\n })\n }), \"\\n\", _jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \" }\"\n })\n }), \"\\n\", _jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \"}\"\n })\n }), \"\\n\"]\n })\n })\n }), \"\\n\", _jsx(_components.h2, {\n children: \"Example: conversation that can search the Narrative docs\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"The \", _jsx(_components.code, {\n children: \"mcp_servers\"\n }), \" entry registers two tools the model can call server-side. The\\nplatform handles the JSON-RPC calls to \", _jsx(_components.code, {\n children: \"https://docs.narrative.io/mcp\"\n }), \" transparently.\"]\n }), \"\\n\", _jsx(CodeBlock, {\n numberOfLines: \"23\",\n language: \"json\",\n children: _jsx(_components.pre, {\n className: \"shiki shiki-themes github-light-default dark-plus\",\n style: {\n backgroundColor: \"#ffffff\",\n \"--shiki-dark-bg\": \"#0B0C0E\",\n color: \"#1f2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n language: \"json\",\n children: _jsxs(_components.code, {\n language: \"json\",\n numberOfLines: \"23\",\n children: [_jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \"{\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"name\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"docs search\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"system_prompt\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"Use the available tools to look things up before answering.\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"defaults\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": {\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"model\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"anthropic.claude-opus-4.6\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"data_plane_id\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"f79cbdae-4848-47ca-95e8-69588364d185\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"execution_cluster\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"shared\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"max_iterations\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#B5CEA8\"\n },\n children: \"8\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"max_tokens\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#B5CEA8\"\n },\n children: \"2048\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"temperature\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#B5CEA8\"\n },\n children: \"0.0\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"output_format_schema\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": {\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"type\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"object\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"additionalProperties\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#569CD6\"\n },\n children: \"false\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"required\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": [\"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"text\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \"],\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"properties\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": { \"\n }), _jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \"\\\"text\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": { \"\n }), _jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \"\\\"type\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"string\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \" } }\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"mcp_servers\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": [{\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"alias\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"docs\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"url\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"https://docs.narrative.io/mcp\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"description\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"Narrative docs MCP server\\\"\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \" }]\"\n })\n }), \"\\n\", _jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \" }\"\n })\n }), \"\\n\", _jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \"}\"\n })\n }), \"\\n\"]\n })\n })\n }), \"\\n\", _jsx(_components.h2, {\n children: \"Example: conversation using an external OAuth-connected MCP server\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"For an external server that requires user authorization, connect it \", _jsx(_components.strong, {\n children: \"first\"\n }), \" via \", _jsx(_components.code, {\n children: \"POST /mcp-connections\"\n }), \" (the user consents in a browser; the connection becomes \", _jsx(_components.code, {\n children: \"connected\"\n }), \").\\nThen reference the returned \", _jsx(_components.code, {\n children: \"connection_id\"\n }), \" in the \", _jsx(_components.code, {\n children: \"mcp_servers\"\n }), \" entry — the platform\\nattaches and refreshes that connection’s bearer token server-side on every tool call. The\\ntoken never appears in the payload or run history. \", _jsx(_components.code, {\n children: \"alias\"\n }), \" and \", _jsx(_components.code, {\n children: \"url\"\n }), \" are still required;\\nthe \", _jsx(_components.code, {\n children: \"url\"\n }), \" should match the server you connected.\"]\n }), \"\\n\", _jsx(CodeBlock, {\n numberOfLines: \"24\",\n language: \"json\",\n children: _jsx(_components.pre, {\n className: \"shiki shiki-themes github-light-default dark-plus\",\n style: {\n backgroundColor: \"#ffffff\",\n \"--shiki-dark-bg\": \"#0B0C0E\",\n color: \"#1f2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n language: \"json\",\n children: _jsxs(_components.code, {\n language: \"json\",\n numberOfLines: \"24\",\n children: [_jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \"{\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"name\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"hugging face tools\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"system_prompt\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"Use the available tools to look things up before answering.\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"defaults\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": {\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"model\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"anthropic.claude-opus-4.6\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"data_plane_id\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"f79cbdae-4848-47ca-95e8-69588364d185\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"execution_cluster\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"shared\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"max_iterations\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#B5CEA8\"\n },\n children: \"8\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"max_tokens\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#B5CEA8\"\n },\n children: \"2048\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"temperature\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#B5CEA8\"\n },\n children: \"0.0\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"output_format_schema\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": {\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"type\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"object\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"additionalProperties\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#569CD6\"\n },\n children: \"false\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"required\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": [\"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"text\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \"],\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"properties\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": { \"\n }), _jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \"\\\"text\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": { \"\n }), _jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \"\\\"type\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"string\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \" } }\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"mcp_servers\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": [{\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"alias\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"hf\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"url\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"https://huggingface.co/mcp\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"description\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"Hugging Face MCP server (external, OAuth)\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"connection_id\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"b3f1c2a4-5d6e-47f8-9a0b-1c2d3e4f5a6b\\\"\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \" }]\"\n })\n }), \"\\n\", _jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \" }\"\n })\n }), \"\\n\", _jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \"}\"\n })\n }), \"\\n\"]\n })\n })\n }), \"\\n\", _jsx(_components.h2, {\n children: \"Example: conversation with a caller-declared tool (human in the loop)\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Caller-declared \", _jsx(_components.code, {\n children: \"tools[]\"\n }), \" entries cause the model’s call to \", _jsx(_components.strong, {\n children: \"pause\"\n }), \" the run with\\n\", _jsx(_components.code, {\n children: \"status: requires_action\"\n }), \". The caller answers by posting a follow-up run with\\n\", _jsx(_components.code, {\n children: \"payload.kind: tool_outputs\"\n }), \". These tools have no alias — the model sees the bare\\n\", _jsx(_components.code, {\n children: \"name\"\n }), \", and the platform routes any dash-free tool call to caller-declared resolution.\"]\n }), \"\\n\", _jsx(CodeBlock, {\n numberOfLines: \"26\",\n language: \"json\",\n children: _jsx(_components.pre, {\n className: \"shiki shiki-themes github-light-default dark-plus\",\n style: {\n backgroundColor: \"#ffffff\",\n \"--shiki-dark-bg\": \"#0B0C0E\",\n color: \"#1f2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n language: \"json\",\n children: _jsxs(_components.code, {\n language: \"json\",\n numberOfLines: \"26\",\n children: [_jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \"{\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"name\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"booking flow\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"system_prompt\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"You are a booking assistant.\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"defaults\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": {\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"model\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"anthropic.claude-opus-4.6\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"data_plane_id\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"f79cbdae-4848-47ca-95e8-69588364d185\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"execution_cluster\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"shared\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"max_iterations\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#B5CEA8\"\n },\n children: \"5\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"output_format_schema\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": {\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"type\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"object\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"additionalProperties\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#569CD6\"\n },\n children: \"false\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"required\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": [\"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"text\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \"],\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"properties\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": { \"\n }), _jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \"\\\"text\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": { \"\n }), _jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \"\\\"type\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"string\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \" } }\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"tools\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": [{\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"name\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"confirm_booking\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"description\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"Ask the user to confirm a proposed booking slot.\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"input_schema\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": {\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"type\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"object\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"additionalProperties\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#569CD6\"\n },\n children: \"false\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"required\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": [\"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"proposed_slot\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \"],\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"properties\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": { \"\n }), _jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \"\\\"proposed_slot\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": { \"\n }), _jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \"\\\"type\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"string\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \" } }\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \" }\"\n })\n }), \"\\n\", _jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \" }]\"\n })\n }), \"\\n\", _jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \" }\"\n })\n }), \"\\n\", _jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \"}\"\n })\n }), \"\\n\"]\n })\n })\n }), \"\\n\", _jsx(_components.h2, {\n children: \"Common 400 errors\"\n }), \"\\n\", _jsxs(_components.table, {\n children: [_jsx(_components.thead, {\n children: _jsxs(_components.tr, {\n children: [_jsxs(_components.th, {\n children: [_jsx(_components.code, {\n children: \"type\"\n }), \" URL slug\"]\n }), _jsx(_components.th, {\n children: \"Cause\"\n })]\n })\n }), _jsxs(_components.tbody, {\n children: [_jsxs(_components.tr, {\n children: [_jsx(_components.td, {\n children: _jsx(_components.code, {\n children: \"/errors/invalid-tool-alias\"\n })\n }), _jsxs(_components.td, {\n children: [\"MCP alias doesn’t match \", _jsx(_components.code, {\n children: \"^[a-zA-Z][a-zA-Z0-9]{0,7}$\"\n })]\n })]\n }), _jsxs(_components.tr, {\n children: [_jsx(_components.td, {\n children: _jsx(_components.code, {\n children: \"/errors/duplicate-tool-alias\"\n })\n }), _jsxs(_components.td, {\n children: [\"Same alias appears twice across \", _jsx(_components.code, {\n children: \"mcp_servers\"\n })]\n })]\n }), _jsxs(_components.tr, {\n children: [_jsx(_components.td, {\n children: _jsx(_components.code, {\n children: \"/errors/invalid-caller-tool-name\"\n })\n }), _jsxs(_components.td, {\n children: [\"Caller-declared \", _jsx(_components.code, {\n children: \"tools[].name\"\n }), \" is empty, contains a dash, or exceeds 64 chars\"]\n })]\n }), _jsxs(_components.tr, {\n children: [_jsx(_components.td, {\n children: _jsx(_components.code, {\n children: \"/errors/duplicate-caller-tool-name\"\n })\n }), _jsxs(_components.td, {\n children: [\"Same \", _jsx(_components.code, {\n children: \"tools[].name\"\n }), \" appears twice\"]\n })]\n }), _jsxs(_components.tr, {\n children: [_jsx(_components.td, {\n children: _jsx(_components.code, {\n children: \"/errors/tool-name-too-long\"\n })\n }), _jsxs(_components.td, {\n children: [\"Some MCP wire name \", _jsx(_components.code, {\n children: \"{alias}-{tool_name}\"\n }), \" > 64 chars\"]\n })]\n }), _jsxs(_components.tr, {\n children: [_jsx(_components.td, {\n children: _jsx(_components.code, {\n children: \"/errors/invalid-mcp-server-url\"\n })\n }), _jsxs(_components.td, {\n children: [\"An \", _jsx(_components.code, {\n children: \"mcp_servers[].url\"\n }), \" is not a public https URL\"]\n })]\n }), _jsxs(_components.tr, {\n children: [_jsx(_components.td, {\n children: _jsx(_components.code, {\n children: \"/errors/reserved-tool-name\"\n })\n }), _jsxs(_components.td, {\n children: [\"A \", _jsx(_components.code, {\n children: \"tools[].name\"\n }), \" takes the name of a platform tool\"]\n })]\n }), _jsxs(_components.tr, {\n children: [_jsx(_components.td, {\n children: _jsx(_components.code, {\n children: \"/errors/unknown-model\"\n })\n }), _jsxs(_components.td, {\n children: [_jsx(_components.code, {\n children: \"thinking\"\n }), \" is set and \", _jsx(_components.code, {\n children: \"model\"\n }), \" is not a model the platform offers\"]\n })]\n }), _jsxs(_components.tr, {\n children: [_jsx(_components.td, {\n children: _jsx(_components.code, {\n children: \"/errors/thinking-not-supported\"\n })\n }), _jsxs(_components.td, {\n children: [_jsx(_components.code, {\n children: \"thinking\"\n }), \" is set for a model that is not offered thinking\"]\n })]\n }), _jsxs(_components.tr, {\n children: [_jsx(_components.td, {\n children: _jsx(_components.code, {\n children: \"/errors/thinking-setting-not-accepted\"\n })\n }), _jsxs(_components.td, {\n children: [\"The model does not take this \", _jsx(_components.code, {\n children: \"thinking\"\n }), \" setting\"]\n })]\n }), _jsxs(_components.tr, {\n children: [_jsx(_components.td, {\n children: _jsx(_components.code, {\n children: \"/errors/thinking-budget-too-large\"\n })\n }), _jsxs(_components.td, {\n children: [_jsx(_components.code, {\n children: \"thinking.budget_tokens\"\n }), \" is not smaller than \", _jsx(_components.code, {\n children: \"max_tokens\"\n })]\n })]\n })]\n })]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"A body that isn’t valid JSON, or doesn’t decode (a missing \", _jsx(_components.code, {\n children: \"defaults\"\n }), \" field, an unknown\\n\", _jsx(_components.code, {\n children: \"execution_cluster\"\n }), \"), gets a 400 with an \", _jsx(_components.code, {\n children: \"{error, error_description}\"\n }), \" body instead.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"See \", _jsx(_components.a, {\n href: \"https://docs.narrative.io/reference/architecture/agent-conversations/errors/conversation-not-found\",\n children: \"Agent Conversations error\\ncatalog\"\n }), \"\\nfor the full list.\"]\n })]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\nfunction _missingMdxReference(id, component) {\n throw new Error(\"Expected \" + (component ? \"component\" : \"object\") + \" `\" + id + \"` to be defined: you likely forgot to import, pass, or provide it.\");\n}\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Create an agent conversation","description":"Creates a new agent conversation with a pinned `system_prompt` and a `defaults` block\nthat every subsequent run inherits. The conversation starts at `version: 0` — your\nfirst run's `expected_version` will be `0`.\n\n## What this endpoint actually does\n\n1. Validates the `defaults` block. Failures here (alias regex, duplicate aliases,\n wire-name length, missing required fields) return 400 immediately — the\n conversation row is **not** created on validation failure.\n2. Inserts a row in `agent_conversations` with `version = 0`, `company_id` from your\n bearer token, and the validated `defaults` serialized as JSONB.\n3. Returns the persisted conversation echo.\n\nNo workflows are started here. The conversation is a long-lived container; the\nactual model execution happens later, in `POST /agents/conversations/{id}/runs`.\n\n## What you cannot change later\n\n- **`system_prompt`** — pinned for the conversation's lifetime. If you need a\n different system prompt, create a new conversation.\n- **`company_id`** / **`user_id`** — derived from the bearer token at creation time;\n not exposed in the request body. Both gate every subsequent read endpoint on this\n conversation: peers in the same company **cannot** see each other's conversations,\n runs, or messages. Cross-user access surfaces as 404 — the API does not\n distinguish \"doesn't exist\" from \"owned by another user\".\n\nEverything else in `defaults` (model, max_iterations, tools, etc.) is just a default\n— any individual run can override any of those fields via `config_override` on its\n`POST .../runs` body. See [Agent Conversations\nReference](https://docs.narrative.io/reference/architecture/agent-conversations#run)\nfor the override semantics.\n\n## Permission\n\n`agent_conversations` resource with `write` verb. The same permission gates\n`POST .../runs`; `read` is required for the GET endpoints.\n\n## Example: minimal \"hello world\" conversation (no tools)\n\n```json\n{\n \"name\": \"hello world\",\n \"system_prompt\": \"You are a helpful assistant. Answer concisely.\",\n \"defaults\": {\n \"model\": \"anthropic.claude-opus-4.6\",\n \"data_plane_id\": \"f79cbdae-4848-47ca-95e8-69588364d185\",\n \"execution_cluster\": \"shared\",\n \"max_iterations\": 10,\n \"max_tokens\": 1024,\n \"temperature\": 0.0,\n \"output_format_schema\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"text\"],\n \"properties\": { \"text\": { \"type\": \"string\" } }\n }\n }\n}\n```\n\n## Example: conversation that can search the Narrative docs\n\nThe `mcp_servers` entry registers two tools the model can call server-side. The\nplatform handles the JSON-RPC calls to `https://docs.narrative.io/mcp` transparently.\n\n```json\n{\n \"name\": \"docs search\",\n \"system_prompt\": \"Use the available tools to look things up before answering.\",\n \"defaults\": {\n \"model\": \"anthropic.claude-opus-4.6\",\n \"data_plane_id\": \"f79cbdae-4848-47ca-95e8-69588364d185\",\n \"execution_cluster\": \"shared\",\n \"max_iterations\": 8,\n \"max_tokens\": 2048,\n \"temperature\": 0.0,\n \"output_format_schema\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"text\"],\n \"properties\": { \"text\": { \"type\": \"string\" } }\n },\n \"mcp_servers\": [{\n \"alias\": \"docs\",\n \"url\": \"https://docs.narrative.io/mcp\",\n \"description\": \"Narrative docs MCP server\"\n }]\n }\n}\n```\n\n## Example: conversation using an external OAuth-connected MCP server\n\nFor an external server that requires user authorization, connect it **first** via `POST\n/mcp-connections` (the user consents in a browser; the connection becomes `connected`).\nThen reference the returned `connection_id` in the `mcp_servers` entry — the platform\nattaches and refreshes that connection's bearer token server-side on every tool call. The\ntoken never appears in the payload or run history. `alias` and `url` are still required;\nthe `url` should match the server you connected.\n\n```json\n{\n \"name\": \"hugging face tools\",\n \"system_prompt\": \"Use the available tools to look things up before answering.\",\n \"defaults\": {\n \"model\": \"anthropic.claude-opus-4.6\",\n \"data_plane_id\": \"f79cbdae-4848-47ca-95e8-69588364d185\",\n \"execution_cluster\": \"shared\",\n \"max_iterations\": 8,\n \"max_tokens\": 2048,\n \"temperature\": 0.0,\n \"output_format_schema\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"text\"],\n \"properties\": { \"text\": { \"type\": \"string\" } }\n },\n \"mcp_servers\": [{\n \"alias\": \"hf\",\n \"url\": \"https://huggingface.co/mcp\",\n \"description\": \"Hugging Face MCP server (external, OAuth)\",\n \"connection_id\": \"b3f1c2a4-5d6e-47f8-9a0b-1c2d3e4f5a6b\"\n }]\n }\n}\n```\n\n## Example: conversation with a caller-declared tool (human in the loop)\n\nCaller-declared `tools[]` entries cause the model's call to **pause** the run with\n`status: requires_action`. The caller answers by posting a follow-up run with\n`payload.kind: tool_outputs`. These tools have no alias — the model sees the bare\n`name`, and the platform routes any dash-free tool call to caller-declared resolution.\n\n```json\n{\n \"name\": \"booking flow\",\n \"system_prompt\": \"You are a booking assistant.\",\n \"defaults\": {\n \"model\": \"anthropic.claude-opus-4.6\",\n \"data_plane_id\": \"f79cbdae-4848-47ca-95e8-69588364d185\",\n \"execution_cluster\": \"shared\",\n \"max_iterations\": 5,\n \"output_format_schema\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"text\"],\n \"properties\": { \"text\": { \"type\": \"string\" } }\n },\n \"tools\": [{\n \"name\": \"confirm_booking\",\n \"description\": \"Ask the user to confirm a proposed booking slot.\",\n \"input_schema\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"proposed_slot\"],\n \"properties\": { \"proposed_slot\": { \"type\": \"string\" } }\n }\n }]\n }\n}\n```\n\n## Common 400 errors\n\n| `type` URL slug | Cause |\n|---|---|\n| `/errors/invalid-tool-alias` | MCP alias doesn't match `^[a-zA-Z][a-zA-Z0-9]{0,7}$` |\n| `/errors/duplicate-tool-alias` | Same alias appears twice across `mcp_servers` |\n| `/errors/invalid-caller-tool-name` | Caller-declared `tools[].name` is empty, contains a dash, or exceeds 64 chars |\n| `/errors/duplicate-caller-tool-name` | Same `tools[].name` appears twice |\n| `/errors/tool-name-too-long` | Some MCP wire name `{alias}-{tool_name}` > 64 chars |\n| `/errors/invalid-mcp-server-url` | An `mcp_servers[].url` is not a public https URL |\n| `/errors/reserved-tool-name` | A `tools[].name` takes the name of a platform tool |\n| `/errors/unknown-model` | `thinking` is set and `model` is not a model the platform offers |\n| `/errors/thinking-not-supported` | `thinking` is set for a model that is not offered thinking |\n| `/errors/thinking-setting-not-accepted` | The model does not take this `thinking` setting |\n| `/errors/thinking-budget-too-large` | `thinking.budget_tokens` is not smaller than `max_tokens` |\n\nA body that isn't valid JSON, or doesn't decode (a missing `defaults` field, an unknown\n`execution_cluster`), gets a 400 with an `{error, error_description}` body instead.\n\nSee [Agent Conversations error\ncatalog](https://docs.narrative.io/reference/architecture/agent-conversations/errors/conversation-not-found)\nfor the full list.","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /agents/conversations","href":"/api-reference/agent-conversations/create-an-agent-conversation","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":["/_mintlify/custom/narrative-07c7a1f7/d5d45b2d00effc8b/secure-privacy.js"],"openApiReferenceData":{"operation":{"operationId":"createAgentConversation","summary":"Create an agent conversation","description":"Creates a new agent conversation with a pinned `system_prompt` and a `defaults` block\nthat every subsequent run inherits. The conversation starts at `version: 0` — your\nfirst run's `expected_version` will be `0`.\n\n## What this endpoint actually does\n\n1. Validates the `defaults` block. Failures here (alias regex, duplicate aliases,\n wire-name length, missing required fields) return 400 immediately — the\n conversation row is **not** created on validation failure.\n2. Inserts a row in `agent_conversations` with `version = 0`, `company_id` from your\n bearer token, and the validated `defaults` serialized as JSONB.\n3. Returns the persisted conversation echo.\n\nNo workflows are started here. The conversation is a long-lived container; the\nactual model execution happens later, in `POST /agents/conversations/{id}/runs`.\n\n## What you cannot change later\n\n- **`system_prompt`** — pinned for the conversation's lifetime. If you need a\n different system prompt, create a new conversation.\n- **`company_id`** / **`user_id`** — derived from the bearer token at creation time;\n not exposed in the request body. Both gate every subsequent read endpoint on this\n conversation: peers in the same company **cannot** see each other's conversations,\n runs, or messages. Cross-user access surfaces as 404 — the API does not\n distinguish \"doesn't exist\" from \"owned by another user\".\n\nEverything else in `defaults` (model, max_iterations, tools, etc.) is just a default\n— any individual run can override any of those fields via `config_override` on its\n`POST .../runs` body. See [Agent Conversations\nReference](https://docs.narrative.io/reference/architecture/agent-conversations#run)\nfor the override semantics.\n\n## Permission\n\n`agent_conversations` resource with `write` verb. The same permission gates\n`POST .../runs`; `read` is required for the GET endpoints.\n\n## Example: minimal \"hello world\" conversation (no tools)\n\n```json\n{\n \"name\": \"hello world\",\n \"system_prompt\": \"You are a helpful assistant. Answer concisely.\",\n \"defaults\": {\n \"model\": \"anthropic.claude-opus-4.6\",\n \"data_plane_id\": \"f79cbdae-4848-47ca-95e8-69588364d185\",\n \"execution_cluster\": \"shared\",\n \"max_iterations\": 10,\n \"max_tokens\": 1024,\n \"temperature\": 0.0,\n \"output_format_schema\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"text\"],\n \"properties\": { \"text\": { \"type\": \"string\" } }\n }\n }\n}\n```\n\n## Example: conversation that can search the Narrative docs\n\nThe `mcp_servers` entry registers two tools the model can call server-side. The\nplatform handles the JSON-RPC calls to `https://docs.narrative.io/mcp` transparently.\n\n```json\n{\n \"name\": \"docs search\",\n \"system_prompt\": \"Use the available tools to look things up before answering.\",\n \"defaults\": {\n \"model\": \"anthropic.claude-opus-4.6\",\n \"data_plane_id\": \"f79cbdae-4848-47ca-95e8-69588364d185\",\n \"execution_cluster\": \"shared\",\n \"max_iterations\": 8,\n \"max_tokens\": 2048,\n \"temperature\": 0.0,\n \"output_format_schema\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"text\"],\n \"properties\": { \"text\": { \"type\": \"string\" } }\n },\n \"mcp_servers\": [{\n \"alias\": \"docs\",\n \"url\": \"https://docs.narrative.io/mcp\",\n \"description\": \"Narrative docs MCP server\"\n }]\n }\n}\n```\n\n## Example: conversation using an external OAuth-connected MCP server\n\nFor an external server that requires user authorization, connect it **first** via `POST\n/mcp-connections` (the user consents in a browser; the connection becomes `connected`).\nThen reference the returned `connection_id` in the `mcp_servers` entry — the platform\nattaches and refreshes that connection's bearer token server-side on every tool call. The\ntoken never appears in the payload or run history. `alias` and `url` are still required;\nthe `url` should match the server you connected.\n\n```json\n{\n \"name\": \"hugging face tools\",\n \"system_prompt\": \"Use the available tools to look things up before answering.\",\n \"defaults\": {\n \"model\": \"anthropic.claude-opus-4.6\",\n \"data_plane_id\": \"f79cbdae-4848-47ca-95e8-69588364d185\",\n \"execution_cluster\": \"shared\",\n \"max_iterations\": 8,\n \"max_tokens\": 2048,\n \"temperature\": 0.0,\n \"output_format_schema\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"text\"],\n \"properties\": { \"text\": { \"type\": \"string\" } }\n },\n \"mcp_servers\": [{\n \"alias\": \"hf\",\n \"url\": \"https://huggingface.co/mcp\",\n \"description\": \"Hugging Face MCP server (external, OAuth)\",\n \"connection_id\": \"b3f1c2a4-5d6e-47f8-9a0b-1c2d3e4f5a6b\"\n }]\n }\n}\n```\n\n## Example: conversation with a caller-declared tool (human in the loop)\n\nCaller-declared `tools[]` entries cause the model's call to **pause** the run with\n`status: requires_action`. The caller answers by posting a follow-up run with\n`payload.kind: tool_outputs`. These tools have no alias — the model sees the bare\n`name`, and the platform routes any dash-free tool call to caller-declared resolution.\n\n```json\n{\n \"name\": \"booking flow\",\n \"system_prompt\": \"You are a booking assistant.\",\n \"defaults\": {\n \"model\": \"anthropic.claude-opus-4.6\",\n \"data_plane_id\": \"f79cbdae-4848-47ca-95e8-69588364d185\",\n \"execution_cluster\": \"shared\",\n \"max_iterations\": 5,\n \"output_format_schema\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"text\"],\n \"properties\": { \"text\": { \"type\": \"string\" } }\n },\n \"tools\": [{\n \"name\": \"confirm_booking\",\n \"description\": \"Ask the user to confirm a proposed booking slot.\",\n \"input_schema\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"proposed_slot\"],\n \"properties\": { \"proposed_slot\": { \"type\": \"string\" } }\n }\n }]\n }\n}\n```\n\n## Common 400 errors\n\n| `type` URL slug | Cause |\n|---|---|\n| `/errors/invalid-tool-alias` | MCP alias doesn't match `^[a-zA-Z][a-zA-Z0-9]{0,7}$` |\n| `/errors/duplicate-tool-alias` | Same alias appears twice across `mcp_servers` |\n| `/errors/invalid-caller-tool-name` | Caller-declared `tools[].name` is empty, contains a dash, or exceeds 64 chars |\n| `/errors/duplicate-caller-tool-name` | Same `tools[].name` appears twice |\n| `/errors/tool-name-too-long` | Some MCP wire name `{alias}-{tool_name}` > 64 chars |\n| `/errors/invalid-mcp-server-url` | An `mcp_servers[].url` is not a public https URL |\n| `/errors/reserved-tool-name` | A `tools[].name` takes the name of a platform tool |\n| `/errors/unknown-model` | `thinking` is set and `model` is not a model the platform offers |\n| `/errors/thinking-not-supported` | `thinking` is set for a model that is not offered thinking |\n| `/errors/thinking-setting-not-accepted` | The model does not take this `thinking` setting |\n| `/errors/thinking-budget-too-large` | `thinking.budget_tokens` is not smaller than `max_tokens` |\n\nA body that isn't valid JSON, or doesn't decode (a missing `defaults` field, an unknown\n`execution_cluster`), gets a 400 with an `{error, error_description}` body instead.\n\nSee [Agent Conversations error\ncatalog](https://docs.narrative.io/reference/architecture/agent-conversations/errors/conversation-not-found)\nfor the full list.","tags":["Agent Conversations"],"security":["6a73f1d3-8ca3-4706-a449-c3800f826224"],"requestBody":"029ac12d-8e40-4226-bf51-2de45688b869","responses":{"201":"af350268-a903-40b0-beb9-c2c27222f156","400":"2ef53dd2-2695-4e1a-ac89-e885940516de","401":"8e2f76df-802e-4ff0-851c-c75abc98eabc","403":"cb85c8bb-d34c-41a3-a63f-33a70386882f"},"method":"post","type":"path","servers":["c373cfef-d90d-409d-b76b-a55dea8a5d24","94de0478-ac55-41e7-a375-55d1494103a0"],"path":"/agents/conversations","baseUrlOptions":["https://api-dev.narrative.io","https://api.narrative.io"],"title":"Create an agent conversation","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{},"requestBody":{"required":true,"content":{"application/json":{"schema":{"description":"Create an empty conversation with a pinned `system_prompt` and a `defaults` block\nthat every subsequent run inherits (and may sparsely override via `config_override`).\n\nThe `system_prompt` is **permanently fixed**. Everything in `defaults` is, well, a\ndefault — runs can replace any individual field.","type":"object","required":["defaults"],"properties":{"defaults":{"description":"The configuration applied to every run on this conversation by default. Each field\ncan be overridden per-run via `config_override` on the `POST .../runs` body, **except\n`system_prompt`** which is fixed at conversation creation time.\n\nFor `mcp_servers` and `tools`, overrides **replace the whole list**, not individual\nentries. There is no per-server or per-tool merge — set the complete catalog you want\nfor that run.\n\nIn a request only `model`, `data_plane_id` and `execution_cluster` are required. A response\n(`defaults`, `effective_config`) always carries every key, with `null` for an optional field\nthat has no value.","type":"object","required":["model","data_plane_id","execution_cluster"],"properties":{"model":{"type":"string","description":"The language model identifier. The platform exposes a fixed set; check the\n[Model Inference reference](https://docs.narrative.io/reference/model-inference)\nfor current supported values.","example":"anthropic.claude-opus-4.6","isRequired":true,"uniqueKey":"defaults.model","typeLabel":"string"},"data_plane_id":{"type":"string","format":"uuid","description":"UUID of the data plane (compute environment) that hosts the inference job\nexecutor. Each company has at least one data plane. Get it from your platform\nadmin or `GET /data-planes`.","example":"f79cbdae-4848-47ca-95e8-69588364d185","isRequired":true,"uniqueKey":"defaults.data_plane_id","typeLabel":"string\u003cuuid>"},"execution_cluster":{"type":"string","enum":["shared","dedicated"],"description":"Which job-executor pool dispatches the inference call to AWS Bedrock or Snowflake\nCortex. The executor doesn't run the model itself — that happens in the external\nservice — it only routes the HTTP request.\n\n**Use `shared` for almost every case.** `dedicated` is only relevant if your\ncompany runs a dedicated executor pool for isolation reasons.","example":"shared","isRequired":true,"uniqueKey":"defaults.execution_cluster","typeLabel":"enum\u003cstring>"},"compute_pool_id":{"oneOf":[{"type":"string","format":"uuid","description":"Optional compute pool override. Only relevant for `execution_cluster: dedicated`\n— pinpoints a specific compute pool inside that cluster.","uniqueKey":"defaults.compute_pool_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"type":"null","format":"uuid","description":"Optional compute pool override. Only relevant for `execution_cluster: dedicated`\n— pinpoints a specific compute pool inside that cluster.","uniqueKey":"defaults.compute_pool_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"defaults.compute_pool_id","typeLabel":"string\u003cuuid> | null"},"max_iterations":{"type":"integer","minimum":1,"default":10,"description":"Maximum number of inference rounds the workflow may perform before failing with\n[Max Iterations Exceeded](https://docs.narrative.io/reference/architecture/agent-conversations/errors/max-iterations-exceeded).\nEach iteration is one inference job (one Bedrock/Cortex call), and every tool call\nthe model makes spends one — including `job_monitor` and `wait_for`, so waiting on\na job it started costs three rounds before the answer. Multi-step research flows\noften need 8–15; a one-shot question needs 1–2.","example":8,"uniqueKey":"defaults.max_iterations","typeLabel":"integer"},"max_tokens":{"oneOf":[{"type":"integer","minimum":1,"default":2048,"description":"Cap on the model's reply length **per iteration** (does not include the prompt). Omitting\nthe field gives 2048; an explicit `null` leaves it unset for the run.\nBedrock-side enforced. If the model hits this limit mid-JSON, the response will\nfail to validate against `output_format_schema` —\n[Schema Decode Failed](https://docs.narrative.io/reference/architecture/agent-conversations/errors/schema-decode-failed).","example":2048,"uniqueKey":"defaults.max_tokens.oneOf.0","typeLabel":"integer"},{"type":"null","minimum":1,"default":2048,"description":"Cap on the model's reply length **per iteration** (does not include the prompt). Omitting\nthe field gives 2048; an explicit `null` leaves it unset for the run.\nBedrock-side enforced. If the model hits this limit mid-JSON, the response will\nfail to validate against `output_format_schema` —\n[Schema Decode Failed](https://docs.narrative.io/reference/architecture/agent-conversations/errors/schema-decode-failed).","example":2048,"uniqueKey":"defaults.max_tokens.oneOf.1","typeLabel":"null"}],"uniqueKey":"defaults.max_tokens","typeLabel":"integer | null"},"temperature":{"oneOf":[{"type":"number","minimum":0,"maximum":1,"default":0,"description":"Sampling temperature. Omitting the field gives `0.0`; an explicit `null` leaves it unset\nfor the run. `0.0` is deterministic-ish (best for structured / factual\nanswers); higher values introduce randomness (helpful for brainstorming).","example":0,"uniqueKey":"defaults.temperature.oneOf.0","typeLabel":"number"},{"type":"null","minimum":0,"maximum":1,"default":0,"description":"Sampling temperature. Omitting the field gives `0.0`; an explicit `null` leaves it unset\nfor the run. `0.0` is deterministic-ish (best for structured / factual\nanswers); higher values introduce randomness (helpful for brainstorming).","example":0,"uniqueKey":"defaults.temperature.oneOf.1","typeLabel":"null"}],"uniqueKey":"defaults.temperature","typeLabel":"number | null"},"thinking":{"oneOf":[{"type":"string","description":"Omit (or send null) to get the model's own behaviour. Cannot be combined with a run's\n`tool_choice` of `specific_tool` or `any` — a forced tool stops the model reasoning, so the\ncombination is refused\n([Thinking With Forced Tool Choice](https://docs.narrative.io/reference/architecture/agent-conversations/errors/thinking-with-forced-tool-choice)).\nA model that is not offered thinking rejects the field outright\n([Thinking Not Supported](https://docs.narrative.io/reference/architecture/agent-conversations/errors/thinking-not-supported)).","enum":["disabled","off"],"example":{"type":"effort","level":"high"},"uniqueKey":"defaults.thinking.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"object","description":"Omit (or send null) to get the model's own behaviour. Cannot be combined with a run's\n`tool_choice` of `specific_tool` or `any` — a forced tool stops the model reasoning, so the\ncombination is refused\n([Thinking With Forced Tool Choice](https://docs.narrative.io/reference/architecture/agent-conversations/errors/thinking-with-forced-tool-choice)).\nA model that is not offered thinking rejects the field outright\n([Thinking Not Supported](https://docs.narrative.io/reference/architecture/agent-conversations/errors/thinking-not-supported)).","required":["type","level"],"example":{"type":"effort","level":"high"},"properties":{"type":{"type":"string","enum":["effort"],"isRequired":true,"uniqueKey":"defaults.thinking.oneOf.1.type","typeLabel":"enum\u003cstring>"},"level":{"type":"string","enum":["low","medium","high"],"isRequired":true,"uniqueKey":"defaults.thinking.oneOf.1.level","typeLabel":"enum\u003cstring>"}},"additionalProperties":false,"uniqueKey":"defaults.thinking.oneOf.1","typeLabel":"object"},{"type":"object","description":"Omit (or send null) to get the model's own behaviour. Cannot be combined with a run's\n`tool_choice` of `specific_tool` or `any` — a forced tool stops the model reasoning, so the\ncombination is refused\n([Thinking With Forced Tool Choice](https://docs.narrative.io/reference/architecture/agent-conversations/errors/thinking-with-forced-tool-choice)).\nA model that is not offered thinking rejects the field outright\n([Thinking Not Supported](https://docs.narrative.io/reference/architecture/agent-conversations/errors/thinking-not-supported)).","required":["type","budget_tokens"],"example":{"type":"effort"},"properties":{"type":{"type":"string","enum":["budget"],"isRequired":true,"uniqueKey":"defaults.thinking.oneOf.2.type","typeLabel":"enum\u003cstring>"},"budget_tokens":{"type":"integer","minimum":1024,"description":"Tokens the model may spend thinking. The floor of 1024 is the provider's. Must be smaller\nthan `max_tokens` — thinking is spent from the same output budget as the answer, so a\nbudget that fills it leaves nothing to answer with\n([Thinking Budget Too Large](https://docs.narrative.io/reference/architecture/agent-conversations/errors/thinking-budget-too-large)).","isRequired":true,"uniqueKey":"defaults.thinking.oneOf.2.budget_tokens","typeLabel":"integer"}},"additionalProperties":false,"uniqueKey":"defaults.thinking.oneOf.2","typeLabel":"object"},{"type":"null","description":"Omit (or send null) to get the model's own behaviour. Cannot be combined with a run's\n`tool_choice` of `specific_tool` or `any` — a forced tool stops the model reasoning, so the\ncombination is refused\n([Thinking With Forced Tool Choice](https://docs.narrative.io/reference/architecture/agent-conversations/errors/thinking-with-forced-tool-choice)).\nA model that is not offered thinking rejects the field outright\n([Thinking Not Supported](https://docs.narrative.io/reference/architecture/agent-conversations/errors/thinking-not-supported)).","uniqueKey":"defaults.thinking.oneOf.3","typeLabel":"null"}],"uniqueKey":"defaults.thinking","typeLabel":"enum\u003cstring> · object · object · null"},"output_format_schema":{"oneOf":[{"type":"object","description":"JSON Schema describing the final answer's structure. When it is set the run is in\nstructured mode: the answer comes back verbatim in `final_structured_output`. When it is\nnull the answer comes back as plain text in `final_text`.\n\n**Supports a subset of Draft 2020-12** — the same subset Bedrock structured\noutput accepts. Not supported: `oneOf`, `anyOf`, `allOf`, `not`, `$ref`,\n`$defs`, `if/then/else`, `pattern`, `format`. Supported: `type`, `properties`,\n`required`, `enum`, `additionalProperties: false`, `minimum`/`maximum` on\nnumbers, `minLength`/`maxLength` on strings, `minItems`/`maxItems` on arrays.\n\nSee\n[JSON Schema Reference](https://docs.narrative.io/reference/model-inference/json-schema-reference)\nfor the canonical supported-feature list.","example":{"type":"object","additionalProperties":false,"required":["text"],"properties":{"text":{"type":"string"}}},"uniqueKey":"defaults.output_format_schema.oneOf.0","typeLabel":"object"},{"type":"null","description":"JSON Schema describing the final answer's structure. When it is set the run is in\nstructured mode: the answer comes back verbatim in `final_structured_output`. When it is\nnull the answer comes back as plain text in `final_text`.\n\n**Supports a subset of Draft 2020-12** — the same subset Bedrock structured\noutput accepts. Not supported: `oneOf`, `anyOf`, `allOf`, `not`, `$ref`,\n`$defs`, `if/then/else`, `pattern`, `format`. Supported: `type`, `properties`,\n`required`, `enum`, `additionalProperties: false`, `minimum`/`maximum` on\nnumbers, `minLength`/`maxLength` on strings, `minItems`/`maxItems` on arrays.\n\nSee\n[JSON Schema Reference](https://docs.narrative.io/reference/model-inference/json-schema-reference)\nfor the canonical supported-feature list.","example":{"type":"object","additionalProperties":false,"required":["text"],"properties":{"text":{"type":"string"}}},"uniqueKey":"defaults.output_format_schema.oneOf.1","typeLabel":"null"}],"uniqueKey":"defaults.output_format_schema","typeLabel":"object | null"},"mcp_servers":{"type":"array","default":[],"description":"List of MCP servers and their tools the model can call server-side. Each\nserver's tools appear to the model with the `{alias}-` prefix. Empty list means\n\"no MCP tools.\" Wholesale-replaced when overridden in `config_override`.","items":{"description":"A Model Context Protocol (MCP) server the platform will call **on your behalf** during\na run. The platform discovers the server's tool catalog at run start via the JSON-RPC\n`tools/list` method — you do **not** declare individual tools here. When the model\nemits a call to `{alias}-{tool_name}`, the platform makes the `tools/call` request,\nparses the response, persists the tool result, and feeds it back into the next\ninference round, all inside the same run.\n\nThe server must implement [Model Context Protocol](https://modelcontextprotocol.io/)\nover HTTP with JSON-RPC 2.0 (both `tools/list` and `tools/call`).\n\n**Authentication.** Public servers and Narrative-owned MCPs need no auth field. For an\nexternal server that requires user authorization, first connect it via\n`POST /mcp-connections` (OAuth) and pass the resulting id as `connection_id` here — the\nplatform attaches and refreshes that connection's bearer token server-side at call time.\nThe token never appears in the payload or run history. If you submit a server with no\n`connection_id` but it actually requires authorization, run-start discovery gets a `401`\nand the run fails with\n[MCP Discovery Failed](https://docs.narrative.io/reference/architecture/agent-conversations/errors/mcp-discovery-failed)\ntelling you to connect it — and naming your existing connection for that URL if you have one.\n\n**Discovery happens per run.** Each new run re-fetches `tools/list` — there is no\ncatalog caching between runs. If a server adds, removes, or changes a tool, the next\nrun picks it up automatically.\n\n**Error handling:** transient transport errors (5xx, network) during discovery are\nsurfaced as\n[MCP Discovery Failed](https://docs.narrative.io/reference/architecture/agent-conversations/errors/mcp-discovery-failed).\n`tools/call` errors follow the same classification as before:\n[MCP error pages](https://docs.narrative.io/reference/architecture/agent-conversations/errors/mcp-unknown-tool).","type":"object","required":["alias","url"],"properties":{"alias":{"description":"A 1–8 character namespace prefix for an MCP server's tools. The platform stitches\n`{alias}-{tool_name}` into the wire name the model sees, so the alias is how every\nMCP-resolved tool call gets routed back to the right server at execution time.\n\n**Rules:**\n- Must match the regex `^[a-zA-Z][a-zA-Z0-9]{0,7}$` — 1–8 characters total, starts\n with an ASCII letter, contains only ASCII letters and digits.\n- **No underscores**, **no dashes**, **no other punctuation**. Dashes are reserved as\n the alias↔name separator.\n- Must be **unique across `mcp_servers`** within a single conversation. The platform\n validates this on `POST /agents/conversations`.\n\nCaller-declared tools (in `tools[]`) have no alias — the model sees their bare `name`\non the wire. The dash in MCP wire names is the routing discriminator: a dash-prefixed\nname comes from an MCP server; a dash-free name is caller-declared and triggers\n`requires_action`.\n\nSee the [Invalid Tool Alias](https://docs.narrative.io/reference/architecture/agent-conversations/errors/invalid-tool-alias)\nand [Duplicate Tool Alias](https://docs.narrative.io/reference/architecture/agent-conversations/errors/duplicate-tool-alias)\nerror pages for the exact validation behavior.","type":"string","pattern":"^[a-zA-Z][a-zA-Z0-9]{0,7}$","minLength":1,"maxLength":8,"example":"docs","isRequired":true,"uniqueKey":"defaults.mcp_servers.items.[INDEX].alias","typeLabel":"string"},"url":{"type":"string","format":"uri","description":"Fully-qualified **https** URL to the MCP server's JSON-RPC endpoint, validated when the\nconversation or run is created: a non-https or malformed URL is rejected up front with\n[Invalid MCP Server URL](https://docs.narrative.io/reference/architecture/agent-conversations/errors/invalid-mcp-server-url).\nThe endpoint must be publicly reachable — URLs that resolve to loopback, private, or\nlink-local addresses are refused.","example":"https://docs.narrative.io/mcp","isRequired":true,"uniqueKey":"defaults.mcp_servers.items.[INDEX].url","typeLabel":"string\u003curi>"},"description":{"oneOf":[{"type":"string","description":"Optional free-form description, exposed in the assembled tool catalog the model sees. Null or\nabsent means none; a response always carries the key.","example":"Public Mintlify-hosted Narrative docs MCP server","uniqueKey":"defaults.mcp_servers.items.[INDEX].description.oneOf.0","typeLabel":"string"},{"type":"null","description":"Optional free-form description, exposed in the assembled tool catalog the model sees. Null or\nabsent means none; a response always carries the key.","example":"Public Mintlify-hosted Narrative docs MCP server","uniqueKey":"defaults.mcp_servers.items.[INDEX].description.oneOf.1","typeLabel":"null"}],"uniqueKey":"defaults.mcp_servers.items.[INDEX].description","typeLabel":"string | null"},"connection_id":{"oneOf":[{"type":"string","format":"uuid","description":"Reference to a registered external-MCP OAuth connection (from `POST /mcp-connections`).\nSet this for an external server that requires user authorization: the platform resolves\nand refreshes that connection's bearer token server-side at call time — never in the\npayload or run history. Omit (or send null) for public servers or Narrative-owned MCPs. The connection\nmust belong to the calling user and be in `connected` status. Optional; defaults to none.","example":"b3f1c2a4-5d6e-47f8-9a0b-1c2d3e4f5a6b","uniqueKey":"defaults.mcp_servers.items.[INDEX].connection_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"type":"null","format":"uuid","description":"Reference to a registered external-MCP OAuth connection (from `POST /mcp-connections`).\nSet this for an external server that requires user authorization: the platform resolves\nand refreshes that connection's bearer token server-side at call time — never in the\npayload or run history. Omit (or send null) for public servers or Narrative-owned MCPs. The connection\nmust belong to the calling user and be in `connected` status. Optional; defaults to none.","example":"b3f1c2a4-5d6e-47f8-9a0b-1c2d3e4f5a6b","uniqueKey":"defaults.mcp_servers.items.[INDEX].connection_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"defaults.mcp_servers.items.[INDEX].connection_id","typeLabel":"string\u003cuuid> | null"}},"uniqueKey":"defaults.mcp_servers.items.[INDEX]","typeLabel":"object"},"uniqueKey":"defaults.mcp_servers","typeLabel":"object[]"},"tools":{"type":"array","default":[],"description":"List of caller-declared tools. When the model calls one of these, the run pauses\nat `requires_action` and the platform expects you to start a follow-up run with\n`payload.kind: tool_outputs`. Caller-declared tool `name`s have no alias prefix\nand must not contain a dash. Wholesale-replaced when overridden in\n`config_override`.","items":{"description":"A single tool definition. Mirrors the relevant fields from the underlying inference\ncontract (Bedrock/Cortex).\n\n**For MCP tools (discovered at run start from `mcp_servers[]` entries):** the model sees the bare\n`name` prefixed with the parent server's `alias` and a dash (so a tool `search` on a server with\n`alias: \"docs\"` becomes `docs-search` on the wire). The wire-name length cap is\n`len(alias) + 1 + len(name) ≤ 64` (Bedrock).\n\n**For caller-declared tools (declared under top-level `tools[]`):** the model sees the\nbare `name` directly. The name must **not contain a dash** — the dash is reserved as\nthe MCP alias separator and is the routing discriminator at call time. See\n[Invalid Caller-Declared Tool Name](https://docs.narrative.io/reference/architecture/agent-conversations/errors/invalid-caller-tool-name).\n\n**`input_schema` constraints:** must be a subset of JSON Schema Draft 2020-12. Features\nlike `oneOf`, `anyOf`, `allOf`, `not`, `$ref`, `$defs`, `if/then/else`, `pattern`, and\n`format` are **not supported** — the platform forwards the schema to the model\nprovider, which rejects unsupported features. See\n[JSON Schema Reference](https://docs.narrative.io/reference/model-inference/json-schema-reference)\nfor the supported subset.\n\n**Wire-name length:** total wire name (whether bare or `{alias}-{name}`) must be\n≤ 64 characters (Bedrock limit). See\n[Tool Wire Name Too Long](https://docs.narrative.io/reference/architecture/agent-conversations/errors/tool-name-too-long).","type":"object","required":["name","description","input_schema"],"properties":{"name":{"type":"string","description":"The tool's bare name. For MCP tools the model sees `{parent_alias}-{name}`; for\ncaller-declared tools the model sees `name` directly. Caller-declared names must\nnot contain a dash.","example":"search_narrative_i_o_knowledge_base","isRequired":true,"uniqueKey":"defaults.tools.items.[INDEX].name","typeLabel":"string"},"description":{"type":"string","description":"Human-readable description the model uses to decide when to call this tool.\nKeep it focused — vague descriptions cause the model to call the tool when it\nshouldn't, or skip it when it should.","example":"Search the Narrative.io documentation knowledge base.","isRequired":true,"uniqueKey":"defaults.tools.items.[INDEX].description","typeLabel":"string"},"input_schema":{"type":"object","description":"JSON Schema describing the tool's input arguments. The model produces an arguments\nobject matching this schema for every call. Use `additionalProperties: false` and\n`required` aggressively — tighter schemas reduce model mistakes.","example":{"type":"object","additionalProperties":false,"required":["query"],"properties":{"query":{"type":"string"}}},"isRequired":true,"uniqueKey":"defaults.tools.items.[INDEX].input_schema","typeLabel":"object"},"strict":{"type":"boolean","description":"Whether to enforce the input schema strictly. Defaults to `true`. Leave it true\nfor production — turning it off lets the model send arguments that don't validate,\nwhich is almost never what you want.","default":true,"uniqueKey":"defaults.tools.items.[INDEX].strict","typeLabel":"boolean"}},"uniqueKey":"defaults.tools.items.[INDEX]","typeLabel":"object"},"uniqueKey":"defaults.tools","typeLabel":"object[]"}},"isRequired":true,"uniqueKey":"defaults","typeLabel":"object"},"name":{"oneOf":[{"type":"string","description":"Optional human-readable label for your own use (logs, dashboards). The model\nnever sees this. Leave it out (or null) and the platform names the conversation\nfrom its first user message.","example":"rate-limiting q\u0026a","uniqueKey":"name.oneOf.0","typeLabel":"string"},{"type":"null","description":"Optional human-readable label for your own use (logs, dashboards). The model\nnever sees this. Leave it out (or null) and the platform names the conversation\nfrom its first user message.","example":"rate-limiting q\u0026a","uniqueKey":"name.oneOf.1","typeLabel":"null"}],"uniqueKey":"name","typeLabel":"string | null"},"system_prompt":{"oneOf":[{"type":"string","description":"\"Stage direction\" prepended to every run as a `system`-role message. Cannot be\noverridden per-run — if you need different system prompts, create separate\nconversations. Leaving it empty is allowed but rarely useful; even one line\n(\"You are a helpful assistant. Answer concisely.\") shapes model behavior.","example":"You are an AI assistant that answers questions about the Narrative Data Marketplace. Use the available tools to look things up before answering.","uniqueKey":"system_prompt.oneOf.0","typeLabel":"string"},{"type":"null","description":"\"Stage direction\" prepended to every run as a `system`-role message. Cannot be\noverridden per-run — if you need different system prompts, create separate\nconversations. Leaving it empty is allowed but rarely useful; even one line\n(\"You are a helpful assistant. Answer concisely.\") shapes model behavior.","example":"You are an AI assistant that answers questions about the Narrative Data Marketplace. Use the available tools to look things up before answering.","uniqueKey":"system_prompt.oneOf.1","typeLabel":"null"}],"uniqueKey":"system_prompt","typeLabel":"string | null"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"defaults":{"model":"anthropic.claude-opus-4.6","data_plane_id":"f79cbdae-4848-47ca-95e8-69588364d185","execution_cluster":"shared","compute_pool_id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","max_iterations":8,"max_tokens":2048,"temperature":0,"thinking":{"type":"effort","level":"high"},"output_format_schema":{"type":"object","additionalProperties":false,"required":["text"],"properties":{"text":{"type":"string"}}},"mcp_servers":[],"tools":[]},"name":"rate-limiting q\u0026a","system_prompt":"You are an AI assistant that answers questions about the Narrative Data Marketplace. Use the available tools to look things up before answering."}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"af350268-a903-40b0-beb9-c2c27222f156":{"description":"Conversation created. Returns the persisted conversation row.","content":{"application/json":{"schema":{"description":"The conversation row as the API returns it. The same shape comes back from\n`POST /agents/conversations` (201 Created) and `GET /agents/conversations/{id}` (200 OK).\n\nA conversation may also carry platform-written tags — recording, for instance, the workflow\nwhose task created it. They are reserved (the `_nio_` prefix), are not settable, and are not\nreturned here.","type":"object","required":["id","company_id","user_id","defaults","version","created_at","updated_at"],"properties":{"id":{"description":"UUID identifying a conversation. Returned from `POST /agents/conversations` and used\nin every other agent endpoint that operates on this conversation.","type":"string","format":"uuid","example":"bc2505b7-068d-44ed-8055-a6f6ffe54ab1","isRequired":true,"uniqueKey":"id","typeLabel":"string\u003cuuid>"},"company_id":{"type":"integer","description":"Company ID derived from the bearer token. Pinned for the conversation's lifetime.","example":1,"isRequired":true,"uniqueKey":"company_id","typeLabel":"integer"},"user_id":{"type":"integer","description":"User ID derived from the bearer token. Pinned for the conversation's lifetime and\ngates every subsequent read endpoint — only the originating user can fetch the\nconversation, its messages, or its runs. Peers in the same company see 404.","example":407,"isRequired":true,"uniqueKey":"user_id","typeLabel":"integer"},"defaults":{"description":"The configuration applied to every run on this conversation by default. Each field\ncan be overridden per-run via `config_override` on the `POST .../runs` body, **except\n`system_prompt`** which is fixed at conversation creation time.\n\nFor `mcp_servers` and `tools`, overrides **replace the whole list**, not individual\nentries. There is no per-server or per-tool merge — set the complete catalog you want\nfor that run.\n\nIn a request only `model`, `data_plane_id` and `execution_cluster` are required. A response\n(`defaults`, `effective_config`) always carries every key, with `null` for an optional field\nthat has no value.","type":"object","required":["model","data_plane_id","execution_cluster"],"properties":{"model":{"type":"string","description":"The language model identifier. The platform exposes a fixed set; check the\n[Model Inference reference](https://docs.narrative.io/reference/model-inference)\nfor current supported values.","example":"anthropic.claude-opus-4.6","isRequired":true,"uniqueKey":"defaults.model","typeLabel":"string"},"data_plane_id":{"type":"string","format":"uuid","description":"UUID of the data plane (compute environment) that hosts the inference job\nexecutor. Each company has at least one data plane. Get it from your platform\nadmin or `GET /data-planes`.","example":"f79cbdae-4848-47ca-95e8-69588364d185","isRequired":true,"uniqueKey":"defaults.data_plane_id","typeLabel":"string\u003cuuid>"},"execution_cluster":{"type":"string","enum":["shared","dedicated"],"description":"Which job-executor pool dispatches the inference call to AWS Bedrock or Snowflake\nCortex. The executor doesn't run the model itself — that happens in the external\nservice — it only routes the HTTP request.\n\n**Use `shared` for almost every case.** `dedicated` is only relevant if your\ncompany runs a dedicated executor pool for isolation reasons.","example":"shared","isRequired":true,"uniqueKey":"defaults.execution_cluster","typeLabel":"enum\u003cstring>"},"compute_pool_id":{"oneOf":[{"type":"string","format":"uuid","description":"Optional compute pool override. Only relevant for `execution_cluster: dedicated`\n— pinpoints a specific compute pool inside that cluster.","uniqueKey":"defaults.compute_pool_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"type":"null","format":"uuid","description":"Optional compute pool override. Only relevant for `execution_cluster: dedicated`\n— pinpoints a specific compute pool inside that cluster.","uniqueKey":"defaults.compute_pool_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"defaults.compute_pool_id","typeLabel":"string\u003cuuid> | null"},"max_iterations":{"type":"integer","minimum":1,"default":10,"description":"Maximum number of inference rounds the workflow may perform before failing with\n[Max Iterations Exceeded](https://docs.narrative.io/reference/architecture/agent-conversations/errors/max-iterations-exceeded).\nEach iteration is one inference job (one Bedrock/Cortex call), and every tool call\nthe model makes spends one — including `job_monitor` and `wait_for`, so waiting on\na job it started costs three rounds before the answer. Multi-step research flows\noften need 8–15; a one-shot question needs 1–2.","example":8,"uniqueKey":"defaults.max_iterations","typeLabel":"integer"},"max_tokens":{"oneOf":[{"type":"integer","minimum":1,"default":2048,"description":"Cap on the model's reply length **per iteration** (does not include the prompt). Omitting\nthe field gives 2048; an explicit `null` leaves it unset for the run.\nBedrock-side enforced. If the model hits this limit mid-JSON, the response will\nfail to validate against `output_format_schema` —\n[Schema Decode Failed](https://docs.narrative.io/reference/architecture/agent-conversations/errors/schema-decode-failed).","example":2048,"uniqueKey":"defaults.max_tokens.oneOf.0","typeLabel":"integer"},{"type":"null","minimum":1,"default":2048,"description":"Cap on the model's reply length **per iteration** (does not include the prompt). Omitting\nthe field gives 2048; an explicit `null` leaves it unset for the run.\nBedrock-side enforced. If the model hits this limit mid-JSON, the response will\nfail to validate against `output_format_schema` —\n[Schema Decode Failed](https://docs.narrative.io/reference/architecture/agent-conversations/errors/schema-decode-failed).","example":2048,"uniqueKey":"defaults.max_tokens.oneOf.1","typeLabel":"null"}],"uniqueKey":"defaults.max_tokens","typeLabel":"integer | null"},"temperature":{"oneOf":[{"type":"number","minimum":0,"maximum":1,"default":0,"description":"Sampling temperature. Omitting the field gives `0.0`; an explicit `null` leaves it unset\nfor the run. `0.0` is deterministic-ish (best for structured / factual\nanswers); higher values introduce randomness (helpful for brainstorming).","example":0,"uniqueKey":"defaults.temperature.oneOf.0","typeLabel":"number"},{"type":"null","minimum":0,"maximum":1,"default":0,"description":"Sampling temperature. Omitting the field gives `0.0`; an explicit `null` leaves it unset\nfor the run. `0.0` is deterministic-ish (best for structured / factual\nanswers); higher values introduce randomness (helpful for brainstorming).","example":0,"uniqueKey":"defaults.temperature.oneOf.1","typeLabel":"null"}],"uniqueKey":"defaults.temperature","typeLabel":"number | null"},"thinking":{"oneOf":[{"type":"string","description":"Omit (or send null) to get the model's own behaviour. Cannot be combined with a run's\n`tool_choice` of `specific_tool` or `any` — a forced tool stops the model reasoning, so the\ncombination is refused\n([Thinking With Forced Tool Choice](https://docs.narrative.io/reference/architecture/agent-conversations/errors/thinking-with-forced-tool-choice)).\nA model that is not offered thinking rejects the field outright\n([Thinking Not Supported](https://docs.narrative.io/reference/architecture/agent-conversations/errors/thinking-not-supported)).","enum":["disabled","off"],"example":{"type":"effort","level":"high"},"uniqueKey":"defaults.thinking.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"object","description":"Omit (or send null) to get the model's own behaviour. Cannot be combined with a run's\n`tool_choice` of `specific_tool` or `any` — a forced tool stops the model reasoning, so the\ncombination is refused\n([Thinking With Forced Tool Choice](https://docs.narrative.io/reference/architecture/agent-conversations/errors/thinking-with-forced-tool-choice)).\nA model that is not offered thinking rejects the field outright\n([Thinking Not Supported](https://docs.narrative.io/reference/architecture/agent-conversations/errors/thinking-not-supported)).","required":["type","level"],"example":{"type":"effort","level":"high"},"properties":{"type":{"type":"string","enum":["effort"],"isRequired":true,"uniqueKey":"defaults.thinking.oneOf.1.type","typeLabel":"enum\u003cstring>"},"level":{"type":"string","enum":["low","medium","high"],"isRequired":true,"uniqueKey":"defaults.thinking.oneOf.1.level","typeLabel":"enum\u003cstring>"}},"additionalProperties":false,"uniqueKey":"defaults.thinking.oneOf.1","typeLabel":"object"},{"type":"object","description":"Omit (or send null) to get the model's own behaviour. Cannot be combined with a run's\n`tool_choice` of `specific_tool` or `any` — a forced tool stops the model reasoning, so the\ncombination is refused\n([Thinking With Forced Tool Choice](https://docs.narrative.io/reference/architecture/agent-conversations/errors/thinking-with-forced-tool-choice)).\nA model that is not offered thinking rejects the field outright\n([Thinking Not Supported](https://docs.narrative.io/reference/architecture/agent-conversations/errors/thinking-not-supported)).","required":["type","budget_tokens"],"example":{"type":"effort"},"properties":{"type":{"type":"string","enum":["budget"],"isRequired":true,"uniqueKey":"defaults.thinking.oneOf.2.type","typeLabel":"enum\u003cstring>"},"budget_tokens":{"type":"integer","minimum":1024,"description":"Tokens the model may spend thinking. The floor of 1024 is the provider's. Must be smaller\nthan `max_tokens` — thinking is spent from the same output budget as the answer, so a\nbudget that fills it leaves nothing to answer with\n([Thinking Budget Too Large](https://docs.narrative.io/reference/architecture/agent-conversations/errors/thinking-budget-too-large)).","isRequired":true,"uniqueKey":"defaults.thinking.oneOf.2.budget_tokens","typeLabel":"integer"}},"additionalProperties":false,"uniqueKey":"defaults.thinking.oneOf.2","typeLabel":"object"},{"type":"null","description":"Omit (or send null) to get the model's own behaviour. Cannot be combined with a run's\n`tool_choice` of `specific_tool` or `any` — a forced tool stops the model reasoning, so the\ncombination is refused\n([Thinking With Forced Tool Choice](https://docs.narrative.io/reference/architecture/agent-conversations/errors/thinking-with-forced-tool-choice)).\nA model that is not offered thinking rejects the field outright\n([Thinking Not Supported](https://docs.narrative.io/reference/architecture/agent-conversations/errors/thinking-not-supported)).","uniqueKey":"defaults.thinking.oneOf.3","typeLabel":"null"}],"uniqueKey":"defaults.thinking","typeLabel":"enum\u003cstring> · object · object · null"},"output_format_schema":{"oneOf":[{"type":"object","description":"JSON Schema describing the final answer's structure. When it is set the run is in\nstructured mode: the answer comes back verbatim in `final_structured_output`. When it is\nnull the answer comes back as plain text in `final_text`.\n\n**Supports a subset of Draft 2020-12** — the same subset Bedrock structured\noutput accepts. Not supported: `oneOf`, `anyOf`, `allOf`, `not`, `$ref`,\n`$defs`, `if/then/else`, `pattern`, `format`. Supported: `type`, `properties`,\n`required`, `enum`, `additionalProperties: false`, `minimum`/`maximum` on\nnumbers, `minLength`/`maxLength` on strings, `minItems`/`maxItems` on arrays.\n\nSee\n[JSON Schema Reference](https://docs.narrative.io/reference/model-inference/json-schema-reference)\nfor the canonical supported-feature list.","example":{"type":"object","additionalProperties":false,"required":["text"],"properties":{"text":{"type":"string"}}},"uniqueKey":"defaults.output_format_schema.oneOf.0","typeLabel":"object"},{"type":"null","description":"JSON Schema describing the final answer's structure. When it is set the run is in\nstructured mode: the answer comes back verbatim in `final_structured_output`. When it is\nnull the answer comes back as plain text in `final_text`.\n\n**Supports a subset of Draft 2020-12** — the same subset Bedrock structured\noutput accepts. Not supported: `oneOf`, `anyOf`, `allOf`, `not`, `$ref`,\n`$defs`, `if/then/else`, `pattern`, `format`. Supported: `type`, `properties`,\n`required`, `enum`, `additionalProperties: false`, `minimum`/`maximum` on\nnumbers, `minLength`/`maxLength` on strings, `minItems`/`maxItems` on arrays.\n\nSee\n[JSON Schema Reference](https://docs.narrative.io/reference/model-inference/json-schema-reference)\nfor the canonical supported-feature list.","example":{"type":"object","additionalProperties":false,"required":["text"],"properties":{"text":{"type":"string"}}},"uniqueKey":"defaults.output_format_schema.oneOf.1","typeLabel":"null"}],"uniqueKey":"defaults.output_format_schema","typeLabel":"object | null"},"mcp_servers":{"type":"array","default":[],"description":"List of MCP servers and their tools the model can call server-side. Each\nserver's tools appear to the model with the `{alias}-` prefix. Empty list means\n\"no MCP tools.\" Wholesale-replaced when overridden in `config_override`.","items":{"description":"A Model Context Protocol (MCP) server the platform will call **on your behalf** during\na run. The platform discovers the server's tool catalog at run start via the JSON-RPC\n`tools/list` method — you do **not** declare individual tools here. When the model\nemits a call to `{alias}-{tool_name}`, the platform makes the `tools/call` request,\nparses the response, persists the tool result, and feeds it back into the next\ninference round, all inside the same run.\n\nThe server must implement [Model Context Protocol](https://modelcontextprotocol.io/)\nover HTTP with JSON-RPC 2.0 (both `tools/list` and `tools/call`).\n\n**Authentication.** Public servers and Narrative-owned MCPs need no auth field. For an\nexternal server that requires user authorization, first connect it via\n`POST /mcp-connections` (OAuth) and pass the resulting id as `connection_id` here — the\nplatform attaches and refreshes that connection's bearer token server-side at call time.\nThe token never appears in the payload or run history. If you submit a server with no\n`connection_id` but it actually requires authorization, run-start discovery gets a `401`\nand the run fails with\n[MCP Discovery Failed](https://docs.narrative.io/reference/architecture/agent-conversations/errors/mcp-discovery-failed)\ntelling you to connect it — and naming your existing connection for that URL if you have one.\n\n**Discovery happens per run.** Each new run re-fetches `tools/list` — there is no\ncatalog caching between runs. If a server adds, removes, or changes a tool, the next\nrun picks it up automatically.\n\n**Error handling:** transient transport errors (5xx, network) during discovery are\nsurfaced as\n[MCP Discovery Failed](https://docs.narrative.io/reference/architecture/agent-conversations/errors/mcp-discovery-failed).\n`tools/call` errors follow the same classification as before:\n[MCP error pages](https://docs.narrative.io/reference/architecture/agent-conversations/errors/mcp-unknown-tool).","type":"object","required":["alias","url"],"properties":{"alias":{"description":"A 1–8 character namespace prefix for an MCP server's tools. The platform stitches\n`{alias}-{tool_name}` into the wire name the model sees, so the alias is how every\nMCP-resolved tool call gets routed back to the right server at execution time.\n\n**Rules:**\n- Must match the regex `^[a-zA-Z][a-zA-Z0-9]{0,7}$` — 1–8 characters total, starts\n with an ASCII letter, contains only ASCII letters and digits.\n- **No underscores**, **no dashes**, **no other punctuation**. Dashes are reserved as\n the alias↔name separator.\n- Must be **unique across `mcp_servers`** within a single conversation. The platform\n validates this on `POST /agents/conversations`.\n\nCaller-declared tools (in `tools[]`) have no alias — the model sees their bare `name`\non the wire. The dash in MCP wire names is the routing discriminator: a dash-prefixed\nname comes from an MCP server; a dash-free name is caller-declared and triggers\n`requires_action`.\n\nSee the [Invalid Tool Alias](https://docs.narrative.io/reference/architecture/agent-conversations/errors/invalid-tool-alias)\nand [Duplicate Tool Alias](https://docs.narrative.io/reference/architecture/agent-conversations/errors/duplicate-tool-alias)\nerror pages for the exact validation behavior.","type":"string","pattern":"^[a-zA-Z][a-zA-Z0-9]{0,7}$","minLength":1,"maxLength":8,"example":"docs","isRequired":true,"uniqueKey":"defaults.mcp_servers.items.[INDEX].alias","typeLabel":"string"},"url":{"type":"string","format":"uri","description":"Fully-qualified **https** URL to the MCP server's JSON-RPC endpoint, validated when the\nconversation or run is created: a non-https or malformed URL is rejected up front with\n[Invalid MCP Server URL](https://docs.narrative.io/reference/architecture/agent-conversations/errors/invalid-mcp-server-url).\nThe endpoint must be publicly reachable — URLs that resolve to loopback, private, or\nlink-local addresses are refused.","example":"https://docs.narrative.io/mcp","isRequired":true,"uniqueKey":"defaults.mcp_servers.items.[INDEX].url","typeLabel":"string\u003curi>"},"description":{"oneOf":[{"type":"string","description":"Optional free-form description, exposed in the assembled tool catalog the model sees. Null or\nabsent means none; a response always carries the key.","example":"Public Mintlify-hosted Narrative docs MCP server","uniqueKey":"defaults.mcp_servers.items.[INDEX].description.oneOf.0","typeLabel":"string"},{"type":"null","description":"Optional free-form description, exposed in the assembled tool catalog the model sees. Null or\nabsent means none; a response always carries the key.","example":"Public Mintlify-hosted Narrative docs MCP server","uniqueKey":"defaults.mcp_servers.items.[INDEX].description.oneOf.1","typeLabel":"null"}],"uniqueKey":"defaults.mcp_servers.items.[INDEX].description","typeLabel":"string | null"},"connection_id":{"oneOf":[{"type":"string","format":"uuid","description":"Reference to a registered external-MCP OAuth connection (from `POST /mcp-connections`).\nSet this for an external server that requires user authorization: the platform resolves\nand refreshes that connection's bearer token server-side at call time — never in the\npayload or run history. Omit (or send null) for public servers or Narrative-owned MCPs. The connection\nmust belong to the calling user and be in `connected` status. Optional; defaults to none.","example":"b3f1c2a4-5d6e-47f8-9a0b-1c2d3e4f5a6b","uniqueKey":"defaults.mcp_servers.items.[INDEX].connection_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"type":"null","format":"uuid","description":"Reference to a registered external-MCP OAuth connection (from `POST /mcp-connections`).\nSet this for an external server that requires user authorization: the platform resolves\nand refreshes that connection's bearer token server-side at call time — never in the\npayload or run history. Omit (or send null) for public servers or Narrative-owned MCPs. The connection\nmust belong to the calling user and be in `connected` status. Optional; defaults to none.","example":"b3f1c2a4-5d6e-47f8-9a0b-1c2d3e4f5a6b","uniqueKey":"defaults.mcp_servers.items.[INDEX].connection_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"defaults.mcp_servers.items.[INDEX].connection_id","typeLabel":"string\u003cuuid> | null"}},"uniqueKey":"defaults.mcp_servers.items.[INDEX]","typeLabel":"object"},"uniqueKey":"defaults.mcp_servers","typeLabel":"object[]"},"tools":{"type":"array","default":[],"description":"List of caller-declared tools. When the model calls one of these, the run pauses\nat `requires_action` and the platform expects you to start a follow-up run with\n`payload.kind: tool_outputs`. Caller-declared tool `name`s have no alias prefix\nand must not contain a dash. Wholesale-replaced when overridden in\n`config_override`.","items":{"description":"A single tool definition. Mirrors the relevant fields from the underlying inference\ncontract (Bedrock/Cortex).\n\n**For MCP tools (discovered at run start from `mcp_servers[]` entries):** the model sees the bare\n`name` prefixed with the parent server's `alias` and a dash (so a tool `search` on a server with\n`alias: \"docs\"` becomes `docs-search` on the wire). The wire-name length cap is\n`len(alias) + 1 + len(name) ≤ 64` (Bedrock).\n\n**For caller-declared tools (declared under top-level `tools[]`):** the model sees the\nbare `name` directly. The name must **not contain a dash** — the dash is reserved as\nthe MCP alias separator and is the routing discriminator at call time. See\n[Invalid Caller-Declared Tool Name](https://docs.narrative.io/reference/architecture/agent-conversations/errors/invalid-caller-tool-name).\n\n**`input_schema` constraints:** must be a subset of JSON Schema Draft 2020-12. Features\nlike `oneOf`, `anyOf`, `allOf`, `not`, `$ref`, `$defs`, `if/then/else`, `pattern`, and\n`format` are **not supported** — the platform forwards the schema to the model\nprovider, which rejects unsupported features. See\n[JSON Schema Reference](https://docs.narrative.io/reference/model-inference/json-schema-reference)\nfor the supported subset.\n\n**Wire-name length:** total wire name (whether bare or `{alias}-{name}`) must be\n≤ 64 characters (Bedrock limit). See\n[Tool Wire Name Too Long](https://docs.narrative.io/reference/architecture/agent-conversations/errors/tool-name-too-long).","type":"object","required":["name","description","input_schema"],"properties":{"name":{"type":"string","description":"The tool's bare name. For MCP tools the model sees `{parent_alias}-{name}`; for\ncaller-declared tools the model sees `name` directly. Caller-declared names must\nnot contain a dash.","example":"search_narrative_i_o_knowledge_base","isRequired":true,"uniqueKey":"defaults.tools.items.[INDEX].name","typeLabel":"string"},"description":{"type":"string","description":"Human-readable description the model uses to decide when to call this tool.\nKeep it focused — vague descriptions cause the model to call the tool when it\nshouldn't, or skip it when it should.","example":"Search the Narrative.io documentation knowledge base.","isRequired":true,"uniqueKey":"defaults.tools.items.[INDEX].description","typeLabel":"string"},"input_schema":{"type":"object","description":"JSON Schema describing the tool's input arguments. The model produces an arguments\nobject matching this schema for every call. Use `additionalProperties: false` and\n`required` aggressively — tighter schemas reduce model mistakes.","example":{"type":"object","additionalProperties":false,"required":["query"],"properties":{"query":{"type":"string"}}},"isRequired":true,"uniqueKey":"defaults.tools.items.[INDEX].input_schema","typeLabel":"object"},"strict":{"type":"boolean","description":"Whether to enforce the input schema strictly. Defaults to `true`. Leave it true\nfor production — turning it off lets the model send arguments that don't validate,\nwhich is almost never what you want.","default":true,"uniqueKey":"defaults.tools.items.[INDEX].strict","typeLabel":"boolean"}},"uniqueKey":"defaults.tools.items.[INDEX]","typeLabel":"object"},"uniqueKey":"defaults.tools","typeLabel":"object[]"}},"isRequired":true,"uniqueKey":"defaults","typeLabel":"object"},"version":{"description":"Monotonic per-conversation counter, bumped by 1 (or more) every time a successful run\nappends messages. Two roles:\n\n1. **Delta cursor** for `GET .../messages?since=N` — fetch only messages with\n `sequence_no > N`.\n2. **Compare-and-swap token** for `POST .../runs` — set `expected_version` to the\n conversation's current head; if it doesn't match at run-creation time, you get a\n [Version Conflict](https://docs.narrative.io/reference/architecture/agent-conversations/errors/version-conflict)\n (HTTP 409).\n\nAlways start a new run cycle by reading the current `version` from\n`GET /agents/conversations/{id}` rather than caching a value from earlier.","type":"integer","minimum":0,"example":4,"isRequired":true,"uniqueKey":"version","typeLabel":"integer"},"created_at":{"type":"string","format":"date-time","example":"2026-05-18T13:21:30.355180Z","isRequired":true,"uniqueKey":"created_at","typeLabel":"string\u003cdate-time>"},"updated_at":{"type":"string","format":"date-time","example":"2026-05-18T13:21:51.983952Z","isRequired":true,"uniqueKey":"updated_at","typeLabel":"string\u003cdate-time>"},"name":{"oneOf":[{"type":"string","uniqueKey":"name.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"name.oneOf.1","typeLabel":"null"}],"uniqueKey":"name","typeLabel":"string | null"},"system_prompt":{"oneOf":[{"type":"string","uniqueKey":"system_prompt.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"system_prompt.oneOf.1","typeLabel":"null"}],"uniqueKey":"system_prompt","typeLabel":"string | null"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"id":"bc2505b7-068d-44ed-8055-a6f6ffe54ab1","company_id":1,"user_id":407,"defaults":{"model":"anthropic.claude-opus-4.6","data_plane_id":"f79cbdae-4848-47ca-95e8-69588364d185","execution_cluster":"shared","compute_pool_id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","max_iterations":8,"max_tokens":2048,"temperature":0,"thinking":{"type":"effort","level":"high"},"output_format_schema":{"type":"object","additionalProperties":false,"required":["text"],"properties":{"text":{"type":"string"}}},"mcp_servers":[],"tools":[]},"version":4,"created_at":"2026-05-18T13:21:30.355180Z","updated_at":"2026-05-18T13:21:51.983952Z","name":"\u003cstring>","system_prompt":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"2ef53dd2-2695-4e1a-ac89-e885940516de":{"description":"Invalid request body. A validation failure (alias regex mismatch, duplicate aliases,\ntool wire name too long, a `thinking` setting the model does not take) gets an RFC 7807 body. A body that doesn't\ndecode, such as one missing a required `defaults` field, gets `{error, error_description}`.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","description":"RFC 7807 Problem Details. Returned with `Content-Type: application/json` for every\n4xx/5xx response on `/agents/*`.\n\n**Field semantics:**\n\n- `type` — stable URL to the docs page describing this error class. Treat it as the\n machine-readable identifier; the same URL is referenced by `RunError.docs_url` on\n failed runs. Optional on 500 errors that don't map to a documented class.\n- `title` — short human-readable summary.\n- `status` — HTTP status code echoed in the body (so clients that read only the body\n can still dispatch on status).\n- `detail` — request-specific detail. Includes which alias was malformed, which\n `tool_use_id` was missing, etc.\n- `instance` — always `null` on `/agents` responses.\n- `log_id` — UUID correlated with server logs. Always include this when reporting an\n issue to support.\n- `debug` — always `null` on `/agents` responses.\n\nEvery key is always present. `type` is `null` on the one error with no docs page: the 403\nreturned when the company's credit limit is exceeded.\n\nNot every error on these endpoints uses this shape. A request body that isn't valid JSON, or\ndoesn't decode, gets a 400 with the plain `{error, error_description}` body instead. So does a\ntoken with no user attached (403), and a token missing the needed permission (401).\n\nCommon error pages indexed by `type`:\n\n| HTTP | Common cause | Docs page |\n|------|--------------|-----------|\n| 400 | Bad request body, validation failure | various — see `type` |\n| 404 | Resource not found, or owned by a different company | `/conversation-not-found`, `/agent-run-not-found` |\n| 409 | Conversation version moved while you were preparing the run, or another run on it is still in flight | `/version-conflict`, `/run-in-progress` |\n| 500 | Internal error (schema drift, workflow start failure) | `/invalid-stored-field`, `/workflow-start-failed` |","required":["title","status","detail","log_id"],"example":{"type":"https://docs.narrative.io/reference/architecture/agent-conversations/errors/invalid-tool-alias","title":"Invalid Tool Alias","status":400,"detail":"invalid tool aliases (must match ^[a-zA-Z][a-zA-Z0-9]{0,7}$): with_underscore","instance":null,"log_id":"1f6e5d4c-3b2a-1098-7654-3210fedcba98","debug":null},"properties":{"title":{"type":"string","example":"Invalid Tool Alias","isRequired":true,"uniqueKey":"oneOf.0.title","typeLabel":"string"},"status":{"type":"integer","example":400,"isRequired":true,"uniqueKey":"oneOf.0.status","typeLabel":"integer"},"detail":{"type":"string","example":"invalid tool aliases (must match ^[a-zA-Z][a-zA-Z0-9]{0,7}$): with_underscore","isRequired":true,"uniqueKey":"oneOf.0.detail","typeLabel":"string"},"log_id":{"type":"string","format":"uuid","example":"1f6e5d4c-3b2a-1098-7654-3210fedcba98","isRequired":true,"uniqueKey":"oneOf.0.log_id","typeLabel":"string\u003cuuid>"},"type":{"oneOf":[{"type":"string","format":"uri","example":"https://docs.narrative.io/reference/architecture/agent-conversations/errors/invalid-tool-alias","uniqueKey":"oneOf.0.type.oneOf.0","typeLabel":"string\u003curi>"},{"type":"null","format":"uri","example":"https://docs.narrative.io/reference/architecture/agent-conversations/errors/invalid-tool-alias","uniqueKey":"oneOf.0.type.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.0.type","typeLabel":"string\u003curi> | null"},"instance":{"oneOf":[{"type":"string","uniqueKey":"oneOf.0.instance.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"oneOf.0.instance.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.0.instance","typeLabel":"string | null"},"debug":{"oneOf":[{"type":"object","uniqueKey":"oneOf.0.debug.oneOf.0","typeLabel":"object"},{"type":"null","uniqueKey":"oneOf.0.debug.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.0.debug","typeLabel":"object | null"}},"uniqueKey":"oneOf.0","typeLabel":"object"},{"type":"object","required":["error","error_description"],"properties":{"error":{"type":"string","example":"Unauthorized","isRequired":true,"uniqueKey":"oneOf.1.error","typeLabel":"string"},"error_description":{"type":"string","example":"You are not authorized to use this endpoint.","isRequired":true,"uniqueKey":"oneOf.1.error_description","typeLabel":"string"}},"uniqueKey":"oneOf.1","typeLabel":"object"}],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"type":"https://docs.narrative.io/reference/architecture/agent-conversations/errors/invalid-tool-alias","title":"Invalid Tool Alias","status":400,"detail":"invalid tool aliases (must match ^[a-zA-Z][a-zA-Z0-9]{0,7}$): with_underscore","instance":null,"log_id":"1f6e5d4c-3b2a-1098-7654-3210fedcba98","debug":null}}},"exampleType":"generated"}},"exampleType":"generated"},"8e2f76df-802e-4ff0-851c-c75abc98eabc":{"description":"Token does not have `agent_conversations:write` permission, or has expired.","content":{"application/json":{"schema":{"type":"object","required":["error","error_description"],"properties":{"error":{"type":"string","example":"Unauthorized","isRequired":true,"uniqueKey":"error","typeLabel":"string"},"error_description":{"type":"string","example":"You are not authorized to use this endpoint.","isRequired":true,"uniqueKey":"error_description","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":"Unauthorized","error_description":"You are not authorized to use this endpoint."}}},"exampleType":"generated"}},"exampleType":"generated"},"cb85c8bb-d34c-41a3-a63f-33a70386882f":{"description":"The request is not allowed with the token sent, or no valid token was sent.","content":{"application/json":{"schema":{"type":"object","required":["error","error_description"],"properties":{"error":{"type":"string","example":"Unauthorized","isRequired":true,"uniqueKey":"error","typeLabel":"string"},"error_description":{"type":"string","example":"You are not authorized to use this endpoint.","isRequired":true,"uniqueKey":"error_description","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":"Unauthorized","error_description":"You are not authorized to use this endpoint."}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"6a73f1d3-8ca3-4706-a449-c3800f826224":{"BearerAuth":{"type":"http","scheme":"bearer","scopes":[],"schemeName":"BearerAuth"}}},"servers":{"c373cfef-d90d-409d-b76b-a55dea8a5d24":{"url":"https://api-dev.narrative.io"},"94de0478-ac55-41e7-a375-55d1494103a0":{"url":"https://api.narrative.io"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","scopes":[],"schemeName":"BearerAuth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Bearer authentication header of the form `Bearer \u003ctoken>`, where `\u003ctoken>` is your auth token.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"BearerAuth","name":"Authorization"}],"title":"BearerAuth"}]},"originalFileLocation":"https://docs-cdn.narrative.io/api-reference/main/openapi.json"},"subdomain":"narrative-07c7a1f7","siteName":"Narrative I/O Knowledge Base","title":"Create an agent conversation - Narrative I/O Knowledge Base","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-26T15:43:51.684Z","originalFileLocation":"api-reference/agent-conversations/create-an-agent-conversation.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Creates a new agent conversation with a pinned system_prompt and a defaults block that every subsequent run inherits. The conversation starts at version: 0 — your first run\u0026#x27;s expected_version will be 0. ## What this endpoint actually does 1. Validates the defaults block. Failures here (alias regex, duplicate aliases, wire-name length, missing required fields) return 400 immediately — the conversation row is not created on validation failure. 2. Inserts a row in agent_conversations with version = 0, company_id from your bearer token, and the validated defaults serialized as JSONB. 3. Returns the persisted conversation echo. No workflows are started here. The conversation is a long-lived container; the actual model execution happens later, in POST /agents/conversations/{id}/runs. ## What you cannot change later - system_prompt — pinned for the conversation\u0026#x27;s lifetime. If you need a different system prompt, create a new conversation. - company_id / user_id — derived from the bearer token at creation time; not exposed in the request body. Both gate every subsequent read endpoint on this conversation: peers in the same company cannot see each other\u0026#x27;s conversations, runs, or messages. Cross-user access surfaces as 404 — the API does not distinguish \u0026quot;doesn\u0026#x27;t exist\u0026quot; from \u0026quot;owned by another user\u0026quot;. Everything else in defaults (model, max_iterations, tools, etc.) is just a default — any individual run can override any of those fields via config_override on its POST .../runs body. See Agent Conversations Reference for the override semantics. ## Permission agent_conversations resource with write verb. The same permission gates POST .../runs; read is required for the GET endpoints. ## Example: minimal \u0026quot;hello world\u0026quot; conversation (no tools) json { \u0026quot;name\u0026quot;: \u0026quot;hello world\u0026quot;, \u0026quot;system_prompt\u0026quot;: \u0026quot;You are a helpful assistant. Answer concisely.\u0026quot;, \u0026quot;defaults\u0026quot;: { \u0026quot;model\u0026quot;: \u0026quot;anthropic.claude-opus-4.6\u0026quot;, \u0026quot;data_plane_id\u0026quot;: \u0026quot;f79cbdae-4848-47ca-95e8-69588364d185\u0026quot;, \u0026quot;execution_cluster\u0026quot;: \u0026quot;shared\u0026quot;, \u0026quot;max_iterations\u0026quot;: 10, \u0026quot;max_tokens\u0026quot;: 1024, \u0026quot;temperature\u0026quot;: 0.0, \u0026quot;output_format_schema\u0026quot;: { \u0026quot;type\u0026quot;: \u0026quot;object\u0026quot;, \u0026quot;additionalProperties\u0026quot;: false, \u0026quot;required\u0026quot;: [\u0026quot;text\u0026quot;], \u0026quot;properties\u0026quot;: { \u0026quot;text\u0026quot;: { \u0026quot;type\u0026quot;: \u0026quot;string\u0026quot; } } } } } ## Example: conversation that can search the Narrative docs The mcp_servers entry registers two tools the model can call server-side. The platform handles the JSON-RPC calls to https://docs.narrative.io/mcp transparently. json { \u0026quot;name\u0026quot;: \u0026quot;docs search\u0026quot;, \u0026quot;system_prompt\u0026quot;: \u0026quot;Use the available tools to look things up before answering.\u0026quot;, \u0026quot;defaults\u0026quot;: { \u0026quot;model\u0026quot;: \u0026quot;anthropic.claude-opus-4.6\u0026quot;, \u0026quot;data_plane_id\u0026quot;: \u0026quot;f79cbdae-4848-47ca-95e8-69588364d185\u0026quot;, \u0026quot;execution_cluster\u0026quot;: \u0026quot;shared\u0026quot;, \u0026quot;max_iterations\u0026quot;: 8, \u0026quot;max_tokens\u0026quot;: 2048, \u0026quot;temperature\u0026quot;: 0.0, \u0026quot;output_format_schema\u0026quot;: { \u0026quot;type\u0026quot;: \u0026quot;object\u0026quot;, \u0026quot;additionalProperties\u0026quot;: false, \u0026quot;required\u0026quot;: [\u0026quot;text\u0026quot;], \u0026quot;properties\u0026quot;: { \u0026quot;text\u0026quot;: { \u0026quot;type\u0026quot;: \u0026quot;string\u0026quot; } } }, \u0026quot;mcp_servers\u0026quot;: [{ \u0026quot;alias\u0026quot;: \u0026quot;docs\u0026quot;, \u0026quot;url\u0026quot;: \u0026quot;https://docs.narrative.io/mcp\u0026quot;, \u0026quot;description\u0026quot;: \u0026quot;Narrative docs MCP server\u0026quot; }] } } ## Example: conversation using an external OAuth-connected MCP server For an external server that requires user authorization, connect it first via POST /mcp-connections (the user consents in a browser; the connection becomes connected). Then reference the returned connection_id in the mcp_servers entry — the platform attaches and refreshes that connection\u0026#x27;s bearer token server-side on every tool call. The token never appears in the payload or run history. alias and url are still required; the url should match the server you connected. json { \u0026quot;name\u0026quot;: \u0026quot;hugging face tools\u0026quot;, \u0026quot;system_prompt\u0026quot;: \u0026quot;Use the available tools to look things up before answering.\u0026quot;, \u0026quot;defaults\u0026quot;: { \u0026quot;model\u0026quot;: \u0026quot;anthropic.claude-opus-4.6\u0026quot;, \u0026quot;data_plane_id\u0026quot;: \u0026quot;f79cbdae-4848-47ca-95e8-69588364d185\u0026quot;, \u0026quot;execution_cluster\u0026quot;: \u0026quot;shared\u0026quot;, \u0026quot;max_iterations\u0026quot;: 8, \u0026quot;max_tokens\u0026quot;: 2048, \u0026quot;temperature\u0026quot;: 0.0, \u0026quot;output_format_schema\u0026quot;: { \u0026quot;type\u0026quot;: \u0026quot;object\u0026quot;, \u0026quot;additionalProperties\u0026quot;: false, \u0026quot;required\u0026quot;: [\u0026quot;text\u0026quot;], \u0026quot;properties\u0026quot;: { \u0026quot;text\u0026quot;: { \u0026quot;type\u0026quot;: \u0026quot;string\u0026quot; } } }, \u0026quot;mcp_servers\u0026quot;: [{ \u0026quot;alias\u0026quot;: \u0026quot;hf\u0026quot;, \u0026quot;url\u0026quot;: \u0026quot;https://huggingface.co/mcp\u0026quot;, \u0026quot;description\u0026quot;: \u0026quot;Hugging Face MCP server (external, OAuth)\u0026quot;, \u0026quot;connection_id\u0026quot;: \u0026quot;b3f1c2a4-5d6e-47f8-9a0b-1c2d3e4f5a6b\u0026quot; }] } } ## Example: conversation with a caller-declared tool (human in the loop) Caller-declared tools[] entries cause the model\u0026#x27;s call to pause the run with status: requires_action. The caller answers by posting a follow-up run with payload.kind: tool_outputs. These tools have no alias — the model sees the bare name, and the platform routes any dash-free tool call to caller-declared resolution. json { \u0026quot;name\u0026quot;: \u0026quot;booking flow\u0026quot;, \u0026quot;system_prompt\u0026quot;: \u0026quot;You are a booking assistant.\u0026quot;, \u0026quot;defaults\u0026quot;: { \u0026quot;model\u0026quot;: \u0026quot;anthropic.claude-opus-4.6\u0026quot;, \u0026quot;data_plane_id\u0026quot;: \u0026quot;f79cbdae-4848-47ca-95e8-69588364d185\u0026quot;, \u0026quot;execution_cluster\u0026quot;: \u0026quot;shared\u0026quot;, \u0026quot;max_iterations\u0026quot;: 5, \u0026quot;output_format_schema\u0026quot;: { \u0026quot;type\u0026quot;: \u0026quot;object\u0026quot;, \u0026quot;additionalProperties\u0026quot;: false, \u0026quot;required\u0026quot;: [\u0026quot;text\u0026quot;], \u0026quot;properties\u0026quot;: { \u0026quot;text\u0026quot;: { \u0026quot;type\u0026quot;: \u0026quot;string\u0026quot; } } }, \u0026quot;tools\u0026quot;: [{ \u0026quot;name\u0026quot;: \u0026quot;confirm_booking\u0026quot;, \u0026quot;description\u0026quot;: \u0026quot;Ask the user to confirm a proposed booking slot.\u0026quot;, \u0026quot;input_schema\u0026quot;: { \u0026quot;type\u0026quot;: \u0026quot;object\u0026quot;, \u0026quot;additionalProperties\u0026quot;: false, \u0026quot;required\u0026quot;: [\u0026quot;proposed_slot\u0026quot;], \u0026quot;properties\u0026quot;: { \u0026quot;proposed_slot\u0026quot;: { \u0026quot;type\u0026quot;: \u0026quot;string\u0026quot; } } } }] } } ## Common 400 errors | type URL slug | Cause | |---|---| | /errors/invalid-tool-alias | MCP alias doesn\u0026#x27;t match ^a-zA-Z{0,7}$ | | /errors/duplicate-tool-alias | Same alias appears twice across mcp_servers | | /errors/invalid-caller-tool-name | Caller-declared tools[].name is empty, contains a dash, or exceeds 64 chars | | /errors/duplicate-caller-tool-name | Same tools[].name appears twice | | /errors/tool-name-too-long | Some MCP wire name {alias}-{tool_name} \u0026gt; 64 chars | | /errors/invalid-mcp-server-url | An mcp_servers[].url is not a public https URL | | /errors/reserved-tool-name | A tools[].name takes the name of a platform tool | | /errors/unknown-model | thinking is set and model is not a model the platform offers | | /errors/thinking-not-supported | thinking is set for a model that is not offered thinking | | /errors/thinking-setting-not-accepted | The model does not take this thinking setting | | /errors/thinking-budget-too-large | thinking.budget_tokens is not smaller than max_tokens | A body that isn\u0026#x27;t valid JSON, or doesn\u0026#x27;t decode (a missing defaults field, an unknown execution_cluster), gets a 400 with an {error, error_description} body instead. See Agent Conversations error catalog for the full list.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Narrative I/O Knowledge Base\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/narrative-07c7a1f7/OOk68seBU2ePTAv6/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/narrative-07c7a1f7/OOk68seBU2ePTAv6/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/narrative-07c7a1f7/OOk68seBU2ePTAv6/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/narrative-07c7a1f7/OOk68seBU2ePTAv6/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/narrative-07c7a1f7/OOk68seBU2ePTAv6/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/narrative-07c7a1f7/OOk68seBU2ePTAv6/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/narrative-07c7a1f7/OOk68seBU2ePTAv6/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/narrative-07c7a1f7/OOk68seBU2ePTAv6/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/narrative-07c7a1f7/OOk68seBU2ePTAv6/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create an agent conversation - Narrative I/O Knowledge Base\">\u003cmeta data-mint-head property=\"og:description\" content=\"Creates a new agent conversation with a pinned system_prompt and a defaults block that every subsequent run inherits. The conversation starts at version: 0 — your first run\u0026#x27;s expected_version will be 0. ## What this endpoint actually does 1. Validates the defaults block. Failures here (alias regex, duplicate aliases, wire-name length, missing required fields) return 400 immediately — the conversation row is not created on validation failure. 2. Inserts a row in agent_conversations with version = 0, company_id from your bearer token, and the validated defaults serialized as JSONB. 3. Returns the persisted conversation echo. No workflows are started here. The conversation is a long-lived container; the actual model execution happens later, in POST /agents/conversations/{id}/runs. ## What you cannot change later - system_prompt — pinned for the conversation\u0026#x27;s lifetime. If you need a different system prompt, create a new conversation. - company_id / user_id — derived from the bearer token at creation time; not exposed in the request body. Both gate every subsequent read endpoint on this conversation: peers in the same company cannot see each other\u0026#x27;s conversations, runs, or messages. Cross-user access surfaces as 404 — the API does not distinguish \u0026quot;doesn\u0026#x27;t exist\u0026quot; from \u0026quot;owned by another user\u0026quot;. Everything else in defaults (model, max_iterations, tools, etc.) is just a default — any individual run can override any of those fields via config_override on its POST .../runs body. See Agent Conversations Reference for the override semantics. ## Permission agent_conversations resource with write verb. The same permission gates POST .../runs; read is required for the GET endpoints. ## Example: minimal \u0026quot;hello world\u0026quot; conversation (no tools) json { \u0026quot;name\u0026quot;: \u0026quot;hello world\u0026quot;, \u0026quot;system_prompt\u0026quot;: \u0026quot;You are a helpful assistant. Answer concisely.\u0026quot;, \u0026quot;defaults\u0026quot;: { \u0026quot;model\u0026quot;: \u0026quot;anthropic.claude-opus-4.6\u0026quot;, \u0026quot;data_plane_id\u0026quot;: \u0026quot;f79cbdae-4848-47ca-95e8-69588364d185\u0026quot;, \u0026quot;execution_cluster\u0026quot;: \u0026quot;shared\u0026quot;, \u0026quot;max_iterations\u0026quot;: 10, \u0026quot;max_tokens\u0026quot;: 1024, \u0026quot;temperature\u0026quot;: 0.0, \u0026quot;output_format_schema\u0026quot;: { \u0026quot;type\u0026quot;: \u0026quot;object\u0026quot;, \u0026quot;additionalProperties\u0026quot;: false, \u0026quot;required\u0026quot;: [\u0026quot;text\u0026quot;], \u0026quot;properties\u0026quot;: { \u0026quot;text\u0026quot;: { \u0026quot;type\u0026quot;: \u0026quot;string\u0026quot; } } } } } ## Example: conversation that can search the Narrative docs The mcp_servers entry registers two tools the model can call server-side. The platform handles the JSON-RPC calls to https://docs.narrative.io/mcp transparently. json { \u0026quot;name\u0026quot;: \u0026quot;docs search\u0026quot;, \u0026quot;system_prompt\u0026quot;: \u0026quot;Use the available tools to look things up before answering.\u0026quot;, \u0026quot;defaults\u0026quot;: { \u0026quot;model\u0026quot;: \u0026quot;anthropic.claude-opus-4.6\u0026quot;, \u0026quot;data_plane_id\u0026quot;: \u0026quot;f79cbdae-4848-47ca-95e8-69588364d185\u0026quot;, \u0026quot;execution_cluster\u0026quot;: \u0026quot;shared\u0026quot;, \u0026quot;max_iterations\u0026quot;: 8, \u0026quot;max_tokens\u0026quot;: 2048, \u0026quot;temperature\u0026quot;: 0.0, \u0026quot;output_format_schema\u0026quot;: { \u0026quot;type\u0026quot;: \u0026quot;object\u0026quot;, \u0026quot;additionalProperties\u0026quot;: false, \u0026quot;required\u0026quot;: [\u0026quot;text\u0026quot;], \u0026quot;properties\u0026quot;: { \u0026quot;text\u0026quot;: { \u0026quot;type\u0026quot;: \u0026quot;string\u0026quot; } } }, \u0026quot;mcp_servers\u0026quot;: [{ \u0026quot;alias\u0026quot;: \u0026quot;docs\u0026quot;, \u0026quot;url\u0026quot;: \u0026quot;https://docs.narrative.io/mcp\u0026quot;, \u0026quot;description\u0026quot;: \u0026quot;Narrative docs MCP server\u0026quot; }] } } ## Example: conversation using an external OAuth-connected MCP server For an external server that requires user authorization, connect it first via POST /mcp-connections (the user consents in a browser; the connection becomes connected). Then reference the returned connection_id in the mcp_servers entry — the platform attaches and refreshes that connection\u0026#x27;s bearer token server-side on every tool call. The token never appears in the payload or run history. alias and url are still required; the url should match the server you connected. json { \u0026quot;name\u0026quot;: \u0026quot;hugging face tools\u0026quot;, \u0026quot;system_prompt\u0026quot;: \u0026quot;Use the available tools to look things up before answering.\u0026quot;, \u0026quot;defaults\u0026quot;: { \u0026quot;model\u0026quot;: \u0026quot;anthropic.claude-opus-4.6\u0026quot;, \u0026quot;data_plane_id\u0026quot;: \u0026quot;f79cbdae-4848-47ca-95e8-69588364d185\u0026quot;, \u0026quot;execution_cluster\u0026quot;: \u0026quot;shared\u0026quot;, \u0026quot;max_iterations\u0026quot;: 8, \u0026quot;max_tokens\u0026quot;: 2048, \u0026quot;temperature\u0026quot;: 0.0, \u0026quot;output_format_schema\u0026quot;: { \u0026quot;type\u0026quot;: \u0026quot;object\u0026quot;, \u0026quot;additionalProperties\u0026quot;: false, \u0026quot;required\u0026quot;: [\u0026quot;text\u0026quot;], \u0026quot;properties\u0026quot;: { \u0026quot;text\u0026quot;: { \u0026quot;type\u0026quot;: \u0026quot;string\u0026quot; } } }, \u0026quot;mcp_servers\u0026quot;: [{ \u0026quot;alias\u0026quot;: \u0026quot;hf\u0026quot;, \u0026quot;url\u0026quot;: \u0026quot;https://huggingface.co/mcp\u0026quot;, \u0026quot;description\u0026quot;: \u0026quot;Hugging Face MCP server (external, OAuth)\u0026quot;, \u0026quot;connection_id\u0026quot;: \u0026quot;b3f1c2a4-5d6e-47f8-9a0b-1c2d3e4f5a6b\u0026quot; }] } } ## Example: conversation with a caller-declared tool (human in the loop) Caller-declared tools[] entries cause the model\u0026#x27;s call to pause the run with status: requires_action. The caller answers by posting a follow-up run with payload.kind: tool_outputs. These tools have no alias — the model sees the bare name, and the platform routes any dash-free tool call to caller-declared resolution. json { \u0026quot;name\u0026quot;: \u0026quot;booking flow\u0026quot;, \u0026quot;system_prompt\u0026quot;: \u0026quot;You are a booking assistant.\u0026quot;, \u0026quot;defaults\u0026quot;: { \u0026quot;model\u0026quot;: \u0026quot;anthropic.claude-opus-4.6\u0026quot;, \u0026quot;data_plane_id\u0026quot;: \u0026quot;f79cbdae-4848-47ca-95e8-69588364d185\u0026quot;, \u0026quot;execution_cluster\u0026quot;: \u0026quot;shared\u0026quot;, \u0026quot;max_iterations\u0026quot;: 5, \u0026quot;output_format_schema\u0026quot;: { \u0026quot;type\u0026quot;: \u0026quot;object\u0026quot;, \u0026quot;additionalProperties\u0026quot;: false, \u0026quot;required\u0026quot;: [\u0026quot;text\u0026quot;], \u0026quot;properties\u0026quot;: { \u0026quot;text\u0026quot;: { \u0026quot;type\u0026quot;: \u0026quot;string\u0026quot; } } }, \u0026quot;tools\u0026quot;: [{ \u0026quot;name\u0026quot;: \u0026quot;confirm_booking\u0026quot;, \u0026quot;description\u0026quot;: \u0026quot;Ask the user to confirm a proposed booking slot.\u0026quot;, \u0026quot;input_schema\u0026quot;: { \u0026quot;type\u0026quot;: \u0026quot;object\u0026quot;, \u0026quot;additionalProperties\u0026quot;: false, \u0026quot;required\u0026quot;: [\u0026quot;proposed_slot\u0026quot;], \u0026quot;properties\u0026quot;: { \u0026quot;proposed_slot\u0026quot;: { \u0026quot;type\u0026quot;: \u0026quot;string\u0026quot; } } } }] } } ## Common 400 errors | type URL slug | Cause | |---|---| | /errors/invalid-tool-alias | MCP alias doesn\u0026#x27;t match ^a-zA-Z{0,7}$ | | /errors/duplicate-tool-alias | Same alias appears twice across mcp_servers | | /errors/invalid-caller-tool-name | Caller-declared tools[].name is empty, contains a dash, or exceeds 64 chars | | /errors/duplicate-caller-tool-name | Same tools[].name appears twice | | /errors/tool-name-too-long | Some MCP wire name {alias}-{tool_name} \u0026gt; 64 chars | | /errors/invalid-mcp-server-url | An mcp_servers[].url is not a public https URL | | /errors/reserved-tool-name | A tools[].name takes the name of a platform tool | | /errors/unknown-model | thinking is set and model is not a model the platform offers | | /errors/thinking-not-supported | thinking is set for a model that is not offered thinking | | /errors/thinking-setting-not-accepted | The model does not take this thinking setting | | /errors/thinking-budget-too-large | thinking.budget_tokens is not smaller than max_tokens | A body that isn\u0026#x27;t valid JSON, or doesn\u0026#x27;t decode (a missing defaults field, an unknown execution_cluster), gets a 400 with an {error, error_description} body instead. See Agent Conversations error catalog for the full list.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Narrative I/O Knowledge Base\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.narrative.io/api-reference/agent-conversations/create-an-agent-conversation\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://narrative-07c7a1f7.mintlify.site/_mintlify/api/og/v2?division=Agent+Conversations\u0026amp;title=Create+an+agent+conversation\u0026amp;description=Creates+a+new+agent+conversation+with+a+pinned+%60system_prompt%60+and+a+%60defaults%60+block%0Athat+every+subsequent+run+inherits.+The+conversation+starts+at+%60version%3A+0\u0026amp;theme=ea22b67648b2d3a364e0af75\u0026amp;signature=ffd81bbef7a6024f1c745dbd06b7c255793f7dd06ff2bf7afab43e56a22a59f9\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Create an agent conversation - Narrative I/O Knowledge Base\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Creates a new agent conversation with a pinned system_prompt and a defaults block that every subsequent run inherits. The conversation starts at version: 0 — your first run\u0026#x27;s expected_version will be 0. ## What this endpoint actually does 1. Validates the defaults block. Failures here (alias regex, duplicate aliases, wire-name length, missing required fields) return 400 immediately — the conversation row is not created on validation failure. 2. Inserts a row in agent_conversations with version = 0, company_id from your bearer token, and the validated defaults serialized as JSONB. 3. Returns the persisted conversation echo. No workflows are started here. The conversation is a long-lived container; the actual model execution happens later, in POST /agents/conversations/{id}/runs. ## What you cannot change later - system_prompt — pinned for the conversation\u0026#x27;s lifetime. If you need a different system prompt, create a new conversation. - company_id / user_id — derived from the bearer token at creation time; not exposed in the request body. Both gate every subsequent read endpoint on this conversation: peers in the same company cannot see each other\u0026#x27;s conversations, runs, or messages. Cross-user access surfaces as 404 — the API does not distinguish \u0026quot;doesn\u0026#x27;t exist\u0026quot; from \u0026quot;owned by another user\u0026quot;. Everything else in defaults (model, max_iterations, tools, etc.) is just a default — any individual run can override any of those fields via config_override on its POST .../runs body. See Agent Conversations Reference for the override semantics. ## Permission agent_conversations resource with write verb. The same permission gates POST .../runs; read is required for the GET endpoints. ## Example: minimal \u0026quot;hello world\u0026quot; conversation (no tools) json { \u0026quot;name\u0026quot;: \u0026quot;hello world\u0026quot;, \u0026quot;system_prompt\u0026quot;: \u0026quot;You are a helpful assistant. Answer concisely.\u0026quot;, \u0026quot;defaults\u0026quot;: { \u0026quot;model\u0026quot;: \u0026quot;anthropic.claude-opus-4.6\u0026quot;, \u0026quot;data_plane_id\u0026quot;: \u0026quot;f79cbdae-4848-47ca-95e8-69588364d185\u0026quot;, \u0026quot;execution_cluster\u0026quot;: \u0026quot;shared\u0026quot;, \u0026quot;max_iterations\u0026quot;: 10, \u0026quot;max_tokens\u0026quot;: 1024, \u0026quot;temperature\u0026quot;: 0.0, \u0026quot;output_format_schema\u0026quot;: { \u0026quot;type\u0026quot;: \u0026quot;object\u0026quot;, \u0026quot;additionalProperties\u0026quot;: false, \u0026quot;required\u0026quot;: [\u0026quot;text\u0026quot;], \u0026quot;properties\u0026quot;: { \u0026quot;text\u0026quot;: { \u0026quot;type\u0026quot;: \u0026quot;string\u0026quot; } } } } } ## Example: conversation that can search the Narrative docs The mcp_servers entry registers two tools the model can call server-side. The platform handles the JSON-RPC calls to https://docs.narrative.io/mcp transparently. json { \u0026quot;name\u0026quot;: \u0026quot;docs search\u0026quot;, \u0026quot;system_prompt\u0026quot;: \u0026quot;Use the available tools to look things up before answering.\u0026quot;, \u0026quot;defaults\u0026quot;: { \u0026quot;model\u0026quot;: \u0026quot;anthropic.claude-opus-4.6\u0026quot;, \u0026quot;data_plane_id\u0026quot;: \u0026quot;f79cbdae-4848-47ca-95e8-69588364d185\u0026quot;, \u0026quot;execution_cluster\u0026quot;: \u0026quot;shared\u0026quot;, \u0026quot;max_iterations\u0026quot;: 8, \u0026quot;max_tokens\u0026quot;: 2048, \u0026quot;temperature\u0026quot;: 0.0, \u0026quot;output_format_schema\u0026quot;: { \u0026quot;type\u0026quot;: \u0026quot;object\u0026quot;, \u0026quot;additionalProperties\u0026quot;: false, \u0026quot;required\u0026quot;: [\u0026quot;text\u0026quot;], \u0026quot;properties\u0026quot;: { \u0026quot;text\u0026quot;: { \u0026quot;type\u0026quot;: \u0026quot;string\u0026quot; } } }, \u0026quot;mcp_servers\u0026quot;: [{ \u0026quot;alias\u0026quot;: \u0026quot;docs\u0026quot;, \u0026quot;url\u0026quot;: \u0026quot;https://docs.narrative.io/mcp\u0026quot;, \u0026quot;description\u0026quot;: \u0026quot;Narrative docs MCP server\u0026quot; }] } } ## Example: conversation using an external OAuth-connected MCP server For an external server that requires user authorization, connect it first via POST /mcp-connections (the user consents in a browser; the connection becomes connected). Then reference the returned connection_id in the mcp_servers entry — the platform attaches and refreshes that connection\u0026#x27;s bearer token server-side on every tool call. The token never appears in the payload or run history. alias and url are still required; the url should match the server you connected. json { \u0026quot;name\u0026quot;: \u0026quot;hugging face tools\u0026quot;, \u0026quot;system_prompt\u0026quot;: \u0026quot;Use the available tools to look things up before answering.\u0026quot;, \u0026quot;defaults\u0026quot;: { \u0026quot;model\u0026quot;: \u0026quot;anthropic.claude-opus-4.6\u0026quot;, \u0026quot;data_plane_id\u0026quot;: \u0026quot;f79cbdae-4848-47ca-95e8-69588364d185\u0026quot;, \u0026quot;execution_cluster\u0026quot;: \u0026quot;shared\u0026quot;, \u0026quot;max_iterations\u0026quot;: 8, \u0026quot;max_tokens\u0026quot;: 2048, \u0026quot;temperature\u0026quot;: 0.0, \u0026quot;output_format_schema\u0026quot;: { \u0026quot;type\u0026quot;: \u0026quot;object\u0026quot;, \u0026quot;additionalProperties\u0026quot;: false, \u0026quot;required\u0026quot;: [\u0026quot;text\u0026quot;], \u0026quot;properties\u0026quot;: { \u0026quot;text\u0026quot;: { \u0026quot;type\u0026quot;: \u0026quot;string\u0026quot; } } }, \u0026quot;mcp_servers\u0026quot;: [{ \u0026quot;alias\u0026quot;: \u0026quot;hf\u0026quot;, \u0026quot;url\u0026quot;: \u0026quot;https://huggingface.co/mcp\u0026quot;, \u0026quot;description\u0026quot;: \u0026quot;Hugging Face MCP server (external, OAuth)\u0026quot;, \u0026quot;connection_id\u0026quot;: \u0026quot;b3f1c2a4-5d6e-47f8-9a0b-1c2d3e4f5a6b\u0026quot; }] } } ## Example: conversation with a caller-declared tool (human in the loop) Caller-declared tools[] entries cause the model\u0026#x27;s call to pause the run with status: requires_action. The caller answers by posting a follow-up run with payload.kind: tool_outputs. These tools have no alias — the model sees the bare name, and the platform routes any dash-free tool call to caller-declared resolution. json { \u0026quot;name\u0026quot;: \u0026quot;booking flow\u0026quot;, \u0026quot;system_prompt\u0026quot;: \u0026quot;You are a booking assistant.\u0026quot;, \u0026quot;defaults\u0026quot;: { \u0026quot;model\u0026quot;: \u0026quot;anthropic.claude-opus-4.6\u0026quot;, \u0026quot;data_plane_id\u0026quot;: \u0026quot;f79cbdae-4848-47ca-95e8-69588364d185\u0026quot;, \u0026quot;execution_cluster\u0026quot;: \u0026quot;shared\u0026quot;, \u0026quot;max_iterations\u0026quot;: 5, \u0026quot;output_format_schema\u0026quot;: { \u0026quot;type\u0026quot;: \u0026quot;object\u0026quot;, \u0026quot;additionalProperties\u0026quot;: false, \u0026quot;required\u0026quot;: [\u0026quot;text\u0026quot;], \u0026quot;properties\u0026quot;: { \u0026quot;text\u0026quot;: { \u0026quot;type\u0026quot;: \u0026quot;string\u0026quot; } } }, \u0026quot;tools\u0026quot;: [{ \u0026quot;name\u0026quot;: \u0026quot;confirm_booking\u0026quot;, \u0026quot;description\u0026quot;: \u0026quot;Ask the user to confirm a proposed booking slot.\u0026quot;, \u0026quot;input_schema\u0026quot;: { \u0026quot;type\u0026quot;: \u0026quot;object\u0026quot;, \u0026quot;additionalProperties\u0026quot;: false, \u0026quot;required\u0026quot;: [\u0026quot;proposed_slot\u0026quot;], \u0026quot;properties\u0026quot;: { \u0026quot;proposed_slot\u0026quot;: { \u0026quot;type\u0026quot;: \u0026quot;string\u0026quot; } } } }] } } ## Common 400 errors | type URL slug | Cause | |---|---| | /errors/invalid-tool-alias | MCP alias doesn\u0026#x27;t match ^a-zA-Z{0,7}$ | | /errors/duplicate-tool-alias | Same alias appears twice across mcp_servers | | /errors/invalid-caller-tool-name | Caller-declared tools[].name is empty, contains a dash, or exceeds 64 chars | | /errors/duplicate-caller-tool-name | Same tools[].name appears twice | | /errors/tool-name-too-long | Some MCP wire name {alias}-{tool_name} \u0026gt; 64 chars | | /errors/invalid-mcp-server-url | An mcp_servers[].url is not a public https URL | | /errors/reserved-tool-name | A tools[].name takes the name of a platform tool | | /errors/unknown-model | thinking is set and model is not a model the platform offers | | /errors/thinking-not-supported | thinking is set for a model that is not offered thinking | | /errors/thinking-setting-not-accepted | The model does not take this thinking setting | | /errors/thinking-budget-too-large | thinking.budget_tokens is not smaller than max_tokens | A body that isn\u0026#x27;t valid JSON, or doesn\u0026#x27;t decode (a missing defaults field, an unknown execution_cluster), gets a 400 with an {error, error_description} body instead. See Agent Conversations error catalog for the full list.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://narrative-07c7a1f7.mintlify.site/_mintlify/api/og/v2?division=Agent+Conversations\u0026amp;title=Create+an+agent+conversation\u0026amp;description=Creates+a+new+agent+conversation+with+a+pinned+%60system_prompt%60+and+a+%60defaults%60+block%0Athat+every+subsequent+run+inherits.+The+conversation+starts+at+%60version%3A+0\u0026amp;theme=ea22b67648b2d3a364e0af75\u0026amp;signature=ffd81bbef7a6024f1c745dbd06b7c255793f7dd06ff2bf7afab43e56a22a59f9\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/narrative-07c7a1f7/OOk68seBU2ePTAv6/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Narrative I/O Knowledge Base\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#1438F5\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.narrative.io/api-reference/agent-conversations/create-an-agent-conversation\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/agent-conversations/create-an-agent-conversation.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.narrative.io/#organization\",\"name\":\"Narrative I/O Knowledge Base\",\"url\":\"https://docs.narrative.io\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/narrative-07c7a1f7/ia6SQX79O4nc7uYf/logo/banner.png?fit=max\u0026auto=format\u0026n=ia6SQX79O4nc7uYf\u0026q=85\u0026s=99860b25011c79366624a87d1f648861\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.narrative.io#website\",\"name\":\"Narrative I/O Knowledge Base\",\"url\":\"https://docs.narrative.io\",\"publisher\":{\"@id\":\"https://docs.narrative.io/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.narrative.io/api-reference/agent-conversations/create-an-agent-conversation#webpage\",\"url\":\"https://docs.narrative.io/api-reference/agent-conversations/create-an-agent-conversation\",\"name\":\"Create an agent conversation\",\"description\":\"Creates a new agent conversation with a pinned system_prompt and a defaults block that every subsequent run inherits. The conversation starts at version: 0 — your first run's expected_version will be 0. ## What this endpoint actually does 1. Validates the defaults block. Failures here (alias regex, duplicate aliases, wire-name length, missing required fields) return 400 immediately — the conversation row is not created on validation failure. 2. Inserts a row in agent_conversations with version = 0, company_id from your bearer token, and the validated defaults serialized as JSONB. 3. Returns the persisted conversation echo. No workflows are started here. The conversation is a long-lived container; the actual model execution happens later, in POST /agents/conversations/{id}/runs. ## What you cannot change later - system_prompt — pinned for the conversation's lifetime. If you need a different system prompt, create a new conversation. - company_id / user_id — derived from the bearer token at creation time; not exposed in the request body. Both gate every subsequent read endpoint on this conversation: peers in the same company cannot see each other's conversations, runs, or messages. Cross-user access surfaces as 404 — the API does not distinguish \\\"doesn't exist\\\" from \\\"owned by another user\\\". Everything else in defaults (model, max_iterations, tools, etc.) is just a default — any individual run can override any of those fields via config_override on its POST .../runs body. See Agent Conversations Reference for the override semantics. ## Permission agent_conversations resource with write verb. The same permission gates POST .../runs; read is required for the GET endpoints. ## Example: minimal \\\"hello world\\\" conversation (no tools) json { \\\"name\\\": \\\"hello world\\\", \\\"system_prompt\\\": \\\"You are a helpful assistant. Answer concisely.\\\", \\\"defaults\\\": { \\\"model\\\": \\\"anthropic.claude-opus-4.6\\\", \\\"data_plane_id\\\": \\\"f79cbdae-4848-47ca-95e8-69588364d185\\\", \\\"execution_cluster\\\": \\\"shared\\\", \\\"max_iterations\\\": 10, \\\"max_tokens\\\": 1024, \\\"temperature\\\": 0.0, \\\"output_format_schema\\\": { \\\"type\\\": \\\"object\\\", \\\"additionalProperties\\\": false, \\\"required\\\": [\\\"text\\\"], \\\"properties\\\": { \\\"text\\\": { \\\"type\\\": \\\"string\\\" } } } } } ## Example: conversation that can search the Narrative docs The mcp_servers entry registers two tools the model can call server-side. The platform handles the JSON-RPC calls to https://docs.narrative.io/mcp transparently. json { \\\"name\\\": \\\"docs search\\\", \\\"system_prompt\\\": \\\"Use the available tools to look things up before answering.\\\", \\\"defaults\\\": { \\\"model\\\": \\\"anthropic.claude-opus-4.6\\\", \\\"data_plane_id\\\": \\\"f79cbdae-4848-47ca-95e8-69588364d185\\\", \\\"execution_cluster\\\": \\\"shared\\\", \\\"max_iterations\\\": 8, \\\"max_tokens\\\": 2048, \\\"temperature\\\": 0.0, \\\"output_format_schema\\\": { \\\"type\\\": \\\"object\\\", \\\"additionalProperties\\\": false, \\\"required\\\": [\\\"text\\\"], \\\"properties\\\": { \\\"text\\\": { \\\"type\\\": \\\"string\\\" } } }, \\\"mcp_servers\\\": [{ \\\"alias\\\": \\\"docs\\\", \\\"url\\\": \\\"https://docs.narrative.io/mcp\\\", \\\"description\\\": \\\"Narrative docs MCP server\\\" }] } } ## Example: conversation using an external OAuth-connected MCP server For an external server that requires user authorization, connect it first via POST /mcp-connections (the user consents in a browser; the connection becomes connected). Then reference the returned connection_id in the mcp_servers entry — the platform attaches and refreshes that connection's bearer token server-side on every tool call. The token never appears in the payload or run history. alias and url are still required; the url should match the server you connected. json { \\\"name\\\": \\\"hugging face tools\\\", \\\"system_prompt\\\": \\\"Use the available tools to look things up before answering.\\\", \\\"defaults\\\": { \\\"model\\\": \\\"anthropic.claude-opus-4.6\\\", \\\"data_plane_id\\\": \\\"f79cbdae-4848-47ca-95e8-69588364d185\\\", \\\"execution_cluster\\\": \\\"shared\\\", \\\"max_iterations\\\": 8, \\\"max_tokens\\\": 2048, \\\"temperature\\\": 0.0, \\\"output_format_schema\\\": { \\\"type\\\": \\\"object\\\", \\\"additionalProperties\\\": false, \\\"required\\\": [\\\"text\\\"], \\\"properties\\\": { \\\"text\\\": { \\\"type\\\": \\\"string\\\" } } }, \\\"mcp_servers\\\": [{ \\\"alias\\\": \\\"hf\\\", \\\"url\\\": \\\"https://huggingface.co/mcp\\\", \\\"description\\\": \\\"Hugging Face MCP server (external, OAuth)\\\", \\\"connection_id\\\": \\\"b3f1c2a4-5d6e-47f8-9a0b-1c2d3e4f5a6b\\\" }] } } ## Example: conversation with a caller-declared tool (human in the loop) Caller-declared tools[] entries cause the model's call to pause the run with status: requires_action. The caller answers by posting a follow-up run with payload.kind: tool_outputs. These tools have no alias — the model sees the bare name, and the platform routes any dash-free tool call to caller-declared resolution. json { \\\"name\\\": \\\"booking flow\\\", \\\"system_prompt\\\": \\\"You are a booking assistant.\\\", \\\"defaults\\\": { \\\"model\\\": \\\"anthropic.claude-opus-4.6\\\", \\\"data_plane_id\\\": \\\"f79cbdae-4848-47ca-95e8-69588364d185\\\", \\\"execution_cluster\\\": \\\"shared\\\", \\\"max_iterations\\\": 5, \\\"output_format_schema\\\": { \\\"type\\\": \\\"object\\\", \\\"additionalProperties\\\": false, \\\"required\\\": [\\\"text\\\"], \\\"properties\\\": { \\\"text\\\": { \\\"type\\\": \\\"string\\\" } } }, \\\"tools\\\": [{ \\\"name\\\": \\\"confirm_booking\\\", \\\"description\\\": \\\"Ask the user to confirm a proposed booking slot.\\\", \\\"input_schema\\\": { \\\"type\\\": \\\"object\\\", \\\"additionalProperties\\\": false, \\\"required\\\": [\\\"proposed_slot\\\"], \\\"properties\\\": { \\\"proposed_slot\\\": { \\\"type\\\": \\\"string\\\" } } } }] } } ## Common 400 errors | type URL slug | Cause | |---|---| | /errors/invalid-tool-alias | MCP alias doesn't match ^a-zA-Z{0,7}$ | | /errors/duplicate-tool-alias | Same alias appears twice across mcp_servers | | /errors/invalid-caller-tool-name | Caller-declared tools[].name is empty, contains a dash, or exceeds 64 chars | | /errors/duplicate-caller-tool-name | Same tools[].name appears twice | | /errors/tool-name-too-long | Some MCP wire name {alias}-{tool_name} > 64 chars | | /errors/invalid-mcp-server-url | An mcp_servers[].url is not a public https URL | | /errors/reserved-tool-name | A tools[].name takes the name of a platform tool | | /errors/unknown-model | thinking is set and model is not a model the platform offers | | /errors/thinking-not-supported | thinking is set for a model that is not offered thinking | | /errors/thinking-setting-not-accepted | The model does not take this thinking setting | | /errors/thinking-budget-too-large | thinking.budget_tokens is not smaller than max_tokens | A body that isn't valid JSON, or doesn't decode (a missing defaults field, an unknown execution_cluster), gets a 400 with an {error, error_description} body instead. See Agent Conversations error catalog for the full list.\",\"dateModified\":\"2026-11-26T15:43:51.684Z\",\"isPartOf\":{\"@id\":\"https://docs.narrative.io#website\"},\"breadcrumb\":{\"@id\":\"https://docs.narrative.io/api-reference/agent-conversations/create-an-agent-conversation#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.narrative.io/api-reference/agent-conversations/create-an-agent-conversation#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Agent Conversations\",\"item\":\"https://docs.narrative.io/api-reference/agent-conversations/list-the-calling-users-agent-conversations\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create an agent conversation\",\"item\":\"https://docs.narrative.io/api-reference/agent-conversations/create-an-agent-conversation\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.narrative.io/api-reference/agent-conversations/create-an-agent-conversation#apireference\",\"headline\":\"Create an agent conversation\",\"name\":\"Create an agent conversation\",\"description\":\"Creates a new agent conversation with a pinned system_prompt and a defaults block that every subsequent run inherits. The conversation starts at version: 0 — your first run's expected_version will be 0. ## What this endpoint actually does 1. Validates the defaults block. Failures here (alias regex, duplicate aliases, wire-name length, missing required fields) return 400 immediately — the conversation row is not created on validation failure. 2. Inserts a row in agent_conversations with version = 0, company_id from your bearer token, and the validated defaults serialized as JSONB. 3. Returns the persisted conversation echo. No workflows are started here. The conversation is a long-lived container; the actual model execution happens later, in POST /agents/conversations/{id}/runs. ## What you cannot change later - system_prompt — pinned for the conversation's lifetime. If you need a different system prompt, create a new conversation. - company_id / user_id — derived from the bearer token at creation time; not exposed in the request body. Both gate every subsequent read endpoint on this conversation: peers in the same company cannot see each other's conversations, runs, or messages. Cross-user access surfaces as 404 — the API does not distinguish \\\"doesn't exist\\\" from \\\"owned by another user\\\". Everything else in defaults (model, max_iterations, tools, etc.) is just a default — any individual run can override any of those fields via config_override on its POST .../runs body. See Agent Conversations Reference for the override semantics. ## Permission agent_conversations resource with write verb. The same permission gates POST .../runs; read is required for the GET endpoints. ## Example: minimal \\\"hello world\\\" conversation (no tools) json { \\\"name\\\": \\\"hello world\\\", \\\"system_prompt\\\": \\\"You are a helpful assistant. Answer concisely.\\\", \\\"defaults\\\": { \\\"model\\\": \\\"anthropic.claude-opus-4.6\\\", \\\"data_plane_id\\\": \\\"f79cbdae-4848-47ca-95e8-69588364d185\\\", \\\"execution_cluster\\\": \\\"shared\\\", \\\"max_iterations\\\": 10, \\\"max_tokens\\\": 1024, \\\"temperature\\\": 0.0, \\\"output_format_schema\\\": { \\\"type\\\": \\\"object\\\", \\\"additionalProperties\\\": false, \\\"required\\\": [\\\"text\\\"], \\\"properties\\\": { \\\"text\\\": { \\\"type\\\": \\\"string\\\" } } } } } ## Example: conversation that can search the Narrative docs The mcp_servers entry registers two tools the model can call server-side. The platform handles the JSON-RPC calls to https://docs.narrative.io/mcp transparently. json { \\\"name\\\": \\\"docs search\\\", \\\"system_prompt\\\": \\\"Use the available tools to look things up before answering.\\\", \\\"defaults\\\": { \\\"model\\\": \\\"anthropic.claude-opus-4.6\\\", \\\"data_plane_id\\\": \\\"f79cbdae-4848-47ca-95e8-69588364d185\\\", \\\"execution_cluster\\\": \\\"shared\\\", \\\"max_iterations\\\": 8, \\\"max_tokens\\\": 2048, \\\"temperature\\\": 0.0, \\\"output_format_schema\\\": { \\\"type\\\": \\\"object\\\", \\\"additionalProperties\\\": false, \\\"required\\\": [\\\"text\\\"], \\\"properties\\\": { \\\"text\\\": { \\\"type\\\": \\\"string\\\" } } }, \\\"mcp_servers\\\": [{ \\\"alias\\\": \\\"docs\\\", \\\"url\\\": \\\"https://docs.narrative.io/mcp\\\", \\\"description\\\": \\\"Narrative docs MCP server\\\" }] } } ## Example: conversation using an external OAuth-connected MCP server For an external server that requires user authorization, connect it first via POST /mcp-connections (the user consents in a browser; the connection becomes connected). Then reference the returned connection_id in the mcp_servers entry — the platform attaches and refreshes that connection's bearer token server-side on every tool call. The token never appears in the payload or run history. alias and url are still required; the url should match the server you connected. json { \\\"name\\\": \\\"hugging face tools\\\", \\\"system_prompt\\\": \\\"Use the available tools to look things up before answering.\\\", \\\"defaults\\\": { \\\"model\\\": \\\"anthropic.claude-opus-4.6\\\", \\\"data_plane_id\\\": \\\"f79cbdae-4848-47ca-95e8-69588364d185\\\", \\\"execution_cluster\\\": \\\"shared\\\", \\\"max_iterations\\\": 8, \\\"max_tokens\\\": 2048, \\\"temperature\\\": 0.0, \\\"output_format_schema\\\": { \\\"type\\\": \\\"object\\\", \\\"additionalProperties\\\": false, \\\"required\\\": [\\\"text\\\"], \\\"properties\\\": { \\\"text\\\": { \\\"type\\\": \\\"string\\\" } } }, \\\"mcp_servers\\\": [{ \\\"alias\\\": \\\"hf\\\", \\\"url\\\": \\\"https://huggingface.co/mcp\\\", \\\"description\\\": \\\"Hugging Face MCP server (external, OAuth)\\\", \\\"connection_id\\\": \\\"b3f1c2a4-5d6e-47f8-9a0b-1c2d3e4f5a6b\\\" }] } } ## Example: conversation with a caller-declared tool (human in the loop) Caller-declared tools[] entries cause the model's call to pause the run with status: requires_action. The caller answers by posting a follow-up run with payload.kind: tool_outputs. These tools have no alias — the model sees the bare name, and the platform routes any dash-free tool call to caller-declared resolution. json { \\\"name\\\": \\\"booking flow\\\", \\\"system_prompt\\\": \\\"You are a booking assistant.\\\", \\\"defaults\\\": { \\\"model\\\": \\\"anthropic.claude-opus-4.6\\\", \\\"data_plane_id\\\": \\\"f79cbdae-4848-47ca-95e8-69588364d185\\\", \\\"execution_cluster\\\": \\\"shared\\\", \\\"max_iterations\\\": 5, \\\"output_format_schema\\\": { \\\"type\\\": \\\"object\\\", \\\"additionalProperties\\\": false, \\\"required\\\": [\\\"text\\\"], \\\"properties\\\": { \\\"text\\\": { \\\"type\\\": \\\"string\\\" } } }, \\\"tools\\\": [{ \\\"name\\\": \\\"confirm_booking\\\", \\\"description\\\": \\\"Ask the user to confirm a proposed booking slot.\\\", \\\"input_schema\\\": { \\\"type\\\": \\\"object\\\", \\\"additionalProperties\\\": false, \\\"required\\\": [\\\"proposed_slot\\\"], \\\"properties\\\": { \\\"proposed_slot\\\": { \\\"type\\\": \\\"string\\\" } } } }] } } ## Common 400 errors | type URL slug | Cause | |---|---| | /errors/invalid-tool-alias | MCP alias doesn't match ^a-zA-Z{0,7}$ | | /errors/duplicate-tool-alias | Same alias appears twice across mcp_servers | | /errors/invalid-caller-tool-name | Caller-declared tools[].name is empty, contains a dash, or exceeds 64 chars | | /errors/duplicate-caller-tool-name | Same tools[].name appears twice | | /errors/tool-name-too-long | Some MCP wire name {alias}-{tool_name} > 64 chars | | /errors/invalid-mcp-server-url | An mcp_servers[].url is not a public https URL | | /errors/reserved-tool-name | A tools[].name takes the name of a platform tool | | /errors/unknown-model | thinking is set and model is not a model the platform offers | | /errors/thinking-not-supported | thinking is set for a model that is not offered thinking | | /errors/thinking-setting-not-accepted | The model does not take this thinking setting | | /errors/thinking-budget-too-large | thinking.budget_tokens is not smaller than max_tokens | A body that isn't valid JSON, or doesn't decode (a missing defaults field, an unknown execution_cluster), gets a 400 with an {error, error_description} body instead. See Agent Conversations error catalog for the full list.\",\"url\":\"https://docs.narrative.io/api-reference/agent-conversations/create-an-agent-conversation\",\"mainEntityOfPage\":{\"@id\":\"https://docs.narrative.io/api-reference/agent-conversations/create-an-agent-conversation#webpage\"},\"dateModified\":\"2026-11-26T15:43:51.684Z\",\"publisher\":{\"@id\":\"https://docs.narrative.io/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.narrative.io#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Narrative I/O Knowledge Base\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Narrative I/O Knowledge Base\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/agent-conversations/create-an-agent-conversation.md","siteName":"Narrative I/O Knowledge Base","nav":{"global":{"anchors":[{"anchor":"Release Notes","icon":"clock-rotate-left","href":"/release-notes"}]},"tabs":[{"tab":"Getting Started","pages":[{"title":"Getting Started","href":"/getting-started/create-account"}]},{"tab":"Concepts","pages":[{"title":"Concepts","href":"/concepts"}]},{"tab":"Guides","pages":[{"title":"Guides","href":"/guides"}]},{"tab":"Cookbooks","pages":[{"title":"Cookbooks","href":"/cookbooks"}]},{"tab":"Reference","pages":[{"title":"Reference","href":"/reference"}]},{"tab":"Connectors","pages":[{"title":"Connectors","href":"/reference/connectors"}]},{"tab":"NQL","pages":[{"title":"NQL","href":"/nql"}]},{"tab":"API Documentation","groups":[{"group":"Overview","pages":[{"title":"REST API","href":"/api-reference/introduction"}]},{"group":"Access Rules","pages":[{"title":"Get an Access Rule by id (V2)","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /v2/access-rules/{access_rule_id}","href":"/api-reference/access-rules/get-an-access-rule-by-id-v2"},{"title":"Update an Access Rule by id (V2)","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json put /v2/access-rules/{access_rule_id}","href":"/api-reference/access-rules/update-an-access-rule-by-id-v2"},{"title":"Delete an access rule","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json delete /v2/access-rules/{access_rule_id}","href":"/api-reference/access-rules/delete-an-access-rule"},{"title":"Get the query policy of an Access Rule","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /v2/access-rules/{access_rule_id}/query-policy","href":"/api-reference/access-rules/get-the-query-policy-of-an-access-rule"},{"title":"Set the query policy of an Access Rule","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json put /v2/access-rules/{access_rule_id}/query-policy","href":"/api-reference/access-rules/set-the-query-policy-of-an-access-rule"},{"title":"Remove the query policy of an Access Rule","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json delete /v2/access-rules/{access_rule_id}/query-policy","href":"/api-reference/access-rules/remove-the-query-policy-of-an-access-rule"},{"title":"Get an Access Rule by name (V2)","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /v2/access-rules/{company_slug}/{access_rule_name}","href":"/api-reference/access-rules/get-an-access-rule-by-name-v2"},{"title":"Get all accessible Access Rules (V2)","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /v2/access-rules","href":"/api-reference/access-rules/get-all-accessible-access-rules-v2"},{"title":"Create a new Access Rule","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /v2/access-rules","href":"/api-reference/access-rules/create-a-new-access-rule"}]},{"group":"Access Tokens","pages":[{"title":"List Access Tokens","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /access-tokens/tokens","href":"/api-reference/access-tokens/list-access-tokens"},{"title":"Create Access Token","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /access-tokens/tokens","href":"/api-reference/access-tokens/create-access-token"},{"title":"Get Access Token","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /access-tokens/tokens/{access_token_id}","href":"/api-reference/access-tokens/get-access-token"},{"title":"Update Access Token","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json put /access-tokens/tokens/{access_token_id}","href":"/api-reference/access-tokens/update-access-token"},{"title":"Delete Access Token","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json delete /access-tokens/tokens/{access_token_id}","href":"/api-reference/access-tokens/delete-access-token"},{"title":"Rotate Access Token","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /access-tokens/tokens/{access_token_id}/rotate","href":"/api-reference/access-tokens/rotate-access-token"}]},{"group":"Agent Conversations","pages":[{"title":"List the calling user's agent conversations","description":"Returns a paginated list of conversations created by the bearer-token's user, newest\nfirst (by `created_at`).\n\n## Scope: per-user, not per-company\n\nResults are filtered by **both** `company_id` and `user_id` from the bearer token —\npeers in the same company are **not** visible. A caller with no conversations gets\n`records: []` with `total_records: 0`, not a 404.\n\n## Pagination\n\nUses the standard `page` / `per_page` query parameters. Default `per_page` is 50.\n`page` must be 1 or more and `per_page` must be a positive integer. A value that isn't\nreturns a 404 with an empty body, because the route stops matching.\nThe response envelope carries `prev_page`, `current_page`, `next_page`,\n`total_records`, `total_pages`, and the `records` array — same shape every other\npaginated Narrative endpoint uses.\n\n## Permission\n\n`agent_conversations` resource with `read` verb.\n\n## Example\n\n```bash\ncurl \"$API/agents/conversations?page=1\u0026per_page=20\" \\\n -H \"Authorization: Bearer $TOKEN\"\n```","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /agents/conversations","href":"/api-reference/agent-conversations/list-the-calling-users-agent-conversations"},{"title":"Create an agent conversation","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /agents/conversations","href":"/api-reference/agent-conversations/create-an-agent-conversation"},{"title":"Get an agent conversation","description":"Fetches the conversation's metadata plus its current `version`. Use the `version`\nimmediately before posting a run as `expected_version` — that's how the platform's\ncompare-and-swap guard knows whether the conversation has advanced since you last\nlooked.\n\n## When to call this\n\n- Before starting a new run: read `version`, post it as `expected_version`. If you\n cache the value across long delays you'll hit\n [Version Conflict](https://docs.narrative.io/reference/architecture/agent-conversations/errors/version-conflict)\n more often.\n- When resuming a `requires_action` run: the conversation's version has advanced\n because the assistant turn was persisted on the run row's finalize. Re-read it\n before posting `tool_outputs`.\n- To inspect a conversation's `defaults` if you've forgotten what was pinned.\n\n## What you cannot do here\n\nThere is no `PATCH` / `PUT` for conversations. The `system_prompt` and `defaults` are\nimmutable at the conversation level. To change behavior, override per-run via\n`config_override`, or create a new conversation.\n\n## Scope: per-user, not per-company\n\nConversations are scoped to the **`(company_id, user_id)`** pair that created them.\nPeers in the same company cannot see each other's conversations — the endpoint\nreturns 404 for \"does not exist\", \"belongs to a different company\", and \"belongs to\na different user in the same company\" alike. This is deliberate: distinguishing them\nwould leak existence.\n\n## Permission\n\n`agent_conversations` resource with `read` verb.","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /agents/conversations/{id}","href":"/api-reference/agent-conversations/get-an-agent-conversation"},{"title":"List conversation messages (delta read by version cursor)","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /agents/conversations/{id}/messages","href":"/api-reference/agent-conversations/list-conversation-messages-delta-read-by-version-cursor"},{"title":"Start a new run on the conversation","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /agents/conversations/{id}/runs","href":"/api-reference/agent-conversations/start-a-new-run-on-the-conversation"},{"title":"Stop waiting on a handle","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /agents/conversations/{id}/waitables/{handle}/cancel","href":"/api-reference/agent-conversations/stop-waiting-on-a-handle"},{"title":"Get a run's current state","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /agents/runs/{id}","href":"/api-reference/agent-conversations/get-a-runs-current-state"}]},{"group":"App API","pages":[{"title":"Delivery Commands","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /v1/app/commands/delivery","href":"/api-reference/app-api/delivery-commands"},{"title":"Delivery Files","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /v1/app/commands/delivery/{delivery_id}/files","href":"/api-reference/app-api/delivery-files"},{"title":"Download file","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /v1/app/commands/delivery/{delivery_id}/download/{filename}","href":"/api-reference/app-api/download-file"}]},{"group":"App Invites","pages":[{"title":"List App Invites","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /app-invites","href":"/api-reference/app-invites/list-app-invites"},{"title":"Create App Invite","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /app-invites","href":"/api-reference/app-invites/create-app-invite"},{"title":"Get App Invite","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /app-invites/{id}","href":"/api-reference/app-invites/get-app-invite"},{"title":"Archive App Invite","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json delete /app-invites/{id}","href":"/api-reference/app-invites/archive-app-invite"},{"title":"Activate App Invite","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /app-invites/{id}/activate","href":"/api-reference/app-invites/activate-app-invite"},{"title":"Get App Invite By Code","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /app-invites/codes/{code}","href":"/api-reference/app-invites/get-app-invite-by-code"}]},{"group":"Apps","pages":[{"title":"Lists apps","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /apps","href":"/api-reference/apps/lists-apps"},{"title":"Publish app event","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /apps/events","href":"/api-reference/apps/publish-app-event"},{"title":"List installed app interfaces","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /apps/installed/interfaces","href":"/api-reference/apps/list-installed-app-interfaces"},{"title":"List app interfaces","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /apps/{app_id}/interfaces","href":"/api-reference/apps/list-app-interfaces"},{"title":"Get an app interface","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /apps/{app_id}/interfaces/{interface_id}","href":"/api-reference/apps/get-an-app-interface"},{"title":"Lists profiles","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /apps/{app_slug}/profiles","href":"/api-reference/apps/lists-profiles"},{"title":"Get an app's v1 manifest","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /apps/{app_slug}/manifest","href":"/api-reference/apps/get-an-apps-v1-manifest"},{"title":"List Apps","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /v2/apps","href":"/api-reference/apps/list-apps"},{"title":"Create App","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /v2/apps","href":"/api-reference/apps/create-app"},{"title":"Get App","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /v2/apps/{slug}","href":"/api-reference/apps/get-app"},{"title":"Archive App","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json delete /v2/apps/{slug}","href":"/api-reference/apps/archive-app"},{"title":"Replace App Manifest","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json put /v2/apps/{slug}/manifest","href":"/api-reference/apps/replace-app-manifest"},{"title":"Patch App Manifest","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json patch /v2/apps/{slug}/manifest","href":"/api-reference/apps/patch-app-manifest"},{"title":"Replace App Collaborators","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json put /v2/apps/{slug}/collaborators","href":"/api-reference/apps/replace-app-collaborators"},{"title":"Generate App Credentials","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /v2/apps/{slug}/credentials/generate","href":"/api-reference/apps/generate-app-credentials"},{"title":"Get Admin App","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /v2/admin/apps/{slug}","href":"/api-reference/apps/get-admin-app"},{"title":"Patch Admin App","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json patch /v2/admin/apps/{slug}","href":"/api-reference/apps/patch-admin-app"}]},{"group":"Attributes","pages":[{"title":"Get attributes","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /attributes","href":"/api-reference/attributes/get-attributes"},{"title":"Create an attribute","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /attributes","href":"/api-reference/attributes/create-an-attribute"},{"title":"Get an attribute","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /attributes/{attribute_name_or_id}","href":"/api-reference/attributes/get-an-attribute"},{"title":"Update an attribute","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json put /attributes/{attribute_name_or_id}","href":"/api-reference/attributes/update-an-attribute"},{"title":"Delete an attribute","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json delete /attributes/{attribute_name_or_id}","href":"/api-reference/attributes/delete-an-attribute"},{"title":"Get attribute references.","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /attributes/{attribute_name_or_id}/references","href":"/api-reference/attributes/get-attribute-references"},{"title":"Get the derivation graph around an attribute.","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /attributes/{attribute_name_or_id}/derivation-graph","href":"/api-reference/attributes/get-the-derivation-graph-around-an-attribute"}]},{"group":"Auth","pages":[{"title":"Request or refresh an OAuth token","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /oauth/token","href":"/api-reference/auth/request-or-refresh-an-oauth-token"}]},{"group":"Authentication","pages":[{"title":"Sign in with a Stytch B2B session token","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /authentication/b2b/login","href":"/api-reference/authentication/sign-in-with-a-stytch-b2b-session-token"},{"title":"Register with a Stytch B2B session token","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /authentication/b2b/register","href":"/api-reference/authentication/register-with-a-stytch-b2b-session-token"},{"title":"Check whether a Stytch B2B member is registered on Narrative","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /authentication/b2b/registration-status","href":"/api-reference/authentication/check-whether-a-stytch-b2b-member-is-registered-on-narrative"},{"title":"Exchange a user token for one scoped to another company","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /authentication/exchange-token","href":"/api-reference/authentication/exchange-a-user-token-for-one-scoped-to-another-company"},{"title":"Sign in with a Stytch session token","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /authentication/login","href":"/api-reference/authentication/sign-in-with-a-stytch-session-token"},{"title":"Register with a Stytch session token","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /authentication/register","href":"/api-reference/authentication/register-with-a-stytch-session-token"},{"title":"Check whether a Stytch Magic Links or OAuth user is registered on Narrative","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /authentication/registration-status","href":"/api-reference/authentication/check-whether-a-stytch-magic-links-or-oauth-user-is-registered-on-narrative"}]},{"group":"Billings","pages":[{"title":"Get dataset storage billing","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /admin/billings/dataset-storage-billing","href":"/api-reference/billings/get-dataset-storage-billing"},{"title":"Get dataset storage billing for company","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /billings/dataset-storage-billing","href":"/api-reference/billings/get-dataset-storage-billing-for-company"}]},{"group":"Companies","pages":[{"title":"Lists Company Domains","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /companies/{company_id}/domains","href":"/api-reference/companies/lists-company-domains"},{"title":"Get Company Settings","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /companies/{company_id}/settings","href":"/api-reference/companies/get-company-settings"},{"title":"Update Company Settings","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json patch /companies/{company_id}/settings","href":"/api-reference/companies/update-company-settings"},{"title":"Get a presigned URL to upload company logo","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /admin/companies/logo-upload-url","href":"/api-reference/companies/get-a-presigned-url-to-upload-company-logo"}]},{"group":"Company","pages":[{"title":"Get a company","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /companies/{company_id}","href":"/api-reference/company/get-a-company"},{"title":"Get a company","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /company/{company_id}","href":"/api-reference/company/get-a-company-1"},{"title":"Update a company","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json put /company/{company_id}","href":"/api-reference/company/update-a-company"},{"title":"Delete (archive) a company","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json delete /company/{company_id}","href":"/api-reference/company/delete-archive-a-company"},{"title":"Clear the company's default compute pool for a data plane","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json delete /company/{company_id}/data-planes/{data_plane_id}/default-compute-pool","href":"/api-reference/company/clear-the-companys-default-compute-pool-for-a-data-plane"},{"title":"Set the company's default compute pool for a data plane","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json put /company/{company_id}/data-planes/{data_plane_id}/default-compute-pool/{compute_pool_id}","href":"/api-reference/company/set-the-companys-default-compute-pool-for-a-data-plane"},{"title":"Update a user","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json put /users/{user_id}","href":"/api-reference/company/update-a-user"}]},{"group":"Company Marketing Information","pages":[{"title":"Returns the company and user associated with the token","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /company-info/whoami","href":"/api-reference/company-marketing-information/returns-the-company-and-user-associated-with-the-token"},{"title":"Get marketing details on a company","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /company-info/{company_id}","href":"/api-reference/company-marketing-information/get-marketing-details-on-a-company"}]},{"group":"Compute Pools","pages":[{"title":"List compute pools","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /data-planes/{data_plane_id}/compute-pools","href":"/api-reference/compute-pools/list-compute-pools"},{"title":"Create a compute pool","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /data-planes/{data_plane_id}/compute-pools","href":"/api-reference/compute-pools/create-a-compute-pool"},{"title":"Get a compute pool by ID","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /data-planes/{data_plane_id}/compute-pools/{compute_pool_id}","href":"/api-reference/compute-pools/get-a-compute-pool-by-id"},{"title":"Update a compute pool","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json put /data-planes/{data_plane_id}/compute-pools/{compute_pool_id}","href":"/api-reference/compute-pools/update-a-compute-pool"},{"title":"Archive a compute pool","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json delete /data-planes/{data_plane_id}/compute-pools/{compute_pool_id}","href":"/api-reference/compute-pools/archive-a-compute-pool"}]},{"group":"Connections","pages":[{"title":"List connections","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /v2/connections","href":"/api-reference/connections/list-connections"},{"title":"Create a connection","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /v2/connections","href":"/api-reference/connections/create-a-connection"},{"title":"Get a connection","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /v2/connections/{connection_id}","href":"/api-reference/connections/get-a-connection"},{"title":"Archive a connection","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json delete /v2/connections/{connection_id}","href":"/api-reference/connections/archive-a-connection"}]},{"group":"Data Planes","pages":[{"title":"List data planes","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /data-planes","href":"/api-reference/data-planes/list-data-planes"},{"title":"Create a data plane","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /data-planes","href":"/api-reference/data-planes/create-a-data-plane"},{"title":"Get a data plane by ID","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /data-planes/{data_plane_id}","href":"/api-reference/data-planes/get-a-data-plane-by-id"},{"title":"Archive a data plane","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json delete /data-planes/{data_plane_id}","href":"/api-reference/data-planes/archive-a-data-plane"},{"title":"Update a data plane","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json patch /data-planes/{data_plane_id}","href":"/api-reference/data-planes/update-a-data-plane"},{"title":"Data plane heartbeat","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /data-planes/{data_plane_id}/heartbeat","href":"/api-reference/data-planes/data-plane-heartbeat"},{"title":"Trigger a health check","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /data-planes/{data_plane_id}/health-check","href":"/api-reference/data-planes/trigger-a-health-check"},{"title":"Replace the collaborators on a data plane","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json put /data-planes/{data_plane_id}/collaborators","href":"/api-reference/data-planes/replace-the-collaborators-on-a-data-plane"},{"title":"Add a collaborator to a data plane","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json put /data-planes/{data_plane_id}/collaborators/{collaborator_company_id}","href":"/api-reference/data-planes/add-a-collaborator-to-a-data-plane"},{"title":"Remove a collaborator from a data plane","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json delete /data-planes/{data_plane_id}/collaborators/{collaborator_company_id}","href":"/api-reference/data-planes/remove-a-collaborator-from-a-data-plane"},{"title":"Set the default compute pool for a data plane","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json put /data-planes/{data_plane_id}/default-compute-pool/{compute_pool_id}","href":"/api-reference/data-planes/set-the-default-compute-pool-for-a-data-plane"},{"title":"Clear the default compute pool for a data plane","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json delete /data-planes/{data_plane_id}/default-compute-pool","href":"/api-reference/data-planes/clear-the-default-compute-pool-for-a-data-plane"}]},{"group":"Dataset Configuration","pages":[{"title":"Preview snapshot expirations","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /datasets/{dataset_id}/retention-policy/preview","href":"/api-reference/dataset-configuration/preview-snapshot-expirations"},{"title":"Upsert retention policies for a dataset","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json put /datasets/{dataset_id}/retention-policy","href":"/api-reference/dataset-configuration/upsert-retention-policies-for-a-dataset"}]},{"group":"Dataset Files","pages":[{"title":"Files added","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /datasets/{dataset_id}/snapshots/{snapshot_id}/files-added","href":"/api-reference/dataset-files/files-added"},{"title":"Find snapshots","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /datasets/{dataset_id}/find-snapshots","href":"/api-reference/dataset-files/find-snapshots"},{"title":"Find files","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /datasets/{dataset_id}/find-files","href":"/api-reference/dataset-files/find-files"},{"title":"Issue file download url","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /datasets/{dataset_id}/snapshots/{snapshot_id}/files-added/{file_id}/download","href":"/api-reference/dataset-files/issue-file-download-url"}]},{"group":"Dataset Refresh","pages":[{"title":"Update the materialized view refresh configuration","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json put /datasets/{dataset_id}/refresh-schedule","href":"/api-reference/dataset-refresh/update-the-materialized-view-refresh-configuration"},{"title":"Create a refresh schedule for an existing materialized view","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /datasets/{dataset_id}/refresh-schedule","href":"/api-reference/dataset-refresh/create-a-refresh-schedule-for-an-existing-materialized-view"},{"title":"Archive the materialized view refresh configuration","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json delete /datasets/{dataset_id}/refresh-schedule","href":"/api-reference/dataset-refresh/archive-the-materialized-view-refresh-configuration"},{"title":"Run a materialized view refresh now","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /datasets/{dataset_id}/refresh-materialized-view","href":"/api-reference/dataset-refresh/run-a-materialized-view-refresh-now"}]},{"group":"Dataset Samples","pages":[{"title":"Sample a dataset","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /datasets/{dataset_id}/sample","href":"/api-reference/dataset-samples/sample-a-dataset"},{"title":"Upload a sample","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json put /datasets/{dataset_id}/sample","href":"/api-reference/dataset-samples/upload-a-sample"},{"title":"Delete a sample","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json delete /datasets/{dataset_id}/sample","href":"/api-reference/dataset-samples/delete-a-sample"},{"title":"Sample a dataset (Admin)","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /datasets/{dataset_id}/admin/sample","href":"/api-reference/dataset-samples/sample-a-dataset-admin"},{"title":"Request Dataset Sample","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /datasets/{dataset_id}/request-sample","href":"/api-reference/dataset-samples/request-dataset-sample"},{"title":"Sample a dataset and redact the sample","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /v2/datasets/{dataset_id}/request-sample","href":"/api-reference/dataset-samples/sample-a-dataset-and-redact-the-sample"},{"title":"Get a dataset's sample redaction","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /datasets/{dataset_id}/redaction","href":"/api-reference/dataset-samples/get-a-datasets-sample-redaction"},{"title":"Upload a dataset's sample redaction","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json put /datasets/{dataset_id}/redaction","href":"/api-reference/dataset-samples/upload-a-datasets-sample-redaction"},{"title":"Delete a dataset's sample redaction","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json delete /datasets/{dataset_id}/redaction","href":"/api-reference/dataset-samples/delete-a-datasets-sample-redaction"},{"title":"Sample a dataset with its redaction applied","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /datasets/{dataset_id}/sample/redacted","href":"/api-reference/dataset-samples/sample-a-dataset-with-its-redaction-applied"},{"title":"Sampled Mappings","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /datasets/{dataset_id}/sample/mappings","href":"/api-reference/dataset-samples/sampled-mappings"}]},{"group":"Dataset Statistics","pages":[{"title":"Get Statistics Configuration","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /datasets/{dataset_id}/statistics-configuration","href":"/api-reference/dataset-statistics/get-statistics-configuration"},{"title":"Put Statistics Configuration","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json put /datasets/{dataset_id}/statistics-configuration","href":"/api-reference/dataset-statistics/put-statistics-configuration"},{"title":"Disable Statistics Configuration","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json delete /datasets/{dataset_id}/statistics-configuration","href":"/api-reference/dataset-statistics/disable-statistics-configuration"}]},{"group":"Datasets","pages":[{"title":"Get datasets","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /datasets","href":"/api-reference/datasets/get-datasets"},{"title":"Create a dataset","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /datasets","href":"/api-reference/datasets/create-a-dataset"},{"title":"Get a dataset","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /datasets/{dataset_id}","href":"/api-reference/datasets/get-a-dataset"},{"title":"Update a dataset","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json put /datasets/{dataset_id}","href":"/api-reference/datasets/update-a-dataset"},{"title":"Delete a dataset","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json delete /datasets/{dataset_id}","href":"/api-reference/datasets/delete-a-dataset"},{"title":"Activate a dataset","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json put /datasets/{dataset_id}/activate","href":"/api-reference/datasets/activate-a-dataset"},{"title":"Activate a dataset","deprecated":true,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /datasets/{dataset_id}/activate","href":"/api-reference/datasets/activate-a-dataset-1"},{"title":"Truncate a dataset","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /datasets/{dataset_id}/truncate","href":"/api-reference/datasets/truncate-a-dataset"},{"title":"Get admin info for a dataset","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /datasets/{dataset_id}/admin","href":"/api-reference/datasets/get-admin-info-for-a-dataset"},{"title":"Update a dataset's partition spec","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /datasets/{dataset_id}/admin/partition-spec","href":"/api-reference/datasets/update-a-datasets-partition-spec"},{"title":"Create Dataset","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /v2/datasets","href":"/api-reference/datasets/create-dataset"},{"title":"Register Dataset","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /v2/datasets/register","href":"/api-reference/datasets/register-dataset"},{"title":"Archive Dataset","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json delete /v2/datasets/{dataset_id}","href":"/api-reference/datasets/archive-dataset"},{"title":"Refresh Materialized View","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /v2/datasets/{dataset_id}/refresh-materialized-view","href":"/api-reference/datasets/refresh-materialized-view"},{"title":"Truncate Dataset","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /v2/datasets/{dataset_id}/truncate","href":"/api-reference/datasets/truncate-dataset"},{"title":"Get dataset statistics","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /datasets/{dataset_id}/stats","href":"/api-reference/datasets/get-dataset-statistics"},{"title":"Get detailed statistics","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /datasets/{dataset_id}/column-stats","href":"/api-reference/datasets/get-detailed-statistics"},{"title":"Create or Update detailed statistics","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json put /datasets/{dataset_id}/column-stats","href":"/api-reference/datasets/create-or-update-detailed-statistics"},{"title":"Submit recalculation","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /datasets/{dataset_id}/column-stats/recalculate","href":"/api-reference/datasets/submit-recalculation"},{"title":"Ingest a file","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /datasets/{dataset_id}/upload","href":"/api-reference/datasets/ingest-a-file"},{"title":"Issue an ingestion token","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /datasets/{dataset_id}/upload/token","href":"/api-reference/datasets/issue-an-ingestion-token"},{"title":"List connector interfaces compatible with a dataset","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /datasets/{dataset_id}/interfaces","href":"/api-reference/datasets/list-connector-interfaces-compatible-with-a-dataset"}]},{"group":"Derivations","pages":[{"title":"Get derivation rules","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /derivations","href":"/api-reference/derivations/get-derivation-rules"},{"title":"Create a derivation rule","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /derivations","href":"/api-reference/derivations/create-a-derivation-rule"},{"title":"Get a derivation rule","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /derivations/{derivation_id}","href":"/api-reference/derivations/get-a-derivation-rule"},{"title":"Delete a derivation rule","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json delete /derivations/{derivation_id}","href":"/api-reference/derivations/delete-a-derivation-rule"},{"title":"Update a derivation rule","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json patch /derivations/{derivation_id}","href":"/api-reference/derivations/update-a-derivation-rule"}]},{"group":"Encryption Materials","pages":[{"title":"List encryption materials","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /encryption-materials","href":"/api-reference/encryption-materials/list-encryption-materials"},{"title":"Create an encryption material","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /encryption-materials","href":"/api-reference/encryption-materials/create-an-encryption-material"},{"title":"List decrypted encryption materials","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /encryption-materials/decrypted","href":"/api-reference/encryption-materials/list-decrypted-encryption-materials"},{"title":"Get an encryption material","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /encryption-materials/{encryption_material_id}","href":"/api-reference/encryption-materials/get-an-encryption-material"},{"title":"Update an encryption material","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json put /encryption-materials/{encryption_material_id}","href":"/api-reference/encryption-materials/update-an-encryption-material"},{"title":"Archive an encryption material","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json delete /encryption-materials/{encryption_material_id}","href":"/api-reference/encryption-materials/archive-an-encryption-material"}]},{"group":"Installations","pages":[{"title":"List Installations","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /installations","href":"/api-reference/installations/list-installations"},{"title":"Create Installation","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /installations","href":"/api-reference/installations/create-installation"},{"title":"Whoami Installation","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /installations/whoami","href":"/api-reference/installations/whoami-installation"},{"title":"Get Installation","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /installations/{id}","href":"/api-reference/installations/get-installation"},{"title":"Delete Installation","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json delete /installations/{id}","href":"/api-reference/installations/delete-installation"},{"title":"Create Installation Token","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /installations/{id}/token","href":"/api-reference/installations/create-installation-token"}]},{"group":"Jobs","pages":[{"title":"Get jobs","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /jobs","href":"/api-reference/jobs/get-jobs"},{"title":"Get a job","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /jobs/{job_id}","href":"/api-reference/jobs/get-a-job"},{"title":"Run a job","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /jobs/{job_id}/run","href":"/api-reference/jobs/run-a-job"},{"title":"Schedule a job","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /jobs/{job_id}/schedule","href":"/api-reference/jobs/schedule-a-job"},{"title":"Complete a job","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /jobs/{job_id}/complete","href":"/api-reference/jobs/complete-a-job"},{"title":"Fail a job","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /jobs/{job_id}/fail","href":"/api-reference/jobs/fail-a-job"},{"title":"Request cancellation of a job","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /jobs/{job_id}/request-cancellation","href":"/api-reference/jobs/request-cancellation-of-a-job"},{"title":"Cancel a job","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /jobs/{job_id}/cancel","href":"/api-reference/jobs/cancel-a-job"},{"title":"Reschedule a job","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /jobs/{job_id}/reschedule","href":"/api-reference/jobs/reschedule-a-job"}]},{"group":"Mappings","pages":[{"title":"Get mappings","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /mappings","href":"/api-reference/mappings/get-mappings"},{"title":"Get mapping","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /mappings/{mapping_id}","href":"/api-reference/mappings/get-mapping"},{"title":"Update a mapping","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json put /mappings/{mapping_id}","href":"/api-reference/mappings/update-a-mapping"},{"title":"Delete a mapping","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json delete /mappings/{mapping_id}","href":"/api-reference/mappings/delete-a-mapping"},{"title":"Get mappings for a company","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /mappings/companies/{company_id}","href":"/api-reference/mappings/get-mappings-for-a-company"},{"title":"Create a mapping","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /mappings/companies/{company_id}","href":"/api-reference/mappings/create-a-mapping"},{"title":"Get mapping preview","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /mappings/{mapping_id}/sample","href":"/api-reference/mappings/get-mapping-preview"},{"title":"Test Mapping","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /mappings/test","href":"/api-reference/mappings/test-mapping"}]},{"group":"MCP Connections","pages":[{"title":"List the calling user's external MCP connections","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /mcp-connections","href":"/api-reference/mcp-connections/list-the-calling-users-external-mcp-connections"},{"title":"Begin connecting an external MCP server","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /mcp-connections","href":"/api-reference/mcp-connections/begin-connecting-an-external-mcp-server"},{"title":"OAuth redirect target that receives the authorization code","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /mcp-connections/callback","href":"/api-reference/mcp-connections/oauth-redirect-target-that-receives-the-authorization-code"},{"title":"Finish connecting an external MCP server","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /mcp-connections/complete","href":"/api-reference/mcp-connections/finish-connecting-an-external-mcp-server"},{"title":"Get one of the calling user's MCP connections","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /mcp-connections/{id}","href":"/api-reference/mcp-connections/get-one-of-the-calling-users-mcp-connections"},{"title":"Delete one of the calling user's MCP connections","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json delete /mcp-connections/{id}","href":"/api-reference/mcp-connections/delete-one-of-the-calling-users-mcp-connections"}]},{"group":"Model Inference","pages":[{"title":"Run model inference","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /model-inference/run","href":"/api-reference/model-inference/run-model-inference"}]},{"group":"Model Training","pages":[{"title":"Fine-tune a model","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /model-training/run","href":"/api-reference/model-training/fine-tune-a-model"},{"title":"Train a classifier","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /v1/model-training/train-classifier","href":"/api-reference/model-training/train-a-classifier"}]},{"group":"Models","pages":[{"title":"Get models","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /models","href":"/api-reference/models/get-models"},{"title":"Get a model","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /models/{model_id}","href":"/api-reference/models/get-a-model"},{"title":"Update a model","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json put /models/{model_id}","href":"/api-reference/models/update-a-model"},{"title":"Archive a model","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json delete /models/{model_id}","href":"/api-reference/models/archive-a-model"}]},{"group":"NQL","pages":[{"title":"Validate an NQL statement","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /nql/validate","href":"/api-reference/nql/validate-an-nql-statement"},{"title":"Simulate an NQL query against access rules","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /v2/nql/simulate","href":"/api-reference/nql/simulate-an-nql-query-against-access-rules"},{"title":"Parse an NQL statement","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /nql/parse","href":"/api-reference/nql/parse-an-nql-statement"},{"title":"Check Name Availability","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /nql/name-availability","href":"/api-reference/nql/check-name-availability"},{"title":"Execute an NQL statement","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /v1/nql/execute","href":"/api-reference/nql/execute-an-nql-statement"},{"title":"Get a forecast job","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /nql/{job_id}","href":"/api-reference/nql/get-a-forecast-job"}]},{"group":"Permissions","pages":[{"title":"Create a permission","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /admin/permissions","href":"/api-reference/permissions/create-a-permission"}]},{"group":"Profiles","pages":[{"title":"Returns app profiles","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /installations/{installation_id}/profiles","href":"/api-reference/profiles/returns-app-profiles"},{"title":"Creates an app profile","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /installations/{installation_id}/profiles","href":"/api-reference/profiles/creates-an-app-profile"},{"title":"Returns profile with {profile_id}","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /installations/{installation_id}/profiles/{app_profile_id}","href":"/api-reference/profiles/returns-profile-with-"},{"title":"Updates an existing app profile","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json put /installations/{installation_id}/profiles/{app_profile_id}","href":"/api-reference/profiles/updates-an-existing-app-profile"},{"title":"Enables a profile","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /installations/{installation_id}/profiles/{app_profile_id}/enable","href":"/api-reference/profiles/enables-a-profile"},{"title":"Disables a profile","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /installations/{installation_id}/profiles/{app_profile_id}/disable","href":"/api-reference/profiles/disables-a-profile"},{"title":"Archives a profile","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /installations/{installation_id}/profiles/{app_profile_id}/archive","href":"/api-reference/profiles/archives-a-profile"}]},{"group":"Queries","pages":[{"title":"Get a query by id","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /v2/queries/{query_id}","href":"/api-reference/queries/get-a-query-by-id"},{"title":"Deletes a query","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json delete /v2/queries/{query_id}","href":"/api-reference/queries/deletes-a-query"},{"title":"Get accessible queries","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /v2/queries","href":"/api-reference/queries/get-accessible-queries"},{"title":"Create a query","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /v2/queries","href":"/api-reference/queries/create-a-query"}]},{"group":"Resources","pages":[{"title":"Get buckets","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /resources/buckets","href":"/api-reference/resources/get-buckets"},{"title":"Create bucket","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /resources/buckets","href":"/api-reference/resources/create-bucket"},{"title":"Update access type","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /resources/update-access","href":"/api-reference/resources/update-access-type"}]},{"group":"Schema Inference","pages":[{"title":"Infer the dataset schema of a file passed by multipart file.","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /v2/inference","href":"/api-reference/schema-inference/infer-the-dataset-schema-of-a-file-passed-by-multipart-file"}]},{"group":"Uploads","pages":[{"title":"Upload a file","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /uploads/{upload_path}","href":"/api-reference/uploads/upload-a-file"}]},{"group":"Usage","pages":[{"title":"Create a usage event","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /usage","href":"/api-reference/usage/create-a-usage-event"}]},{"group":"Webhooks","pages":[{"title":"List webhook subscriptions","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /webhooks","href":"/api-reference/webhooks/list-webhook-subscriptions"},{"title":"Create a webhook subscription","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /webhooks","href":"/api-reference/webhooks/create-a-webhook-subscription"},{"title":"Get a webhook subscription by ID","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /webhooks/{webhook_subscription_id}","href":"/api-reference/webhooks/get-a-webhook-subscription-by-id"},{"title":"Archive a webhook subscription","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json delete /webhooks/{webhook_subscription_id}","href":"/api-reference/webhooks/archive-a-webhook-subscription"},{"title":"Event delivery","version":null,"deprecated":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json webhook webhookDelivery","href":"/api-reference/webhooks/event-delivery"}]},{"group":"Whoami","pages":[{"title":"Get a current user","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /whoami","href":"/api-reference/whoami/get-a-current-user"}]},{"group":"Workflows","pages":[{"title":"List workflows","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /workflows","href":"/api-reference/workflows/list-workflows"},{"title":"Create a workflow","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /workflows","href":"/api-reference/workflows/create-a-workflow"},{"title":"Get a workflow","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /workflows/{workflow_id}","href":"/api-reference/workflows/get-a-workflow"},{"title":"Archive a workflow","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json delete /workflows/{workflow_id}","href":"/api-reference/workflows/archive-a-workflow"},{"title":"Trigger a workflow","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /workflows/{workflow_id}/trigger","href":"/api-reference/workflows/trigger-a-workflow"},{"title":"Schedule a workflow","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /workflows/{workflow_id}/schedule","href":"/api-reference/workflows/schedule-a-workflow"},{"title":"Remove a workflow schedule","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json delete /workflows/{workflow_id}/schedule","href":"/api-reference/workflows/remove-a-workflow-schedule"},{"title":"Cancel a workflow execution","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /workflows/{workflow_id}/cancel","href":"/api-reference/workflows/cancel-a-workflow-execution"},{"title":"List workflow runs","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /workflows/{workflow_id}/runs","href":"/api-reference/workflows/list-workflow-runs"},{"title":"Cancel a specific workflow run","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /workflows/{workflow_id}/runs/{run_id}/cancel","href":"/api-reference/workflows/cancel-a-specific-workflow-run"}]}]}]},"basePath":"","title":"Create an agent conversation - Narrative I/O Knowledge Base","deploymentId":"dpl_6UE2cqB47X6P7P3F2hD3UphW6ijc","buildId":"dpl_6UE2cqB47X6P7P3F2hD3UphW6ijc","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-BMn8tSe3.js","snippetPresets-Dl5ZrD9W.js","utils-CddEzDcs.js","style-to-object-BY3JEAdk.js","utils-Dym31Pnf.js","v4-DIgz8zy6.js","addTypeLabelsToSchema-ZiqR8hPK.js","conditional-requirements-CFM0id0Q.js","cloneDeep-D3fPbylz.js","_Uint8Array-BcNtDki0.js","isObject-FP1Yky1u.js","ApiExamples-4Sf3CFhl.js","usePlaygroundInputsStore-Ck91l6q0.js","shallow-DapBSR9G.js","isEqual-Clu_sGzx.js","CodeSnippets-DAVHdSX2.js","CodeSnippet-Be6AcO_D.js","use-playground-group-access-CteWws2O.js","Page-_aL_PM_2.js","api-description-markdown-BPoPkVJQ.js","DynamicMarkdown-QJ7LkRm3.js","SectionHeading-DyxPTJti.js","MethodPill-CGjK-dNY.js","getPastedJson-C4YIGTOJ.js","Check2Icon-B7COpIZE.js","axios-CsQoIw0U.js","Markdown-Bquzb4Gw.js","AssistantPageLink-wSgGy_i5.js","dist-Bg48sGSz.js","lib-DMeTj1gb.js","lib-B8HbPgcC.js","katex-Dbtb6Wk7.js","html-void-elements-mCSPHezU.js","marked.esm-CZWythHk.js"]}