Skip to content
Documentation menu

Templates, domain packs and authoring

Read agent templates, author and publish domain packs, submit contribution proposals, and call the Builder and CoA Assistant endpoints.

Templates and domain packs are starting points for agents. A template is a ready-made agent configuration. A domain pack is a blueprint for one business domain that also carries probes: statements about what an agent built from it must be allowed to do and must be refused. Contribution proposals record a suggested change to an agent for review, and the Builder and CoA Assistant endpoints give model-backed help while you author.

Read operations accept an API key with the read scope. Every write operation on this page needs the admin scope; none of them is open to run keys. See authentication for how keys and scopes work. Some steps are reserved for people signed in to the web workspace and refuse API keys: creating an agent from a template or a domain pack, changing a template's version or revoking it, and approving, rejecting or applying a contribution proposal.

The Builder endpoints and the assistant's run endpoint call a paid language model, and their model calls stay closed until a workspace admin has recorded a reviewed model profile for them. Settings has no screen for recording a profile today and an API key cannot record one, so expect the model call to be refused with system_model_profile_unavailable (status 403; the benchmark reports it inside each result) unless your workspace admin confirms that a profile is in place. Send the header X-CoA-Model-Request: <milliseconds>.<uuid> with each of these requests: the current Unix time in milliseconds (13 digits), a dot, and a UUID you generate for that request. It identifies the request for usage accounting, and a request without it can be refused with 503 and the code model_usage_request_identity_required before any model call (the benchmark answers 200 and reports the code inside each result). Use a new value for each new request.

Agent templates

Templates are ready-made agent configurations. Every workspace sees the shared templates. A template can also belong to a single workspace (isGlobal is false), but no endpoint creates one today. These endpoints are read-only. Creating an agent from a template is done in the web workspace by a signed-in person; the resulting agent records where it came from in sourceTemplateId and sourceTemplateVersion.

GET /api/templates

List agent templates

Returns the shared templates followed by the workspace's own templates, each sorted by name. Revoked templates are included with revoked set to true; a revoked template can no longer be used to create agents. The list is not paginated.

Access: API key with the read scope, or a signed-in workspace member.

Returns: { templates: Template[] }. Each template has id, isGlobal (true for a shared template), name, description, category, the configuration an agent starts from (authority, runtimeMode, dataClasses, skills, knowledgeLayers, localPermissions, connectors, model), and version, ownerUserId, revoked, revokedAt, createdAt and updatedAt. createdAt is an ISO 8601 timestamp; updatedAt is a date string that is not guaranteed to be ISO 8601.

Request
curl https://centerofagentic.com/api/templates \
  -H "Authorization: Bearer $COA_API_KEY"
Response
{
  "templates": [
    {
      "id": "3f1c2a9e-0b7d-4e55-9a51-6f2f1c0e8d11",
      "isGlobal": true,
      "name": "Contract Clause Finder",
      "description": "Find and summarize clauses across local contract files.",
      "category": "Compliance",
      "authority": "answer",
      "runtimeMode": "hybrid",
      "dataClasses": ["public", "internal"],
      "skills": ["Compliance claim check", "Source freshness check"],
      "knowledgeLayers": {},
      "localPermissions": {},
      "connectors": [],
      "model": null,
      "version": "1.0.0",
      "ownerUserId": null,
      "revoked": false,
      "revokedAt": null,
      "createdAt": "2026-10-02T09:14:07.000Z",
      "updatedAt": "Fri Oct 02 2026 09:14:07 GMT+0000 (Coordinated Universal Time)"
    }
  ]
}

GET /api/templates/{id}

Get a template

Returns one shared template or one of the workspace's own templates.

Access: API key with the read scope, or a signed-in workspace member.

Path parameters
NameTypeDescription
id requireduuidThe template id.

Returns: The template object, with the same fields as an entry in the template list.

Errors
StatusCodeWhen
404not_foundNo shared template and no template of your workspace has this id.
Request
curl https://centerofagentic.com/api/templates/3f1c2a9e-0b7d-4e55-9a51-6f2f1c0e8d11 \
  -H "Authorization: Bearer $COA_API_KEY"

GET /api/templates/{id}/versions

List a template's version history

Returns the recorded version changes and revocations of a template, newest first. History is recorded only when a workspace's own template is changed, so a shared template normally returns an empty list. An id that matches no template also returns an empty list rather than an error.

Access: API key with the read scope, or a signed-in workspace member.

Path parameters
NameTypeDescription
id requireduuidThe template id.

Returns: { versions: TemplateVersion[] }. Each entry has id, templateId, version, event (bump for a version change or revoked; created is defined but not recorded by any operation today), note, createdBy and createdAt (ISO 8601).

Domain packs

A domain pack bundles a recommended agent configuration for one business domain with probes that state what such an agent may and may not do. Every time a pack is saved, the platform runs a set of quality checks on it, including evaluating each probe with the policy engine, and returns the result as goldenStandard. Publishing a pack requires every check to pass. Creating an agent from a published pack is done in the web workspace by a signed-in person; the agent records the pack in sourcePackId.

GET /api/domain-packs

List domain packs

Returns the built-in packs followed by the packs authored in your workspace, in every status, each sorted by name. The list is not paginated.

Access: API key with the read scope, or a signed-in workspace member.

Returns: { domainPacks: DomainPack[] }. Each pack has id, isGlobal, slug, name, domain, purpose, summary, defaultAuthority, recommendedDataClasses, recommendedRuntimeMode, recommendedSkills, knowledgeLayers, kpis, probes, version, source (builtin or tenant_authored), compatibleAgentTypes, prohibitedUse, coherent (whether every quality check passed at the last save), coherenceCheckedAt, status (draft, published or archived), createdAt and updatedAt. updatedAt is a date string that is not guaranteed to be ISO 8601.

Request
curl https://centerofagentic.com/api/domain-packs \
  -H "Authorization: Bearer $COA_API_KEY"

GET /api/domain-packs/{id}

Get a domain pack

Returns one built-in pack or one pack authored in your workspace, including its probes.

Access: API key with the read scope, or a signed-in workspace member.

Path parameters
NameTypeDescription
id requireduuidThe pack id (not its slug).

Returns: The pack object, with the same fields as an entry in the pack list.

Errors
StatusCodeWhen
404not_foundNo built-in pack and no pack of your workspace has this id.

POST /api/domain-packs

Create a draft domain pack

Creates a pack owned by your workspace with status draft and version 0.1.0, runs the quality checks on it and stores the result. A draft is saved even when checks fail, so read goldenStandard in the response to see what still needs work. To pass the coverage check the probes must include the in_scope, manifest_ceiling and data_residency dimensions, with at least one must_allow and one must_deny probe. Field values are stored as sent and are not checked against the allowed values listed below, so a typo is not rejected with a 400.

Access: API key with the admin scope, or a signed-in workspace member.

Request body
NameTypeDescription
namestringDisplay name of the pack. When slug is omitted, the slug is derived from it. The name is not enforced: without it the pack is stored with an empty name.
slugstringIdentifier that must be unique among your workspace's packs. It is normalized to lower-case letters, digits and hyphens and cut to 80 characters. Defaults to a slug of name, or to pack when that would be empty. A slug your workspace already uses is not reported with a specific error code; the request fails with a 500 server_error.
domainstringThe business domain the pack is for.
purposestringWhat an agent built from the pack is for. It becomes that agent's purpose.
summarystringA longer description of the pack's scope and limits.
defaultAuthority"answer" | "draft" | "recommend" | "prepare_action" | "execute_with_approval" | "execute_automatically"Authority level for agents built from the pack. Defaults to recommend.
recommendedDataClassesstring[]Data classes the agent may handle: any of public, internal, confidential, restricted and secrets. Defaults to an empty list.
recommendedRuntimeMode"cloud_only" | "local_preferred" | "local_only" | "hybrid"Where agents built from the pack should run. Defaults to hybrid.
recommendedSkillsstring[]Skill names. For the resolvability check to pass, each must match a skill in the workspace's skill catalog by name, ignoring case.
knowledgeLayersobjectBoolean map of the knowledge layers to turn on, keyed by domain, tenant, role, user and task.
kpisstring[]The measures agents built from the pack are meant to improve.
probesobject[]The pack's claims. Each probe has id, title, kind (must_allow or must_deny), dimension (in_scope, default_deny, manifest_ceiling, data_residency, connector_scope, approval_required, obligations or delegation_containment), action (an action class such as summarize, recommend or update_record), placement (such as local or cloud_model), rationale, and optionally dataClass and connector.
compatibleAgentTypesstring[]Agent types the pack is a good starting point for. An empty list means no restriction.
prohibitedUsestringA use the pack must not be put to, shown to authors and reviewers.

Returns: 201 with the created pack plus goldenStandard: { passed, checks }. checks holds coherence (incoherentCount is the number of probes the policy engine did not confirm), coverage (missingDimensions; for a pack whose authority is prepare_action or higher it can also list approval_required as advice without failing the check), resolvability (unresolvedSkills), provenance (missingFields) and roundTrip (droppedFields), each with its own passed flag.

Request
curl -X POST https://centerofagentic.com/api/domain-packs \
  -H "Authorization: Bearer $COA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Invoice review",
    "domain": "Finance operations",
    "purpose": "Review supplier invoices against purchase orders and flag mismatches.",
    "summary": "Reads invoices and recommends follow-ups; never updates records.",
    "defaultAuthority": "recommend",
    "recommendedDataClasses": ["public", "internal"],
    "recommendedRuntimeMode": "hybrid",
    "knowledgeLayers": { "domain": true, "tenant": true, "role": false, "user": false, "task": false },
    "kpis": ["Invoices reviewed per week"],
    "probes": [
      {
        "id": "allow-summarize",
        "title": "Summarize an internal invoice",
        "kind": "must_allow",
        "dimension": "in_scope",
        "action": "summarize",
        "dataClass": "internal",
        "placement": "local",
        "rationale": "Summarizing internal data is within the recommend authority."
      }
    ]
  }'
Response
{
  "id": "3f1c2a9e-0b7d-4e55-9a51-6f2f1c0e8d11",
  "isGlobal": false,
  "slug": "invoice-review",
  "name": "Invoice review",
  "domain": "Finance operations",
  "purpose": "Review supplier invoices against purchase orders and flag mismatches.",
  "summary": "Reads invoices and recommends follow-ups; never updates records.",
  "defaultAuthority": "recommend",
  "recommendedDataClasses": ["public", "internal"],
  "recommendedRuntimeMode": "hybrid",
  "recommendedSkills": [],
  "knowledgeLayers": { "domain": true, "tenant": true, "role": false, "user": false, "task": false },
  "kpis": ["Invoices reviewed per week"],
  "probes": [
    {
      "id": "allow-summarize",
      "title": "Summarize an internal invoice",
      "kind": "must_allow",
      "dimension": "in_scope",
      "action": "summarize",
      "dataClass": "internal",
      "placement": "local",
      "rationale": "Summarizing internal data is within the recommend authority."
    }
  ],
  "version": "0.1.0",
  "source": "tenant_authored",
  "compatibleAgentTypes": [],
  "prohibitedUse": null,
  "coherent": false,
  "coherenceCheckedAt": "2026-11-27T10:42:18.512Z",
  "status": "draft",
  "createdAt": "2026-11-27T10:42:18.512Z",
  "updatedAt": "Fri Nov 27 2026 10:42:18 GMT+0000 (Coordinated Universal Time)",
  "goldenStandard": {
    "passed": false,
    "checks": {
      "coherence": { "passed": true, "incoherentCount": 0 },
      "coverage": { "passed": false, "missingDimensions": ["manifest_ceiling", "data_residency"] },
      "resolvability": { "passed": true, "unresolvedSkills": [] },
      "provenance": { "passed": true, "missingFields": [] },
      "roundTrip": { "passed": true, "droppedFields": [] }
    }
  }
}

PATCH /api/domain-packs/{id}

Update, publish or archive a domain pack

Changes the fields you send on a pack authored in your workspace, re-runs the quality checks and stores the new result. Send status to move the pack between draft, published and archived. A request that sets status to published is applied only when every check passes; otherwise it returns 422 and none of the field changes in that request are saved, although the pack's stored coherent flag is updated to the failed result.

Access: API key with the admin scope, or a signed-in workspace member. Only packs authored in your workspace can be changed. Built-in packs are read-only.

Path parameters
NameTypeDescription
id requireduuidThe pack id (not its slug).
Request body
NameTypeDescription
status"draft" | "published" | "archived"The status to move the pack to. Omit it to keep the current status. Send exactly one of these values: any other string is stored as the status without an error.
namestringNew display name.
slugstringNew slug. It is trimmed but, unlike on create, not otherwise normalized. It must stay unique among your workspace's packs.
domainstringNew business domain.
purposestringNew purpose.
summarystringNew summary.
defaultAuthority"answer" | "draft" | "recommend" | "prepare_action" | "execute_with_approval" | "execute_automatically"New authority level for agents built from the pack.
recommendedDataClassesstring[]Replaces the list of data classes.
recommendedRuntimeMode"cloud_only" | "local_preferred" | "local_only" | "hybrid"New runtime mode.
recommendedSkillsstring[]Replaces the list of skill names.
knowledgeLayersobjectReplaces the knowledge layer map.
kpisstring[]Replaces the list of measures.
probesobject[]Replaces the whole list of probes. Probes have the same fields as on create.
compatibleAgentTypesstring[]Replaces the list of agent types.
prohibitedUsestring | nullNew prohibited-use text, or null to clear it.

Returns: The updated pack plus goldenStandard, in the same shape as the create response.

Errors
StatusCodeWhen
403builtin_immutableThe pack is a built-in pack.
404not_foundNo pack with this id is visible to your workspace.
422golden_standard_failedThe request sets status to published but a quality check fails. detail holds the check result in the goldenStandard shape.
Request
curl -X PATCH https://centerofagentic.com/api/domain-packs/3f1c2a9e-0b7d-4e55-9a51-6f2f1c0e8d11 \
  -H "Authorization: Bearer $COA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "status": "published" }'

Contribution proposals

A contribution proposal records a suggested change to an agent so that a person can review it. Submitting a proposal changes nothing on the agent. Approving, rejecting and applying proposals is done in the web workspace by a signed-in person, and whoever submitted a proposal cannot approve it. For a proposal submitted with an API key, that is the person who created the key.

GET /api/contributions

List contribution proposals

Returns every proposal in the workspace, newest first. The list is not paginated.

Access: API key with the read scope, or a signed-in workspace member.

Returns: { contributions: Proposal[] }. Each proposal has id, agentId, kind, title, summary, before, after, submittedBy, status (proposed, approved, rejected or applied), reviewedBy, reviewNote, createdAt, decidedAt, appliedVersion (the agent version created when the proposal was applied) and appliedAt. createdAt and appliedAt are date strings that are not guaranteed to be ISO 8601.

Request
curl https://centerofagentic.com/api/contributions \
  -H "Authorization: Bearer $COA_API_KEY"

POST /api/contributions

Submit a contribution proposal

Records a proposed change with status proposed and writes an audit log entry. Nothing is applied to the agent until a person approves and applies the proposal in the web workspace.

Access: API key with the admin scope, or a signed-in workspace member.

Request body
NameTypeDescription
kind required"knowledge" | "manifest" | "skill" | "prompt"What the proposal changes once applied: prompt replaces the agent's purpose with after, manifest replaces its outcome, skill adds after as a skill name, and knowledge turns on the knowledge layer named by after.
title requiredstringShort title for reviewers. Must not be empty.
after requiredstringThe proposed new value. Must not be empty.
beforestringThe current value, as context for the reviewer. Stored as null when omitted.
summarystringWhy the change is proposed. Defaults to an empty string.
agentIduuidThe agent the proposal targets. It must belong to your workspace. A proposal without an agent can be reviewed but cannot be applied.

Returns: 201 with the proposal. submittedBy identifies the caller; for an API key it is api-key: followed by the key id.

Errors
StatusCodeWhen
400invalid_requestkind is not one of the allowed values, or title or after is missing or empty. detail names the field.
404not_foundagentId does not name an agent in your workspace.
Request
curl -X POST https://centerofagentic.com/api/contributions \
  -H "Authorization: Bearer $COA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "agentId": "8a4e6c1d-2f3b-4c7a-9d10-5b6e7f8a9c02",
    "kind": "skill",
    "title": "Add invoice matching",
    "summary": "Reviewers asked for purchase order matching.",
    "after": "Invoice matching"
  }'
Response
{
  "id": "3f1c2a9e-0b7d-4e55-9a51-6f2f1c0e8d11",
  "agentId": "8a4e6c1d-2f3b-4c7a-9d10-5b6e7f8a9c02",
  "kind": "skill",
  "title": "Add invoice matching",
  "summary": "Reviewers asked for purchase order matching.",
  "before": null,
  "after": "Invoice matching",
  "submittedBy": "api-key:5d2c8f10-7a3b-4e9c-8f21-0c4d6e8a1b33",
  "status": "proposed",
  "reviewedBy": null,
  "reviewNote": null,
  "createdAt": "Fri Nov 27 2026 10:42:18 GMT+0000 (Coordinated Universal Time)",
  "decidedAt": null,
  "appliedVersion": null,
  "appliedAt": null
}

Builder assistance

These endpoints back the agent Builder: suggesting a starting configuration from a described outcome, trying a configuration change without saving it, and comparing models. They call a paid model with the workspace's own model provider key, are checked against the workspace's spend budget first, and each has its own rate limit (see rate limits). None of them changes a saved agent. When the platform refuses a model call, or the call fails, the error body carries invoked (whether a request may have reached the model provider) and decisionId next to error; most of these codes start with system_model_.

POST /api/builder/suggest

Gated

Suggest a starting configuration from a described outcome

Status: Gated. Shipped, but closed until a switch described on this page is turned on.

Calls a paid model on the workspace's own model provider key. Sends the outcome and the workspace's clarifying questions to the workspace's default model (openai/gpt-4o-mini when none is set) and returns suggested answers, skills and a one-sentence summary. Nothing is saved. If the model's reply cannot be read as the expected JSON, the response is 200 with empty suggestions.

Access: API key with the admin scope, or a signed-in workspace member. The model call is refused with 403 until a workspace admin has recorded a reviewed model profile for Builder suggestions in the workspace configuration, listing the model in use and the kinds of input the operation sends. The workspace also needs a model provider key.

Request headers
NameTypeDescription
X-CoA-Model-RequeststringThe current Unix time in milliseconds (13 digits), a dot and a UUID that you generate, new for each request; it identifies the request for usage accounting. Send it on every request: once a reviewed model profile lets the model call through, a request without it is refused with 503 model_usage_request_identity_required before any model call. See The usage-request header.
Request body
NameTypeDescription
outcome requiredstringThe outcome the agent should achieve, in plain language. At least 8 characters after trimming.

Returns: { clarification, skills, summary }. clarification maps each clarifying-question key to a suggested answer (at most 80 characters; a question with fixed options only ever gets one of its options), skills holds up to 6 skill names and summary is at most 200 characters.

Errors
StatusCodeWhen
400outcome_too_shortoutcome is missing or shorter than 8 characters.
400no_model_keyThe workspace has no model provider key.
402over_budgetThe workspace's spend budget refuses the call. No model is called; the body also carries empty suggestion fields and receipt, the run receipt that records the refusal.
403system_model_profile_unavailableNo reviewed model profile is recorded for this operation, or it has expired. No model is called.
403system_model_not_permittedThe model in use is not listed in the reviewed model profile. No model is called.
403system_model_source_not_permittedThe reviewed model profile does not cover a kind of input this operation sends: the submitted text and workspace context. No model is called.
502system_model_failedThe model call failed after it was dispatched. invoked is true: a request may have reached the model provider.
503model_usage_request_identity_requiredThe request has no X-CoA-Model-Request header. No model is called.
Request
curl -X POST https://centerofagentic.com/api/builder/suggest \
  -H "Authorization: Bearer $COA_API_KEY" \
  -H "Content-Type: application/json" \
  -H "X-CoA-Model-Request: $(date +%s)000.$(uuidgen)" \
  -d '{ "outcome": "Review supplier invoices against purchase orders and flag mismatches." }'
Response
{
  "clarification": {
    "produce": "A structured report",
    "users": "A specific team",
    "authority": "Recommend actions",
    "data": "Approved internal data",
    "approval": "Creating or updating records"
  },
  "skills": ["Invoice matching", "Variance analysis", "Executive writing"],
  "summary": "Reviews supplier invoices against purchase orders and recommends follow-ups."
}

POST /api/builder/variant

Gated

Test a configuration change without saving it

Status: Gated. Shipped, but closed until a switch described on this page is turned on.

Evaluates a prompt against an agent's saved configuration with temporary overrides and returns both the answer and the policy decision, which is recomputed from the overridden authority and data classes. It calls a paid model on the workspace's own key only when that decision is allow and still permits a cloud model; otherwise it returns the decision with an empty output and makes no model call. Connectors are not used. The agent is not changed and no conversation or run receipt is written; an audit log entry records the decision and the model.

Access: API key with the admin scope, or a signed-in workspace member. The model call is refused with 403 until a workspace admin has recorded a reviewed model profile for configuration tests in the workspace configuration, listing the model in use and the kinds of input the operation sends (including agent configuration when agentId is sent). The workspace also needs a model provider key.

Request headers
NameTypeDescription
X-CoA-Model-RequeststringThe current Unix time in milliseconds (13 digits), a dot and a UUID that you generate, new for each request; it identifies the request for usage accounting. Send it on every request: once a reviewed model profile lets the model call through, a test that reaches the model call without it is refused with 503 model_usage_request_identity_required before the model is called. See The usage-request header.
Request body
NameTypeDescription
prompt requiredstringThe test prompt.
agentIduuidThe agent whose saved configuration is the starting point. Without it a default profile is used: recommend authority with public and internal data.
overridesobjectTemporary changes layered on the starting configuration for this one test.
overrides.modelstring | nullModel id to use. Without it the agent's model is used, then the workspace default.
overrides.authoritystringAuthority level: answer, draft, recommend, prepare_action, execute_with_approval or execute_automatically.
overrides.runtimeModestringRuntime mode: cloud_only, local_preferred, local_only or hybrid.
overrides.dataClassesstring[]Data classes: any of public, internal, confidential, restricted and secrets.
overrides.skillsstring[]Skill names to compose into the system prompt.
overrides.knowledgeLayersobjectBoolean map of knowledge layers to include.
overrides.outcomestring | nullOutcome text to use in the system prompt.
overrides.systemPromptstringA complete system prompt. When set, it replaces the prompt composed from the configuration.

Returns: { output, decision, reasonCode, model, promptTokens, completionTokens, costUsd, latencyMs, steps, systemPrompt, survivingPlacements }. decision is allow or deny; reasonCode explains it, for example ALLOWED or LIMITED_OUTPUT; steps is the step timeline of the test; systemPrompt is the prompt that was, or would have been, sent; survivingPlacements lists where the request may run.

Errors
StatusCodeWhen
400missing_promptprompt is missing or empty.
404not_foundagentId does not name an agent in your workspace.
402over_budgetThe workspace is over its monthly spend budget. No model is called.
400no_model_keyThe workspace has no model provider key.
400no_modelNeither the overrides, the agent nor the workspace default names a model.
403system_model_profile_unavailableNo reviewed model profile is recorded for this operation, or it has expired. No model is called.
403system_model_not_permittedThe model in use is not listed in the reviewed model profile. No model is called.
403system_model_source_not_permittedThe reviewed model profile does not cover a kind of input this request sends: the submitted text, workspace context or, with agentId, agent configuration. No model is called.
403system_model_source_unavailableagentId names an agent whose status is revoked, disabled or suspended. No model is called.
403system_model_placement_unavailableagentId names an agent whose saved runtime mode is neither hybrid, cloud_only nor local_only, for example local_preferred. The check reads the saved agent, not overrides.runtimeMode. No model is called.
403system_model_refusedThe policy check on the model call itself refused it, for example because agentId names an agent saved as local_only, which may not use a cloud model. No model is called.
502system_model_failedThe model call failed after it was dispatched. invoked is true: a request may have reached the model provider.
502model_failedAn unexpected error occurred while the model call was being authorized or recorded.
503model_usage_request_identity_requiredThe request has no X-CoA-Model-Request header. No model is called.
Request
curl -X POST https://centerofagentic.com/api/builder/variant \
  -H "Authorization: Bearer $COA_API_KEY" \
  -H "Content-Type: application/json" \
  -H "X-CoA-Model-Request: $(date +%s)000.$(uuidgen)" \
  -d '{
    "agentId": "8a4e6c1d-2f3b-4c7a-9d10-5b6e7f8a9c02",
    "prompt": "Summarize the open invoice mismatches for this week.",
    "overrides": {
      "dataClasses": ["public", "internal", "restricted"],
      "systemPrompt": "You review supplier invoices. Be concise."
    }
  }'
Response
{
  "output": "",
  "decision": "allow",
  "reasonCode": "LIMITED_OUTPUT",
  "model": "openai/gpt-4o-mini",
  "promptTokens": 0,
  "completionTokens": 0,
  "costUsd": null,
  "latencyMs": 0,
  "steps": [
    {
      "step_id": "policy",
      "kind": "policy_decision",
      "label": "Authority & placement check",
      "status": "ok",
      "placement": "local",
      "reason_code": "LIMITED_OUTPUT",
      "policy": {
        "decision": "allow",
        "reason_code": "LIMITED_OUTPUT",
        "deny_rules_matched": ["deny_data_classification_g"],
        "obligations": [
          { "kind": "logging", "layer": "law_regulation", "ruleId": "obl_logging_h", "reason": "audit_all_runs" },
          { "kind": "confidence_label", "layer": "package_manifest", "ruleId": "obl_confidence_label_i", "reason": "label_confidence" },
          {
            "kind": "limited_output",
            "layer": "data_classification",
            "ruleId": "deny_data_classification_g",
            "reason": "Requested placement 'cloud_model' denied; routed to 'local'."
          }
        ]
      },
      "seq": 0
    },
    {
      "step_id": "model",
      "seq": 1,
      "kind": "model_call",
      "label": "Cloud reasoning turn",
      "status": "limited",
      "placement": "cloud_model",
      "reason_code": "LIMITED_OUTPUT"
    }
  ],
  "systemPrompt": "You review supplier invoices. Be concise.",
  "survivingPlacements": ["local"]
}

POST /api/builder/benchmark

Gated

Compare models on the same prompt

Status: Gated. Shipped, but closed until a switch described on this page is turned on.

Calls a paid model once for every entry in models, in parallel, on the workspace's own model provider key, and reports latency, token counts, cost and throughput for each. With agentId, the agent's composed system prompt is used so the comparison is representative; without it a generic prompt is used. Connectors are not used. A model that fails or is refused is reported inside its own result and the response is still 200.

Access: API key with the admin scope, or a signed-in workspace member. Every model call is refused until a workspace admin has recorded a reviewed model profile for benchmarks in the workspace configuration, listing each model to compare and the kinds of input the operation sends (including agent configuration when agentId is sent). The workspace also needs a model provider key.

Request headers
NameTypeDescription
X-CoA-Model-RequeststringThe current Unix time in milliseconds (13 digits), a dot and a UUID that you generate, new for each request; it identifies the request for usage accounting, and one value covers every model in models. Send it on every request: without it, each model call that a reviewed model profile would let through is refused before the model is called, and its result carries refusal.code model_usage_request_identity_required while the response is still 200. See The usage-request header.
Request body
NameTypeDescription
prompt requiredstringThe test prompt sent to every model.
models requiredstring[]Model ids to compare. Duplicates are removed and only the first 6 are used.
agentIduuidThe agent whose system prompt the benchmark should use. Omit it to use the generic prompt: an id that names no agent in your workspace does not return 404; every model call is refused instead, and each result carries the refusal (system_model_source_unavailable once a reviewed profile is in place).

Returns: { results, recommend }. Each result has model, ok, latencyMs, promptTokens, completionTokens, costUsd, tokensPerSec (both can be null) and output (the first 600 characters of the answer). A result with ok set to false also has error, and refusal with code, status, decisionId and invoked when the platform refused the call or the call failed after dispatch. recommend is { fastest, cheapest }, each a model id or null, chosen among the successful results.

Errors
StatusCodeWhen
400missing_promptprompt is missing or empty.
400no_modelsmodels contains no model id.
402over_budgetThe workspace is over its monthly spend budget. No model is called.
400no_model_keyThe workspace has no model provider key.
Request
curl -X POST https://centerofagentic.com/api/builder/benchmark \
  -H "Authorization: Bearer $COA_API_KEY" \
  -H "Content-Type: application/json" \
  -H "X-CoA-Model-Request: $(date +%s)000.$(uuidgen)" \
  -d '{
    "agentId": "8a4e6c1d-2f3b-4c7a-9d10-5b6e7f8a9c02",
    "prompt": "Summarize the open invoice mismatches for this week.",
    "models": ["openai/gpt-4o-mini", "openai/gpt-4o"]
  }'
Response
{
  "results": [
    {
      "model": "openai/gpt-4o-mini",
      "ok": true,
      "latencyMs": 1840,
      "promptTokens": 412,
      "completionTokens": 96,
      "costUsd": 0.00012,
      "tokensPerSec": 52,
      "output": "Three invoices do not match their purchase orders this week."
    },
    {
      "model": "openai/gpt-4o",
      "ok": true,
      "latencyMs": 2610,
      "promptTokens": 412,
      "completionTokens": 104,
      "costUsd": 0.00207,
      "tokensPerSec": 40,
      "output": "This week, three supplier invoices differ from their purchase orders."
    }
  ],
  "recommend": { "fastest": "openai/gpt-4o-mini", "cheapest": "openai/gpt-4o-mini" }
}

CoA Assistant

The CoA Assistant is the platform's built-in assistant for a workspace's agent program. It reads workspace data to explain and recommend, and it can draft test cases, agent improvements and domain packs for a person to review. It changes nothing itself: to act on a draft, submit it through the endpoint that owns that change, for example a contribution proposal.

POST /api/assistant/run

Gated

Run a CoA Assistant task

Status: Gated. Shipped, but closed until a switch described on this page is turned on.

Calls a paid model. The server gathers read-only workspace context for the chosen action, applies the assistant's fixed policy profile (recommend authority, public and internal data) and the workspace's spend budget, and returns the answer. The model call uses a key provided by the platform when one is configured for the assistant, otherwise the workspace's own model provider key. A run that is answered, denied by policy or refused for budget writes a run receipt and an audit log entry, and an answered run is appended to the caller's assistant thread.

Access: API key with the admin scope, or a signed-in workspace member. The model call is refused with 403 until a workspace admin has recorded a reviewed model profile for the assistant in the workspace configuration, listing the model in use and the kinds of input the run sends. It has its own rate limit; see rate limits.

Request headers
NameTypeDescription
X-CoA-Model-RequeststringThe current Unix time in milliseconds (13 digits), a dot and a UUID that you generate, new for each request; it identifies the request for usage accounting. Send it on every request: once a reviewed model profile lets the model call through, a run that reaches the model call without it is refused with 503 model_usage_request_identity_required before the model is called. See The usage-request header.
Request body
NameTypeDescription
action required"ask" | "summarize_usage" | "find_risks" | "improve_blueprint" | "explain_publish_blockers" | "suggest_eval_cases" | "explain_failures" | "explain_run" | "draft_domain_pack"The task. ask answers a free-form question; summarize_usage and find_risks report on the workspace's agents; improve_blueprint drafts improvements to one agent; explain_publish_blockers explains why an agent cannot be published; suggest_eval_cases drafts test cases; explain_failures interprets an experiment's failing cases; explain_run explains one run receipt; draft_domain_pack drafts a domain pack.
promptstringYour question or instruction. When omitted, a default prompt for the action is used.
agentIduuidThe agent to look at. Required for improve_blueprint and explain_publish_blockers; optional context for the other actions.
receiptIduuidThe run receipt to explain. Required for explain_run.
experimentIduuidThe experiment whose failures to explain. Required for explain_failures.
datasetIduuidFor suggest_eval_cases, the dataset whose existing cases the drafts should complement. Without it, workspace-wide coverage is used.
routestringOptional location in the web workspace (path and query; anything beyond 300 characters is cut off). For ask and draft_domain_pack it adds context about the screen the question refers to, such as /packs or /datasets/{id}.

Returns: { assistant, action, mode, decision, reasonCode, output, receiptId, contextSources, drafts }. mode is explanation, recommendation or draft; contextSources names the kinds of data that were read; drafts is { evalCases, proposal, domainPack, warnings } and is filled only by the drafting actions. When policy or the spend budget refuses the run, the response is still 200, with decision set to deny, an empty output and the receiptId of the recorded refusal.

Errors
StatusCodeWhen
400invalid_actionaction is not one of the listed tasks.
400invalid_requestThe id the action requires is missing or not a UUID: agentId, receiptId or experimentId.
404not_foundA referenced agent, receipt, dataset or experiment does not exist in your workspace.
400no_model_keyNo platform key is configured for the assistant and the workspace has no model provider key.
400no_modelNo model is set for the assistant or as the workspace default, and no platform fallback applies.
403system_model_profile_unavailableNo reviewed model profile is recorded for the assistant, or it has expired. No model is called.
403system_model_not_permittedThe model in use is not listed in the reviewed model profile. No model is called.
403system_model_classification_unavailableThe run's context would include data above the internal class, for example because an agent in the workspace is configured for confidential data, or the data classes could not be established. No model is called.
403system_model_source_not_permittedThe reviewed model profile does not cover a kind of input this run sends: the submitted text, workspace context, agent configuration when an agent is in context, or a run receipt for explain_run. No model is called.
403system_model_source_unavailableThe agent in context has the status revoked, disabled or suspended. No model is called.
403system_model_placement_unavailableThe agent in context has a saved runtime mode that is neither hybrid, cloud_only nor local_only, for example local_preferred. No model is called.
502system_model_failedThe model call failed after it was dispatched. invoked is true: a request may have reached the model provider.
503model_usage_request_identity_requiredThe request has no X-CoA-Model-Request header. No model is called.
Request
curl -X POST https://centerofagentic.com/api/assistant/run \
  -H "Authorization: Bearer $COA_API_KEY" \
  -H "Content-Type: application/json" \
  -H "X-CoA-Model-Request: $(date +%s)000.$(uuidgen)" \
  -d '{ "action": "ask", "prompt": "Which agents had the most denied runs this month?" }'
Response
{
  "assistant": "coa_assistant",
  "action": "ask",
  "mode": "explanation",
  "decision": "allow",
  "reasonCode": "ALLOWED",
  "output": "Two agents account for most of the denied runs in the last 30 days.",
  "receiptId": "7c9e2b14-5d3a-4f6b-8e21-9a0b1c2d3e44",
  "contextSources": ["product_docs", "agents", "metrics", "receipts"],
  "drafts": { "evalCases": [], "proposal": null, "domainPack": null, "warnings": [] }
}

GET /api/assistant/thread

Read the caller's recent assistant conversation

Returns the last 20 turns of the calling identity's assistant thread, oldest first. Threads are per caller: a signed-in person sees their own turns and an API key sees the turns produced with that key. Stored turns are cut to 2,400 characters. An empty list is returned when there is no history.

Access: API key with the read scope, or a signed-in workspace member.

Returns: { turns: Turn[] }. Each turn has id, role (user or assistant), content, receiptId (the run receipt of that exchange, or null) and ts (a date string that is not guaranteed to be ISO 8601).

Something missing or unclear? Tell us and we will improve this page.