POST
/v1/organizations/{organizationId}/projects/{projectId}/agent-definitions/{agentDefinitionId}/versionsPublish or reuse an immutable Agent Version
Publish a content-addressed Agent Version, or return the existing Version when the normalized manifest is identical.
Authentication
Send an API key as a Bearer token in the Authorization header.
Parameters
Request body
Required.
application/jsonobject- unknown properties allowed
false
manifestrequired- AgentVersionManifestThe complete immutable Agent behavior and execution-budget declaration.
sourcerequired- AgentVersionSourceThe source revision and automation run that published this Version.
Publish the first immutable Agent Version
{
"manifest": {
"schemaVersion": "config.cantora.ai/agent-version/v1alpha2",
"instructions": "Answer support questions using the approved knowledge sources and cite the evidence used.",
"model": {
"provider": "googleVertex",
"model": "gemini-3.6-flash",
"settings": {
"thinkingLevel": "low"
}
},
"tools": [],
"requiredBindings": [],
"budgets": {
"maxModelSteps": 12,
"maxToolCalls": 0,
"totalWallTimeMs": 240000,
"modelStepTimeMs": 90000,
"streamStallTimeMs": 15000,
"maxInputTokens": 100000,
"maxOutputTokens": 16000,
"maxReasoningTokens": 32000,
"maxTotalTokens": 140000,
"maxToolResultBytes": 1000000,
"maxEstimatedCostMicros": 5000000
}
},
"source": {
"repository": "example.invalid/acme/support-agent",
"commit": "0000000000000000000000000000000000000000",
"path": "cantora/support-agent.json",
"workflow": "publish-support-agent",
"run": "example-1"
}
}Responses
200PublishedAgentVersionapplication/jsonAgent Version published
{
"outcome": "created",
"version": {
"agentVersionId": "agent_version_00000000000000000000000000000001",
"organizationId": "org_00000000000000000000000000000002",
"projectId": "proj_00000000000000000000000000000001",
"agentDefinitionId": "agentdef_00000000000000000000000000000001",
"revision": 1,
"manifest": {
"schemaVersion": "config.cantora.ai/agent-version/v1alpha2",
"instructions": "Answer support questions using the approved knowledge sources and cite the evidence used.",
"model": {
"provider": "googleVertex",
"model": "gemini-3.6-flash",
"settings": {
"thinkingLevel": "low"
}
},
"tools": [],
"requiredBindings": [],
"budgets": {
"maxModelSteps": 12,
"maxToolCalls": 0,
"totalWallTimeMs": 240000,
"modelStepTimeMs": 90000,
"streamStallTimeMs": 15000,
"maxInputTokens": 100000,
"maxOutputTokens": 16000,
"maxReasoningTokens": 32000,
"maxTotalTokens": 140000,
"maxToolResultBytes": 1000000,
"maxEstimatedCostMicros": 5000000
}
},
"manifestDigest": "d1211243559d67e3078ef4de78bbbedf0f64dfd6a7d8b39688459a961e67d687",
"createdByPrincipalId": "principal_00000000000000000000000000000002",
"source": {
"repository": "example.invalid/acme/support-agent",
"commit": "0000000000000000000000000000000000000000",
"path": "cantora/support-agent.json",
"workflow": "publish-support-agent",
"run": "example-1"
},
"createdAt": "2026-01-15T18:30:00.000Z"
}
}400The request path, headers, query, or JSON body did not satisfy the published schema401Unauthorizedapplication/json403Forbiddenapplication/json404NotFoundapplication/json409Conflictapplication/jsonReusable schemas
PublishedAgentVersionJsonEncoding
object- unknown properties allowed
false
outcomerequiredstringWhether publication created a new Agent Version or reused identical content.- allowed values
"created", "reused"
- allowed values
versionrequired- AgentVersionJsonEncodingThe immutable Agent Version returned by the publication.
UnauthorizedJsonEncoding
object- unknown properties allowed
false
_tagrequiredstringThe stable machine-readable error type.- allowed values
"Unauthorized"
- allowed values
reasonrequiredstringA safe explanation of why the credential was rejected.
ForbiddenJsonEncoding
object- unknown properties allowed
false
_tagrequiredstringThe stable machine-readable error type.- allowed values
"Forbidden"
- allowed values
permissionrequiredstringThe permission required by the refused operation.
NotFoundJsonEncoding
object- unknown properties allowed
false
_tagrequiredstringThe stable machine-readable error type.- allowed values
"NotFound"
- allowed values
resourcerequiredstringThe resource type relevant to the error.idrequiredstringThe identifier supplied for the resource that was not found.
ConflictJsonEncoding
object- unknown properties allowed
false
_tagrequiredstringThe stable machine-readable error type.- allowed values
"Conflict"
- allowed values
resourcerequiredstringThe resource type relevant to the error.reasonrequiredstringA safe explanation of the state conflict.
AgentVersionManifest
object- unknown properties allowed
false
schemaVersionrequiredstringThe Agent Version manifest schema identifier.- allowed values
"config.cantora.ai/agent-version/v1alpha2"
- allowed values
instructionsrequiredstringThe complete natural-language instructions for the Agent Version.All of- maximum length
262144
- maximum length
modelrequired- AgentVersionModelThe exact provider model and behavior settings pinned by the Agent Version.
toolsrequired- AgentVersionDependenciesThe tool keys the Agent Version may call.
requiredBindingsrequired- AgentVersionDependenciesThe configuration bindings the Agent Version requires at runtime.
budgetsrequired- AgentVersionBudgetsThe finite execution limits enforced for the Agent Version.
AgentVersionSource
object- unknown properties allowed
false
repositoryrequiredstringThe source repository identifier.All of- minimum length
1
- maximum length
500
- minimum length
commitrequiredstringThe immutable source revision.All of- minimum length
1
- maximum length
500
- minimum length
pathrequiredstringThe path within the source repository.All of- minimum length
1
- maximum length
500
- minimum length
workflowrequiredstringThe source automation workflow identifier.All of- minimum length
1
- maximum length
500
- minimum length
runrequiredstringThe source automation run identifier.All of- minimum length
1
- maximum length
500
- minimum length
AgentVersionJsonEncoding
object- unknown properties allowed
false
agentVersionIdrequiredstringThe immutable Agent Version identifier.All of- maximum length
64
A Cantora Agent Version identifier, prefixed with `agent_version_`.- pattern
^agent_version_[\s\S]+$
- maximum length
organizationIdrequiredstringThe Organization identifier.All of- maximum length
64
A Cantora Organization identifier, prefixed with `org_`.- pattern
^org_[\s\S]+$
- maximum length
projectIdrequiredstringThe Project identifier.All of- maximum length
64
A Cantora Project identifier, prefixed with `proj_`.- pattern
^proj_[\s\S]+$
- maximum length
agentDefinitionIdrequiredstringThe Agent Definition identifier.All of- maximum length
64
A Cantora Agent Definition identifier, prefixed with `agentdef_`.- pattern
^agentdef_[\s\S]+$
- maximum length
revisionrequiredintegerThe monotonically increasing revision within the Agent Definition.All of- greater than
0
- greater than
manifestrequired- AgentVersionManifestThe complete immutable Agent behavior and execution-budget declaration.
manifestDigestrequiredstringThe lowercase SHA-256 digest of the normalized manifest.- maximum length
64 - minimum length
64 - pattern
^[0-9a-f]{64}$
- maximum length
createdByPrincipalIdrequiredstringThe Principal that created this immutable record.All of- maximum length
64
A Cantora Principal identifier, prefixed with `principal_`.- pattern
^principal_[\s\S]+$
- maximum length
sourcerequired- AgentVersionSourceThe source revision and automation provenance.
createdAtrequiredstringWhen the resource was created, in UTC.- format
date-time
- format
AgentVersionModel
Any of
object- unknown properties allowed
false
providerrequiredstringThe model or Surface provider key.- allowed values
"googleVertex"
- allowed values
modelrequiredstringThe exact provider model and behavior settings pinned by the Agent Version.All of- minimum length
1
- maximum length
256
- minimum length
settingsrequired- GoogleVertexModelSettingsThe provider-native settings that change model behavior.
object- unknown properties allowed
false
providerrequiredstringThe model or Surface provider key.- allowed values
"openai"
- allowed values
modelrequiredstringThe exact provider model and behavior settings pinned by the Agent Version.All of- minimum length
1
- maximum length
256
- minimum length
settingsrequired- OpenAiModelSettingsThe provider-native settings that change model behavior.
AgentVersionDependencies
arrayItems
stringAll of
- minimum length
1
- maximum length
100
- pattern
^[a-z][a-z0-9_]*$
All of
- at most items
100
- unique items
true
AgentVersionBudgets
object- unknown properties allowed
false
maxModelStepsrequiredintegerThe maximum number of model calls in one Run.All of- maximum
100 - minimum
1
- maximum
maxToolCallsrequiredintegerThe maximum number of tool calls in one Run.All of- maximum
100 - minimum
0
- maximum
totalWallTimeMsrequiredintegerThe maximum total Run duration in milliseconds.All of- maximum
300000 - minimum
1000
- maximum
modelStepTimeMsrequiredintegerThe maximum duration of one model step in milliseconds.All of- maximum
300000 - minimum
1000
- maximum
streamStallTimeMsrequiredintegerThe maximum duration without stream progress in milliseconds.All of- maximum
300000 - minimum
1000
- maximum
maxInputTokensrequiredintegerThe maximum number of model input tokens.All of- maximum
10000000 - minimum
1
- maximum
maxOutputTokensrequiredintegerThe maximum number of model output tokens.All of- maximum
1000000 - minimum
1
- maximum
maxReasoningTokensrequiredintegerThe maximum number of model reasoning tokens.All of- maximum
1000000 - minimum
0
- maximum
maxTotalTokensrequiredintegerThe maximum total model tokens in one Run.All of- maximum
10000000 - minimum
1
- maximum
maxToolResultBytesrequiredintegerThe maximum aggregate tool-result size in bytes.All of- maximum
10000000 - minimum
1
- maximum
maxEstimatedCostMicrosrequiredintegerThe maximum estimated model cost in millionths of the billing currency.All of- maximum
1000000000 - minimum
1
- maximum
GoogleVertexModelSettings
object- unknown properties allowed
false
thinkingLevelrequiredstringThe Google Vertex-native thinking level.- allowed values
"minimal", "low", "medium", "high"
- allowed values
OpenAiModelSettings
object- unknown properties allowed
false
reasoningEffortrequiredstringThe OpenAI-native reasoning effort.- allowed values
"none", "low", "medium", "high", "xhigh", "max"
- allowed values
reasoningModerequiredstringThe OpenAI-native reasoning mode.- allowed values
"standard", "pro"
- allowed values