Fetch a specific agent version
const url = 'https://example.com/v1/agents/example/versions/example';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/v1/agents/example/versions/example \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”AgentId — dotted namespace (acme.drafting).
Semver of the agent version.
Responses
Section titled “Responses”Agent version.
object
AgentId — dotted namespace (e.g. acme.drafting).
Semver.
The agent’s project: every version of an agent is in the one project. Absent when the runtime doesn’t record it: a pack kindgi dev serves from disk, or a runtime before Kindgi 0.1.6.
object
Default value used when the caller omits this parameter.
Settings blocks the agent reads, by range: tools read them as ToolContext.settings['<id>'], templates as settings["<id>"]. Pinned at publish (pins.settings).
A settings block an agent reads, by id and semver range.
object
The settings block id.
A semver range (^1.0.0, 1.2.0).
A model-settings block by range: its temperature, maxOutputTokens and thinking go into the turn’s model calls. Pinned at publish.
object
The settings block id.
A semver range (^1.0.0, 1.2.0).
Capability declaration — see @kindgi/capabilities. Additional properties are permitted so new capability kinds do not require a wire change.
object
Typed tool reference. version is a semver range (npm-style: 1.2.3 exact pin, ^1.2.3 compatible-updates, ~1.2.3 patch-updates-only, >=1.0.0 <2.0.0 explicit range). Dispatch resolves the range to a concrete active version via semver.maxSatisfying at run start. No implicit “latest” — every tool ref names both id and range.
object
object
What it reads: facts (the default), or messages of this agent’s earlier conversations, quoted in the turn’s <memory> block as earlier conversation, never as turns.
The fact types it retrieves: required for facts; not used for conversations.
For conversations: whose messages it recalls. Default ['user'], the people’s own words. Adding agent recalls the agent’s earlier answers too, which can carry its mistakes: they are quoted as unverified earlier answers, and publishing warns recall-agent-answers.
What the intent selects within what the run may see. Facts: this conversation’s; the run’s end user’s only (same-user: none when the run names no participantId); the run’s project’s (none without a project); or every fact of the type it may see (tenant). Conversations: this end user’s other conversations with the agent (same-user: none when the run names no participantId); this conversation’s messages older than the history window (same-conversation); conversations in the run’s segment path (same-segment) or its project (same-project), whoever had them: those two quote other people’s conversations, so publishing warns and their messages are marked as another person’s. same-segment is for conversations only, tenant for facts only.
With the user’s message as the query: full-text, by meaning (fails the turn with semantic-unavailable on a runtime without embeddings), or both fused by rank (without embeddings, the keyword half). Absent: the newest facts.
How the agent uses what it retrieves.
object
Fact types that are instructions for this agent: a retrieved, verified fact of one of these types goes into the system message under ‘Policies (verified)’. Default: none.
Lets the agent remember: its turns offer the built-in tool kindgi_remember (built-in tools are kindgi_<verb>; an agent cannot list one in tools, and a published tool cannot use the prefix). The model picks the type, the text (up to 2,000 characters), an optional slot key and when it stops being true; the scope comes from here and the run. Every remembered fact is unverified, attributed to the agent version and the call that wrote it, and expires after keepDays unless a person verifies it. A person approves it before any read sees it when the scope is wider than one person (same-project, tenant) or the text reads like an instruction.
object
The fact types it may write.
Where its facts go: the conversation’s end user (else the user the run acts for), the conversation, the run’s project, or the workspace (tenant). Each but tenant includes the run’s project.
Days an unverified fact is kept. Default 30.
Lets the agent’s model change its run’s files, text only. update: true offers the built-in tool kindgi_update_file: a new version of a text file the run has, given the version the model read. create: true offers kindgi_create_file: a new text file of the run’s. Built-in tools are kindgi_<verb>; an agent can’t list one in tools. Each call changes something, so the agent’s approval rules apply, and the run needs write where the file is. A runtime with no file store offers neither. Absent: neither tool.
object
Offers kindgi_update_file. Absent means false.
Offers kindgi_create_file. Absent means false.
Soft hint — the router prefers this provider by id (e.g. anthropic) when at least one of its models satisfies capabilities.needs + workspace policy. Combine with preferredModel to pin the exact (provider, model) tuple. Falls back to capability-based ranking when the pinned provider is unregistered or filtered out.
Soft hint at the model level (ModelInfo.name, e.g. claude-sonnet-5-5). Combined with preferredProvider: both set → promote the exact tuple; only preferredModel → promote any provider exposing that model; only preferredProvider → promote every model of that provider.
object
When the agent’s turns and tool calls wait for a person’s approval: its tool gates, the reviewer role their approvals need, four eyes, how long an approval waits, and the session gate. The workspace’s approval rules can only make them stricter.
object
Once the conversation has this many completed turns, each new turn waits for an approval before it runs. Takes precedence over hitlAfterTurns.
The agent’s tool gates. A tool overrides doesn’t name takes default. Without default, a read-only tool (mutating: false) runs without asking and any other tool asks on first use. Without tools, the agent’s own rules gate no tool.
object
A tool’s gate. never_ask: its calls run without asking. ask_on_first_use: a call asks the first time the conversation makes it with those arguments, and once approved, the same call runs without asking. always_ask: every call asks.
By tool id: a mode, or a mode and the reviewer role its approvals need.
object
A tool’s gate. never_ask: its calls run without asking. ask_on_first_use: a call asks the first time the conversation makes it with those arguments, and once approved, the same call runs without asking. always_ask: every call asks.
A tool’s gate, and the reviewer role its approvals need. Without requiredRole, the agent’s defaultReviewerRole.
object
A tool’s gate. never_ask: its calls run without asking. ask_on_first_use: a call asks the first time the conversation makes it with those arguments, and once approved, the same call runs without asking. always_ask: every call asks.
Reviewer role class. Hierarchy: standard < senior < admin.
Reviewer role class. Hierarchy: standard < senior < admin.
How long an approval waits for a decision, in milliseconds. Default 24 hours. The workspace’s approval rules may cap it.
What an approval does when its time runs out: it goes to the next reviewer role, and at admin it expires and the turn fails. The only behavior, and the default.
object
object
JSON Schema (draft 2020-12) the final answer must match.
object
A name for the output, shown to the model and in errors. Default output.
How many times the model is asked to repair an invalid answer. Default 1.
object
Failed calls sent back to the model per turn. Default 1.
Which failures are sent back: arguments that don’t fit the input schema (invalid-arguments), a tool the agent doesn’t have (unknown-tool), a tool that ran and failed (tool-error), a tool that failed the call on purpose (tool-failed). Default invalid-arguments, unknown-tool.
Whether calls to read-only tools (mutating: false, no changing effect) that a model step asks for one after another run at the same time, up to 8 at once. A call to a read-only tool that pauses or declares connections runs on its own, since it may wait. Default true. false: every call runs on its own, in the order the model asked for them. Either way, the step’s results reach the conversation and the model in that order, and once a call needs a review, the step’s calls that haven’t started run one at a time. It doesn’t change what the model may ask for.
Whether an agent or a flow is a tool in a person’s chat app, through the API’s MCP server (/mcp). An agent’s tool is named by its id, a flow’s by flow. and its id. The chat app lists it only to people who can see it. Absent, or expose: false: it isn’t one.
object
Offer it as a tool to the people who can see it.
Tells the chat app that a run changes nothing (the tool’s readOnlyHint). Absent: no hint, so the chat app applies the protocol’s default.
Tells the chat app that a run may change or remove things in a way that can’t be undone (the tool’s destructiveHint). Absent: no hint, so the chat app applies the protocol’s default.
The exact block versions an agent version runs: its lockfile. Set by the runtime when the version is published, never in the publish body: each tool range resolves once to the version every run of that agent version uses, so a new tool version reaches the agent only through a new agent version. Absent on a version published before pins existed (its ranges resolve per run).
object
Tool id → exact version.
object
Prompt block id → exact version.
object
Settings block id → exact version.
object
Set by the runtime on an agent or flow version a deploy registered in place of the definition’s version, which was registered already with other pins or content (versions never change). Never in the publish body.
object
The version the definition names.
pins-changed: a block it uses has a new version; unpinned: the definition’s version was published before pins existed; version-taken: the definition’s version holds another definition; edited: derived from version with some data-block pins swapped: a suggested change’s version (suggestedChangeId), or an earlier hand edit’s (label, by).
For edited: a short label for the version.
For edited: who derived it (user:<id>).
For edited: the suggested change it was derived for. Such a version serves no scope until a pin makes it serve.
Present only on an unregistered version (GET …/versions/{version} reads those too). Unregister stops a version being chosen, not the pins that hold it: a new run naming it is refused, while a resumed run and a published version that pins it still run it.
Set by the runtime with pins: sha256:<hex> of the pins’ canonical JSON (sorted keys, no whitespace). Two agent versions with the same digest run the same blocks.
GET /v1/agents/{agentId} only: the agent’s owner, absent until one is set (PUT /v1/agents/{agentId}/owner).
object
The person’s display name, when the runtime’s directory has one.
Example
{ "parameters": [ { "type": "string" } ], "retrieval": [ { "source": "facts", "roles": [ "user" ], "scope": "same-conversation", "mode": "keyword" } ], "memory": { "remember": { "scope": "same-user" } }, "conversationPolicy": { "hitl": { "tools": { "default": "never_ask", "overrides": { "additionalProperty": "never_ask" } }, "defaultReviewerRole": "standard", "onTimeout": "escalate" } }, "toolErrors": { "retryOn": [ "invalid-arguments" ] }, "derivedFrom": { "reason": "pins-changed" }}Missing / malformed / expired / revoked bearer token.
object
object
Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).
Optional, kind-specific.
object
Server-assigned request id; also echoed via X-Request-Id header.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}No agent at that (id, version) under this workspace.
object
object
Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).
Optional, kind-specific.
object
Server-assigned request id; also echoed via X-Request-Id header.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}rate-limit-exceeded with details.limit: "api-requests", on a runtime that sets workspace limits (Kindgi Cloud): this workspace’s limit on API requests a minute is reached, so the request wasn’t run; Retry-After says when to send it again.
object
object
Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).
Optional, kind-specific.
object
Server-assigned request id; also echoed via X-Request-Id header.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}Headers
Section titled “Headers”Whole seconds to wait before sending the request again, at least 1. Sent with the codes the answer names as sending it, so it may be absent.
The database was too busy to answer in time (database-busy), or the authorization store couldn’t be reached (authz-backend-unavailable); Retry-After (whole seconds) says when to try again.
object
object
Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).
Optional, kind-specific.
object
Server-assigned request id; also echoed via X-Request-Id header.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}Headers
Section titled “Headers”Whole seconds to wait before sending the request again, at least 1. Sent with the codes the answer names as sending it, so it may be absent.
See also
GET /v1/agents/{agentId}: Fetch the highest version of an agentGET /v1/agents/{agentId}/projects: List the projects an agent runs in, and what runs in eachGET /v1/agents/{agentId}/versions: List versions of an agentPUT /v1/agents/{agentId}/owner: Set an agent's owner- Error code
authz-backend-unavailable - Error code
database-busy - Error code
rate-limit-exceeded - Every error code