Skip to content

AI agents ​

Agents are the configurable AI workers you point at your own knowledge and tools: the one answering in your chat widget, the one drafting replies in the inbox, the one running a procedure end to end.

Scope: ai:read · ai:write

Every call here spends credits

This group is rate-limited as the ai class and capped on concurrent requests. A run that exhausts your allowance returns 429 quota_exceeded — a different problem from rate_limit_exceeded, and one that backing off will not fix. See Errors.

Agents ​

GET/agentsList agents.Try it
POST/agentsCreate an agent.Try it
GET/agents/{id}One agent.Try it
PATCH/agents/{id}Update its configuration.Try it
DELETE/agents/{id}Delete the agent.Try it
POST/agents/{id}/resetReset it to defaults.Try it
POST/agents/{id}/testAsk a one-off question and see the answer with its sources.Try it
GET/agents/{id}/prompt-previewThe exact instructions the agent will run with.Try it
POST/agents/{id}/suggestGet suggested improvements to the configuration.Try it
GET/agents/model-optionsModels available to this organization.Try it

Knowledge ​

What the agent is allowed to know. Sources are ingested once and answered from with citations.

GET/agents/{id}/sourcesKnowledge sources.Try it
POST/agents/{id}/sourcesAdd a knowledge source.Try it
POST/agents/{id}/sources/urlAdd a website or page by URL.Try it
POST/agents/{id}/sources/dynamicAdd a source that stays in sync with platform data.Try it
POST/agents/{id}/sources/external/{provider}Connect an external document provider.Try it
POST/agents/{id}/sources/{sourceId}/syncRe-ingest now.Try it
PUT/agents/{id}/sources/{sourceId}/consumersChoose which agents may use this source.Try it
DELETE/agents/{id}/sources/{sourceId}Remove a source.Try it
GET/agents/{id}/documentsDocuments attached directly to the agent.Try it
POST/agents/{id}/documentsAttach a document.Try it
DELETE/agents/{id}/documents/{docId}Remove a document.Try it
POST/agents/{id}/knowledge/faqAdd a question/answer pair.Try it
POST/agents/{id}/reindexRebuild the agent's knowledge.Try it

Tools and capabilities ​

GET/capabilitiesEvery action an agent can be granted across the platform.Try it
GET/agents/{id}/toolsWhich of those this agent may use.Try it
PUT/agents/{id}/toolsSet them. Grant narrowly — a tool is an action on live data.Try it
GET/agents/custom-toolsYour own HTTP-backed tools.Try it
POST/agents/custom-toolsCreate one.Try it
PATCH/agents/custom-tools/{toolId}Update one.Try it
DELETE/agents/custom-tools/{toolId}Remove one.Try it
POST/agents/mcp/importImport tools from an MCP server.Try it

Grant narrowly. A tool an agent holds is an action it can take on your live data without a human in the loop — unless the capability is marked as requiring confirmation, in which case the run pauses and is resumed with POST /runs/{aiRunId}/confirm.

Procedures ​

Named, repeatable multi-step tasks the agent can execute.

GET/agents/{id}/proceduresNamed, repeatable multi-step tasks.Try it
POST/agents/{id}/proceduresCreate one.Try it
POST/agents/procedures/draftDraft a procedure from a description.Try it
PATCH/agents/procedures/{procId}Update one.Try it
DELETE/agents/procedures/{procId}Delete one.Try it

Versions and assignments ​

GET/agents/{id}/versionsVersion history.Try it
POST/agents/{id}/publishPublish the current configuration.Try it
POST/agents/{id}/versions/{versionId}/rollbackRoll back to a version.Try it
POST/agents/{id}/simulateReplay past conversations against a version before publishing.Try it
GET/agents/{id}/assignmentsWhere this agent is used (channels, surfaces).Try it
PUT/agents/{id}/assignmentsSet them.Try it
GET/agents/assignments/resolveWhich agent answers for a given surface.Try it

Runs, quality and improvement ​

GET/agents/{id}/runsRun history.Try it
GET/agents/{id}/runs/{aiRunId}One run's full trace.Try it
POST/runs/{aiRunId}/feedbackRecord a thumbs up/down on an answer.Try it
POST/runs/{aiRunId}/outcomeRecord what happened downstream.Try it
POST/runs/{aiRunId}/confirmResume a run paused on a capability that requires confirmation.Try it
GET/agents/{id}/feedbackCollected feedback.Try it
GET/agents/{id}/analyticsVolume, deflection and cost.Try it
GET/agents/{id}/analytics/unansweredQuestions the agent could not answer — your content backlog.Try it
GET/agents/{id}/analytics/actionsWhich tools it used.Try it
GET/agents/{id}/analytics/acceptanceHow often its suggestions are accepted.Try it
GET/agents/{id}/evalsThe test set.Try it
POST/agents/{id}/evalsAdd a case.Try it
DELETE/agents/{id}/evals/{evalId}Remove a case.Try it
POST/agents/{id}/evals/runRun the test set.Try it
POST/agents/{id}/evals/generateGenerate cases from real conversations.Try it
GET/agents/{id}/improveSuggested fixes derived from failures.Try it
POST/agents/{id}/improve/runGenerate suggestions now.Try it
POST/agents/{id}/improve/{sid}/approveAccept a suggestion.Try it
POST/agents/{id}/improve/{sid}/dismissReject a suggestion.Try it

Build the eval set before you tune the prompt

Changing instructions without a test set is guessing. evals/generate seeds one from conversations you already have.

Copilot ​

The in-app assistant has its own endpoints — sessions, invocations, saved memories and long-running tasks — under /agents/copilot/…. They are built for the app's own UI and their contract moves with it; treat them as unstable for third-party integrations and prefer /agents/{id}/test or MCP for programmatic access.

Public widget endpoints ​

/agents/widget/{tenantId}/{agentId}/… serves the embedded assistant to anonymous visitors: bootstrap, ask, ask-stream (server-sent events) and lead capture. They take no API key and are called by the widget script.