Skip to content
Documentation menu

Knowledge and skills

Manage the knowledge catalogue, custom skills and macros, and move skills in and out of a workspace as portable documents.

The knowledge catalogue lists the named sources your workspace has recorded for each knowledge layer. An agent that has a layer switched on is told which sources in that layer it may draw on. A catalogue entry is a record with a name, a description and an owner; these endpoints do not upload documents or connect a data provider.

The skills catalogue holds the reusable instructions that agents apply: built-in skills that ship with the platform, custom skills that belong to your workspace, and macros that chain skills into one ordered playbook. Skills can be exported as portable documents and imported from a file or from a public GitHub folder through a preview-then-commit flow.

Reading either catalogue and exporting skills needs an API key with the read scope. Creating, changing, deleting and importing need the admin scope. A signed-in workspace member can call every endpoint on this page. See authentication for how to send a key and errors for the shared error format.

Knowledge catalogue

Named sources grouped by knowledge layer. There are five fixed layers (domain, tenant, role, user, task) and a workspace can hold up to 300 sources.

GET /api/knowledge

List knowledge layers and sources

Returns the five layer definitions and every source in the workspace catalogue. The list is not paginated.

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

Returns: An object with layers (each with key, label, scope and blurb) and sources (each with id, layer, name, description, owner and updatedAt). owner and updatedAt can be empty strings on older entries.

Request
curl https://centerofagentic.com/api/knowledge \
  -H "Authorization: Bearer $COA_API_KEY"
Response
{
  "layers": [
    { "key": "domain", "label": "Domain knowledge", "scope": "Shared", "blurb": "Reference packs, definitions, and best practices for the agent's domain." },
    { "key": "tenant", "label": "Company knowledge", "scope": "Company", "blurb": "Approved sources connected from your organization." },
    { "key": "role", "label": "Role & team", "scope": "Role-scoped", "blurb": "Access scoped to the user's role, team, and permissions." },
    { "key": "user", "label": "User context", "scope": "Private", "blurb": "The individual user's preferences, history, and private notes." },
    { "key": "task", "label": "Task context", "scope": "Task only", "blurb": "Files and instructions for the task at hand." }
  ],
  "sources": [
    {
      "id": "ks_3f1c2a9e-0b7d-4e55-9a51-6f2f1c0e8d11",
      "layer": "tenant",
      "name": "Brand guidelines 2026",
      "description": "Approved tone of voice and visual rules.",
      "owner": "Marketing operations",
      "updatedAt": "2026-11-28T10:15:00.000Z"
    }
  ]
}

POST /api/knowledge

Add a knowledge source

Adds a source to one layer. The server issues the id and sets updatedAt; neither can be supplied.

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

Request body
NameTypeDescription
layer required"domain" | "tenant" | "role" | "user" | "task"The knowledge layer the source belongs to.
name requiredstringDisplay name. Leading and trailing spaces are removed and longer values are cut to 100 characters.
descriptionstringWhat the source contains. Cut to 200 characters.
ownerstringWho is accountable for the source, as free text. Cut to 120 characters. Defaults to the identifier of the calling credential.

Returns: The created source: { id, layer, name, description, owner, updatedAt }. The status is 200.

Errors
StatusCodeWhen
400invalidname is missing or empty, or layer is not one of the five layer keys.
400limitThe workspace already has 300 knowledge sources. Remove one first.
Request
curl -X POST https://centerofagentic.com/api/knowledge \
  -H "Authorization: Bearer $COA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"layer":"tenant","name":"Brand guidelines 2026","description":"Approved tone of voice and visual rules.","owner":"Marketing operations"}'
Response
{
  "id": "ks_3f1c2a9e-0b7d-4e55-9a51-6f2f1c0e8d11",
  "layer": "tenant",
  "name": "Brand guidelines 2026",
  "description": "Approved tone of voice and visual rules.",
  "owner": "Marketing operations",
  "updatedAt": "2026-11-28T10:15:00.000Z"
}

PATCH /api/knowledge/{id}

Update a knowledge source

Send only the fields to change. updatedAt is set by the server on every update, and an empty owner keeps the current owner.

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

Path parameters
NameTypeDescription
id requiredstringSource id, for example ks_3f1c2a9e-0b7d-4e55-9a51-6f2f1c0e8d11.
Request body
NameTypeDescription
layer"domain" | "tenant" | "role" | "user" | "task"Move the source to another layer.
namestringNew display name; cannot be empty. Cut to 100 characters.
descriptionstringNew description. Cut to 200 characters.
ownerstringNew owner. Cut to 120 characters.

Returns: The updated source: { id, layer, name, description, owner, updatedAt }.

Errors
StatusCodeWhen
404not_foundNo source in the workspace has this id, or it was removed while the update was in progress.
400invalidThe change would leave the source without a name or with an unknown layer.

DELETE /api/knowledge/{id}

Remove a knowledge source

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

Path parameters
NameTypeDescription
id requiredstringSource id.

Returns: { "ok": true }.

Errors
StatusCodeWhen
404not_foundNo source in the workspace has this id.

Skills catalogue

Built-in skills are read-only and have ids that start with builtin:. Custom skills have ids that start with skill_ and carry a revision that increases with every saved change; to edit or delete one you send the revision you last read, and a request based on an older revision is refused instead of overwriting the newer change. A workspace can hold up to 200 custom skills.

GET /api/skills

List skills and macros

Returns the built-in skills first, then the workspace's custom skills, and all macros. The response is not paginated and includes the full instruction text of every skill.

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

Returns: An object with skills and macros. Every skill has id, name, category, description, instructions and builtin; skills bound to a connector add integration (provider, toolMatch). Custom skills also carry revision, digest (when known), provenance (who created and last changed the skill, and an origin of manual, copy or import, or legacy for skills saved before origins were recorded) and, for imported skills, importInfo. Each macro has id, name, description and steps.

Request
curl https://centerofagentic.com/api/skills \
  -H "Authorization: Bearer $COA_API_KEY"
Response
{
  "skills": [
    {
      "id": "builtin:source-freshness-check",
      "name": "Source freshness check",
      "category": "Compliance",
      "description": "Verifies data recency before it is used.",
      "instructions": "Before relying on a source, check its date/version. If it is stale or undated, say so and lower your confidence. Prefer the most recent approved source.",
      "builtin": true
    },
    {
      "id": "skill_3f1c2a9e-0b7d-4e55-9a51-6f2f1c0e8d11",
      "name": "Quarterly report review",
      "category": "Reporting",
      "description": "Checks a quarterly report for unsupported figures.",
      "instructions": "Read every section. List each figure that has no stated source.",
      "builtin": false,
      "revision": 1,
      "digest": "8b20d135815a3e690946e8324c2d7887db56c2669a249848f9ba992efbe82884",
      "provenance": {
        "origin": "manual",
        "createdBy": "api-key:7a1e4c2b-5d3f-4a68-8b90-2c4d6e8f0a12",
        "createdAt": "2026-11-28T10:15:00.123456+00:00",
        "updatedBy": "api-key:7a1e4c2b-5d3f-4a68-8b90-2c4d6e8f0a12",
        "updatedAt": "2026-11-28T10:15:00.123456+00:00"
      }
    }
  ],
  "macros": [
    {
      "id": "mac_5b2d4f6a-8c1e-4d3b-9f70-1a2b3c4d5e6f",
      "name": "Report pack",
      "description": "Review the report, then write the summary.",
      "steps": [
        { "skillId": "skill_3f1c2a9e-0b7d-4e55-9a51-6f2f1c0e8d11" },
        { "skillId": "builtin:executive-writing", "note": "Keep it under 150 words." }
      ]
    }
  ]
}

GET /api/skills/{id}

Get a skill with its dependencies and change history

Works for built-in and custom skills. Use it to read the current revision and digest before an update, delete or export, and to see what still refers to a skill before you rename or delete it. Earlier instruction text is not kept, so history records that a change happened, not what the text was.

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

Path parameters
NameTypeDescription
id requiredstringSkill id: builtin:… for a built-in skill or skill_… for a custom skill.

Returns: An object with skill, dependencies and history. dependencies holds draftAgents (agents whose current configuration selects the skill: id, name), macros (id, name) and activeVersions (activated agent versions that captured the skill: agentId, versionId, name), each capped at 50 entries, plus totals with the full counts and a truncated flag. history holds up to 50 of the most recent change events, newest first, each with action, actor, createdAt, revisionBefore, revisionAfter, digestBefore and digestAfter. createdAt is a date-time string that is not guaranteed to be ISO 8601, so parse it leniently.

Errors
StatusCodeWhen
404not_foundNo built-in or workspace skill has this id.

POST /api/skills

Create a custom skill

Saves a new custom skill at revision 1. Only the fields below are accepted; any other field is rejected. Nothing is shortened to fit a limit: a request that exceeds one fails and saves nothing.

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

Request body
NameTypeDescription
name requiredstringDisplay name, at most 80 characters. It cannot match the name of a built-in skill or another custom skill, ignoring case.
categorystringFree-text category of at most 40 characters. Defaults to Custom.
descriptionstringShort summary of at most 1,024 characters.
instructionsstringThe instruction text an agent receives when the skill is selected. All authored text of a skill together is limited to 64 KiB of UTF-8.
integrationobjectOptional binding to a connector, used to narrow the connector's tools to what this skill needs.
integration.provider requiredstringRequired when integration is sent. Connector provider key of 1 to 40 characters, for example jira.
integration.toolMatch requiredstring[]Required when integration is sent; it can be an empty array. Up to 12 keywords of at most 128 characters each. Stored trimmed, in lower case and without duplicates.

Returns: The saved skill with a server-issued id, builtin: false, revision: 1, a content digest and provenance. The status is 200.

Errors
StatusCodeWhen
400invalid_skillA field is missing, malformed or not writable. The response lists each problem in issues as { field, message }.
409name_conflictA built-in or workspace skill already uses the name.
409catalog_limitThe workspace already has 200 custom skills.
413skill_too_largeThe authored text exceeds 64 KiB of UTF-8.
409catalog_busyThe catalogue kept changing while the request was being saved. Nothing was saved; send the request again.
Request
curl -X POST https://centerofagentic.com/api/skills \
  -H "Authorization: Bearer $COA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Quarterly report review","category":"Reporting","description":"Checks a quarterly report for unsupported figures.","instructions":"Read every section. List each figure that has no stated source."}'
Response
{
  "id": "skill_3f1c2a9e-0b7d-4e55-9a51-6f2f1c0e8d11",
  "name": "Quarterly report review",
  "category": "Reporting",
  "description": "Checks a quarterly report for unsupported figures.",
  "instructions": "Read every section. List each figure that has no stated source.",
  "builtin": false,
  "revision": 1,
  "digest": "8b20d135815a3e690946e8324c2d7887db56c2669a249848f9ba992efbe82884",
  "provenance": {
    "origin": "manual",
    "createdBy": "api-key:7a1e4c2b-5d3f-4a68-8b90-2c4d6e8f0a12",
    "createdAt": "2026-11-28T10:15:00.123456+00:00",
    "updatedBy": "api-key:7a1e4c2b-5d3f-4a68-8b90-2c4d6e8f0a12",
    "updatedAt": "2026-11-28T10:15:00.123456+00:00"
  }
}

PATCH /api/skills/{id}

Update a custom skill

Send expectedRevision plus only the fields to change. A successful update raises revision by one and issues a new digest. A rename is refused while an agent's configuration or a macro still uses the skill. Editing an imported skill creates a new revision, so it has to be reviewed again before agents can use it.

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

Path parameters
NameTypeDescription
id requiredstringId of a custom skill (skill_…).
Request body
NameTypeDescription
expectedRevision requiredintegerThe revision from your latest read of the skill.
namestringNew display name, at most 80 characters.
categorystringNew category, at most 40 characters.
descriptionstringNew description, at most 1,024 characters.
instructionsstringNew instruction text.
integrationobject | nullNew connector binding (provider, toolMatch). Leave it out to keep the current binding, or send null to remove it.

Returns: The saved skill, in the same shape as the create response, with the new revision and digest.

Errors
StatusCodeWhen
400revision_requiredexpectedRevision is missing or not a non-negative integer.
400invalid_skillA field is malformed or not writable; see issues.
404not_foundNo custom skill in the workspace has this id. Built-in skills cannot be changed.
409stale_skillexpectedRevision is no longer the current revision. Read the skill again and reapply your change.
409name_conflictAnother skill already uses the new name.
409skill_in_useThe request renames a skill that agents or macros still refer to. The response includes dependencies.
413skill_too_largeThe authored text would exceed 64 KiB of UTF-8.
400credentialThe skill was imported and the changed content matches a credential pattern.
Request
curl -X PATCH https://centerofagentic.com/api/skills/skill_3f1c2a9e-0b7d-4e55-9a51-6f2f1c0e8d11 \
  -H "Authorization: Bearer $COA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"expectedRevision":1,"instructions":"Read every section. List each figure that has no stated source, with its page number."}'

DELETE /api/skills/{id}

Delete a custom skill

The request needs a JSON body. Macros that use the skill are not rewritten: they keep the step, which no longer resolves to a skill, until you edit the macro. Agent versions that were already activated keep the copy they captured.

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

Path parameters
NameTypeDescription
id requiredstringId of a custom skill (skill_…).
Request body
NameTypeDescription
expectedRevision requiredintegerThe revision from your latest read of the skill. No other field is accepted.

Returns: { "ok": true }.

Errors
StatusCodeWhen
400revision_requiredexpectedRevision is missing or not a non-negative integer.
404not_foundNo custom skill in the workspace has this id. Built-in skills cannot be deleted.
409stale_skillexpectedRevision is no longer the current revision.

POST /api/skills/{id}/copy

Copy a built-in skill into an editable custom skill

Creates a separate custom skill that starts from a built-in definition. The built-in skill stays unchanged, and the copy does not follow later changes to it.

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

Path parameters
NameTypeDescription
id requiredstringId of a built-in skill, for example builtin:executive-writing.
Request body
NameTypeDescription
name requiredstringName for the copy. It cannot reuse the built-in name or the name of any other skill.
categorystringOverrides the built-in category.
descriptionstringOverrides the built-in description.
instructionsstringOverrides the built-in instructions.
integrationobject | nullOverrides the built-in connector binding (provider, toolMatch). Send null to create the copy without a binding.

Returns: The new custom skill at revision: 1. Its provenance.origin is copy and provenance.copiedFrom holds the id, name and digest of the built-in skill. The status is 200.

Errors
StatusCodeWhen
404not_foundThe id is not a built-in skill.
400invalid_skillname is missing, or a field is malformed or not writable.
409name_conflictA built-in or workspace skill already uses the name.
409catalog_limitThe workspace already has 200 custom skills.

POST /api/skills/draft

Gated

Draft skill instructions with the workspace model

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

Asks the workspace's default model to write two to four sentences of instructions for a named skill. Nothing is saved: pass the returned text to the create or update endpoint. The call uses the workspace's model provider key and is refused when the workspace is over its monthly budget. Send the X-CoA-Model-Request header with every request: once an approved model profile lets the model call through, a request without it is refused with 503 model_usage_request_identity_required.

Access: API key with the admin scope, or a signed-in workspace member. Refused with 403 until a workspace admin has approved a model profile that covers skill drafting, has not expired and lists the workspace's default model. Settings has no screen for recording a profile today and an API key cannot record one, so expect this call to answer 403 with system_model_profile_unavailable unless your workspace admin confirms that a profile is in place. 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 an approved 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
name requiredstringName of the skill to draft instructions for.
descriptionstringOptional summary that gives the model more context.

Returns: { instructions }: the drafted text, at most 2,000 characters. It can be an empty string when no draft could be produced.

Errors
StatusCodeWhen
400invalidname is missing or empty.
402over_budgetThe workspace is over its monthly spend budget.
400no_model_keyThe workspace has no model provider key.
403system_model_profile_unavailableNo approved, unexpired model profile covers skill drafting. No model request was sent.
403system_model_not_permittedThe approved profile does not list the workspace's default model. No model request was sent.
502system_model_failedThe model request failed after it may have been sent. Do not repeat it automatically.
503model_usage_request_identity_requiredThe request has no X-CoA-Model-Request header. No model request was sent.
503system_model_decision_unavailableThe request could not be recorded before the model call, for example because the X-CoA-Model-Request value is malformed, more than 24 hours old or more than a minute ahead of the server clock. No model request was sent.

Macros

A macro is an ordered list of one to ten existing skills that an agent follows as a single playbook. Macros cannot contain other macros. They are listed by GET /api/skills, their ids start with mac_, and a workspace can hold up to 100.

POST /api/skills/macros

Create a macro

Every step must name a skill that exists in the catalogue at the time of the request. Entries in steps without a skillId are ignored.

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

Request body
NameTypeDescription
name requiredstringDisplay name. Longer values are cut to 80 characters.
descriptionstringWhat the macro is for. Cut to 280 characters.
steps requiredobject[]One to ten steps, in the order the agent should follow them.
steps.skillId requiredstringId of a built-in or custom skill. A macro id is not accepted.
steps.notestringOptional guidance for this step. Cut to 200 characters.

Returns: The created macro: { id, name, description, steps }. The status is 200.

Errors
StatusCodeWhen
400invalidThe name or the steps are missing, there are more than ten steps, or a step names an unknown skill or a macro. detail says which.
400limitThe workspace already has 100 macros.
409skill_not_readyA step uses an imported skill that has not been reviewed yet.
Request
curl -X POST https://centerofagentic.com/api/skills/macros \
  -H "Authorization: Bearer $COA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Report pack","description":"Review the report, then write the summary.","steps":[{"skillId":"skill_3f1c2a9e-0b7d-4e55-9a51-6f2f1c0e8d11"},{"skillId":"builtin:executive-writing","note":"Keep it under 150 words."}]}'
Response
{
  "id": "mac_5b2d4f6a-8c1e-4d3b-9f70-1a2b3c4d5e6f",
  "name": "Report pack",
  "description": "Review the report, then write the summary.",
  "steps": [
    { "skillId": "skill_3f1c2a9e-0b7d-4e55-9a51-6f2f1c0e8d11" },
    { "skillId": "builtin:executive-writing", "note": "Keep it under 150 words." }
  ]
}

PATCH /api/skills/macros/{id}

Update a macro

Send only the fields to change; steps replaces the whole list. The result is checked against the current catalogue, so a step whose skill has been deleted must be removed before the macro can be saved.

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

Path parameters
NameTypeDescription
id requiredstringMacro id (mac_…).
Request body
NameTypeDescription
namestringNew display name; cannot be empty. Cut to 80 characters.
descriptionstringNew description. Cut to 280 characters.
stepsobject[]The full new list of one to ten steps, each with skillId and an optional note.
steps.skillId requiredstringId of a built-in or custom skill. A macro id is not accepted.
steps.notestringOptional guidance for this step. Cut to 200 characters.

Returns: The updated macro: { id, name, description, steps }.

Errors
StatusCodeWhen
404not_foundNo macro in the workspace has this id, or it was removed while the update was in progress.
400invalidThe merged macro has no name, no steps, more than ten steps, or a step that names an unknown skill or a macro.
409skill_not_readyA step uses an imported skill that has not been reviewed yet.

DELETE /api/skills/macros/{id}

Delete a macro

Removes only the macro. Agents that still list its id stop receiving the playbook; their configuration is not rewritten.

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

Path parameters
NameTypeDescription
id requiredstringMacro id (mac_…).

Returns: { "ok": true }.

Errors
StatusCodeWhen
404not_foundNo macro in the workspace has this id.

Export and source files

Export turns a saved skill into a portable document: a SKILL.md file with YAML front matter, or a JSON document. Skills imported from a public GitHub folder also keep the original files of that folder, which can be read back in chunks.

POST /api/skills/{id}/export

Export a skill as a portable document

Works for built-in and custom skills and does not change the catalogue. expectedRevision and expectedDigest must match the saved skill; for a built-in skill send 0 and null. The document comes back as JSON in text, to be written to a file under filename. Server ids and the review status of an imported skill are not part of the document.

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

Path parameters
NameTypeDescription
id requiredstringSkill id (builtin:… or skill_…).
Request body
NameTypeDescription
format required"json" | "skill-md"skill-md produces a SKILL.md file; json produces a JSON skill document.
expectedRevision requiredintegerCurrent revision of the skill; 0 for a built-in skill.
expectedDigest requiredstring | nullCurrent digest of the skill, or null when the skill has none, as is the case for every built-in skill.
portableNamestringFile-level name of 1 to 64 lower-case letters or digits separated by single hyphens. Defaults to a name derived from the skill name. An imported skill keeps the portable name it was imported with.
descriptionstringDescription to use when the saved skill has none, at most 1,024 characters. An export needs a non-empty description; a saved description cannot be overridden here.
bundlebooleanFor a skill imported from a GitHub folder, true adds a bundle object with the manifest of the stored files.

Returns: An object with ok (true), text (the document), bytes, sha256, mimeType (application/json or text/markdown), filename (skills.json or SKILL.md), omittedResources (supporting files the single document does not contain), diagnostics, revision, digest and enforcement. enforcement is always CoA-only: governance applies inside the platform, not to the exported file. With bundle: true on a GitHub-imported skill, bundle holds { version, manifest }.

Errors
StatusCodeWhen
400invalid_exportThe body is malformed, a required value is missing, the skill has no description and none was supplied, or the content cannot be represented in the chosen format.
404not_foundNo built-in or workspace skill has this id.
409stale_skillexpectedRevision or expectedDigest does not match the saved skill.
400credentialThe content matches a credential pattern and is not exported.
413export_too_largeThe document would exceed 64 KiB for skill-md or 1 MiB for json.
Request
curl -X POST https://centerofagentic.com/api/skills/skill_3f1c2a9e-0b7d-4e55-9a51-6f2f1c0e8d11/export \
  -H "Authorization: Bearer $COA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"format":"skill-md","expectedRevision":1,"expectedDigest":"8b20d135815a3e690946e8324c2d7887db56c2669a249848f9ba992efbe82884"}'
Response
{
  "ok": true,
  "text": "---\nname: 'quarterly-report-review'\ndescription: 'Checks a quarterly report for unsupported figures.'\nx-agentbuilder:\n  display-name: 'Quarterly report review'\n  category: 'Reporting'\n  extensions: {}\n  origin:\n    format: 'json'\n    sha256: '16bfe24b97e503193ae341724a1fadac6e769281dbed50acd2f4c65cff12a7af'\n    recordIndex: 0\n---\nRead every section. List each figure that has no stated source.",
  "bytes": 395,
  "sha256": "3a7a2a0ff6f7ee408764b3fadbae7399787983d9e4535955ba25558497cc4484",
  "mimeType": "text/markdown",
  "filename": "SKILL.md",
  "omittedResources": [],
  "diagnostics": [],
  "revision": 1,
  "digest": "8b20d135815a3e690946e8324c2d7887db56c2669a249848f9ba992efbe82884",
  "enforcement": "CoA-only"
}

POST /api/skills/{id}/resources

Read the stored source files of a GitHub-imported skill

Has two modes, and each accepts only its own fields. Without mode, it returns up to 256 KiB of one stored file as base64, starting at offset; repeat with a higher offset until eof is true, then check the assembled file against totalBytes and sha256. With mode set to review, it returns the text reference files that the skill's instructions depend on, with their sizes and digests, for inspection. Neither mode changes the catalogue.

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

Path parameters
NameTypeDescription
id requiredstringId of a custom skill that was imported from a GitHub folder.
Request body
NameTypeDescription
expectedRevision requiredintegerCurrent revision of the skill (1 or higher).
expectedDigest requiredstringCurrent digest of the skill.
pathstringChunk mode, required: path of the file relative to the imported folder, as listed in the import manifest, for example references/checklist.md.
offsetintegerChunk mode, required: byte offset to start reading at; 0 for the first chunk.
mode"review"Review mode, required: the literal review.
version1Review mode, required: must be 1.

Returns: Chunk mode: { filename, path, sha256, totalBytes, offset, base64, eof }. Review mode: { review, materials }, where review holds version, profile, revision, digest, manifestDigest, files (each with path, bytes, sha256) and materializationDigest, and materials repeats each file with its text.

Errors
StatusCodeWhen
400invalid_resourceThe body is malformed or mixes the two modes, the path is not a safe relative path, or the offset is past the end of the file.
404not_foundNo custom skill in the workspace has this id. Chunk mode: the skill has no stored source files, or no file at path.
409stale_skillexpectedRevision or expectedDigest does not match the saved skill.
409resource_unavailableThe stored files are incomplete, or, in review mode, the skill has no stored source files. Import the source again.
400resource_unsupportedReview mode: the skill depends on something other than plain text reference files (.md, .txt, .csv, .json, .yml, .yaml).
400resource_cycleReview mode: the reference files refer to each other in a loop.
413resource_limitReview mode: the referenced files exceed 128 KiB for one file, 256 KiB in total, 99 files or eight levels of references.
Request
curl -X POST https://centerofagentic.com/api/skills/skill_7d6c5b4a-3f2e-4d1c-8b0a-9f8e7d6c5b4a/resources \
  -H "Authorization: Bearer $COA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"expectedRevision":1,"expectedDigest":"b319cd42e0d80ea7822e03fee9fde34da4fc8846dfc9a22f1aa5ec883e321453","path":"references/checklist.md","offset":0}'
Response
{
  "filename": "checklist.md",
  "path": "references/checklist.md",
  "sha256": "420c6d8eeedcb16058fad5ce6b980729cf969757e6b5839ff374f6397e891318",
  "totalBytes": 27,
  "offset": 0,
  "base64": "IyBDaGVja2xpc3QKLSBDaGVjayB0b3RhbHMK",
  "eof": true
}

Import skills

Importing takes two calls. A preview parses the document, reports warnings and name clashes and returns a previewId that is valid for 15 minutes; a commit then resubmits the same request and saves every record, or none. The source can be a SKILL.md file, plain Markdown with metadata, or a JSON skill document ({ "format": "agentbuilder.skill", "version": 1, "skill": { … } }, or agentbuilder.skills with a skills array of up to 200 records). Each JSON skill record holds a portableName and a content object with name, description, instructions and optionally category and integration; the export endpoint produces documents in this form. Imported skills start unreviewed: until a workspace admin reviews the skill in the web workspace, a step that API keys cannot perform, assigning it to an agent or adding it to a macro is refused with skill_not_ready. A skill whose preview reports inspection.dependenciesSatisfied as false, for example because it declares required tools or a connector binding, can stay unassignable after that review.

POST /api/skills/import-preview

Preview a skill import

Parses and checks the document without saving a skill. The preview stores only a handle and a digest of the request, not the document, so the commit must send the same request again. A workspace can create 30 previews per minute, 20 per caller, and the serialised request is limited to 2 MiB.

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

Request body
NameTypeDescription
version required1Must be 1.
format required"skill-md" | "markdown" | "json"How to read source.
source requiredstringThe document text itself, never a URL. At most 64 KiB for skill-md and markdown, and 1 MiB for json. A SKILL.md needs name (in the same form as portableName) and a non-empty description in its front matter; the text after the front matter becomes the instructions.
metadataobjectRequired for markdown: portableName (1 to 64 lower-case letters or digits separated by single hyphens), name and description, with optional category and integration.
allowBatchbooleanMust be true to import a JSON document in the agentbuilder.skills form, whatever the number of records.
choicesobject[]One entry per parsed record, in order. { "kind": "create" } or { "kind": "copy" } adds a new skill, optionally under another name. { "kind": "replace", "id": …, "expectedRevision": … } overwrites an existing custom skill. Defaults to create for every record.
githubobjectPresent when the request was produced by the GitHub source endpoint: repository, commit, folder and manifestDigest. The server reads the pinned folder again and refuses the import if it no longer matches, so the errors of the GitHub source endpoint can also occur here. Such a request holds exactly one skill.

Returns: An object with previewId, expiresAt, digest (of the request), documents (the parsed records, each with portableName, content, frontmatter, extensions, origin, source and inspection, plus github for a GitHub import), diagnostics (warnings with code, severity, field, message and recordIndex), collisions (clashes with existing skills: index, id, name, revision, alternatives) and canCommit. canCommit is false when a clash is unresolved or the workspace would exceed 200 custom skills.

Errors
StatusCodeWhen
400invalid_importThe request or the document is malformed. Parser findings are listed in issues. Nothing is partly accepted.
400credentialThe document matches a credential pattern, such as a private key or an API token.
413invalid_importsource or its metadata exceeds a size limit, or a JSON document holds more than 200 records. The status is 413 although the code is invalid_import.
413import_too_largeThe serialised request exceeds 2 MiB.
400invalid_github_sourceThe github object is malformed, or the document does not hold exactly one skill.
404not_foundA replace choice names a skill that is not a custom skill of this workspace.
409github_source_changedThe GitHub folder no longer matches the manifestDigest in the request. Fetch the source again.
429import_rate_limitMore than 30 previews in 60 seconds for the workspace, or 20 for the caller. The response carries Retry-After: 60.
429preview_limitThe workspace has 100 open previews, or 1,000 previews retained from the last 24 hours.
Request
curl -X POST https://centerofagentic.com/api/skills/import-preview \
  -H "Authorization: Bearer $COA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"version":1,"format":"markdown","source":"Review every number.","metadata":{"portableName":"report-review","name":"Report review","description":"Review a report."}}'
Response
{
  "previewId": "c2a4e6f8-1b3d-4f5a-8c7e-9d0b2a4c6e8f",
  "expiresAt": "2026-11-28T10:30:00.123456+00:00",
  "digest": "c5b8c372987a14d9044a5aba280f32283d0c889bc46afc3be2aee3174a94671d",
  "documents": [
    {
      "portableName": "report-review",
      "content": {
        "name": "Report review",
        "category": "Custom",
        "description": "Review a report.",
        "instructions": "Review every number."
      },
      "frontmatter": { "name": "report-review", "description": "Review a report." },
      "extensions": {},
      "origin": {
        "format": "markdown",
        "sha256": "34c6ad962b4fcfc522d7fd1d1bb7c7872fc759aab8ca4703e3ed1e0ca33d1d6b",
        "recordIndex": 0
      },
      "source": {
        "format": "markdown",
        "sha256": "34c6ad962b4fcfc522d7fd1d1bb7c7872fc759aab8ca4703e3ed1e0ca33d1d6b",
        "bytes": 20,
        "recordIndex": 0
      },
      "inspection": {
        "resources": [],
        "requirements": [],
        "annotationRequired": true,
        "dependenciesSatisfied": true,
        "assignable": false
      }
    }
  ],
  "diagnostics": [],
  "collisions": [],
  "canCommit": true
}

POST /api/skills/import

Commit a previewed skill import

Saves the previewed records as custom skills. request must be exactly the body that was previewed; a changed request needs a new preview. All records are saved together or none are. Repeating the call with the same previewId, idempotencyKey and request returns the original result with replayed: true instead of importing twice, until 24 hours after the preview was created.

Access: API key with the admin scope, or a signed-in workspace member. Only the caller that created the preview (the same API key or the same signed-in user) can use it.

Request body
NameTypeDescription
previewId requireduuidThe previewId returned by the preview.
idempotencyKey requireduuidA UUID you generate for this commit. Reuse it only to retry the same commit.
request requiredobjectThe exact import request that was previewed.

Returns: An object with skills (one { id, revision, digest } per saved skill, in record order) and replayed.

Errors
StatusCodeWhen
400invalid_importThe body is malformed, or previewId or idempotencyKey is not a UUID.
404preview_not_foundNo preview with this id belongs to the calling credential.
409preview_changedrequest differs from the request that was previewed.
409preview_consumedThe preview was already committed under another idempotency key.
410preview_expiredThe preview is older than 15 minutes.
410preview_cancelledThe preview was cancelled.
409idempotency_conflictThe idempotency key was already used for a different preview or request.
409name_conflictA record's name is now used by another skill. Preview again with a new name or a replace choice.
409stale_skillA replace choice names a revision that is no longer current.
404not_foundA replace choice names a skill that no longer exists.
409skill_in_useA replace choice would rename a skill that agents or macros still refer to.
409catalog_limitThe import would take the workspace past 200 custom skills.
409github_source_changedGitHub import: the folder no longer matches the manifestDigest in the request.
409catalog_busyThe catalogue kept changing while the import was being saved. Nothing was saved; send the same call again.
409import_outcome_unknownThe result could not be confirmed. Retry with the same previewId, idempotencyKey and request; do not start a new import.
Request
curl -X POST https://centerofagentic.com/api/skills/import \
  -H "Authorization: Bearer $COA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"previewId":"c2a4e6f8-1b3d-4f5a-8c7e-9d0b2a4c6e8f","idempotencyKey":"0e9d8c7b-6a5f-4e3d-9c2b-1a0f9e8d7c6b","request":{"version":1,"format":"markdown","source":"Review every number.","metadata":{"portableName":"report-review","name":"Report review","description":"Review a report."}}}'
Response
{
  "skills": [
    {
      "id": "skill_7d6c5b4a-3f2e-4d1c-8b0a-9f8e7d6c5b4a",
      "revision": 1,
      "digest": "b319cd42e0d80ea7822e03fee9fde34da4fc8846dfc9a22f1aa5ec883e321453"
    }
  ],
  "replayed": false
}

DELETE /api/skills/import-previews/{id}

Cancel an import preview

Marks an open preview as cancelled so it can no longer be committed. No body is needed and the catalogue is not changed.

Access: API key with the admin scope, or a signed-in workspace member. Only the caller that created the preview (the same API key or the same signed-in user) can use it.

Path parameters
NameTypeDescription
id requireduuidThe previewId to cancel.

Returns: { "cancelled": true }.

Errors
StatusCodeWhen
404preview_not_foundNo preview with this id belongs to the calling credential.
409preview_consumedThe preview was already committed.
410preview_expiredThe preview is older than 15 minutes.

Public GitHub sources

A skill folder in a public GitHub repository can be imported at an exact commit. First discover the folders that contain a SKILL.md, then fetch one folder to get a ready-made import request, and pass that request to the import preview and commit. The folder is read from GitHub again at preview and at commit, so both calls can return the github_… errors listed here. The files of the folder are stored with the imported skill; a saved import does not follow later changes in the repository.

POST /api/skills/github-source

Discover or fetch a skill folder in a public GitHub repository

Reads the repository anonymously: no GitHub credential is accepted, and a private repository is reported as unavailable. discover resolves a branch, tag or commit to one commit and lists the folders that contain a SKILL.md. fetch reads one folder at that commit and returns an import request pinned to it; neither mode saves anything. A folder is limited to 100 files and 5 MiB, its SKILL.md to 64 KiB, and one call to 15 seconds.

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

Request body
NameTypeDescription
version required1Must be 1.
mode required"discover" | "fetch"Which of the two operations to run.
repository requiredstringThe public repository as owner/name. A URL is not accepted.
folder requiredstringFolder path inside the repository, without leading or trailing slashes and at most eight levels deep. An empty string means the repository root. In discover it narrows the search; in fetch it is the folder to import.
refstringdiscover only, required: the branch, tag or commit to resolve, at most 256 characters. Not allowed in fetch.
commitstringfetch only, required: the full 40-character lower-case commit id returned by discover. Not allowed in discover.

Returns: discover: { commit, folders, limits }, where folders lists folder itself and every folder below it that contains a SKILL.md (the repository root appears as an empty string). fetch: { request, manifest, limits }, where request is an import request (version, format, source, github) to send to the import preview, and manifest describes the folder (version, repository, commit, folder, sourceSha256, files with path, bytes, sha256, gitBlob and kind, license when the skill declares one, and manifestDigest). limits repeats the size and time limits that apply.

Errors
StatusCodeWhen
400invalid_github_sourceThe body is malformed, contains an unknown field, or mixes ref and commit with the wrong mode.
400credentialThe request, a file name or a file in the folder matches a credential pattern.
400invalid_importfetch: the folder's SKILL.md is not a valid skill document, or its name differs from the name of the folder. Parser findings are listed in issues.
400github_unsafe_entryThe repository redirects, or the folder contains a symlink, a submodule, a Git LFS pointer or an unsafe path.
404github_public_source_unavailableThe repository, reference or folder was not found or is private, or the fetched folder has no SKILL.md of its own.
413github_limitThe repository or folder exceeds one of the limits in limits.
429github_rate_limitGitHub is rate limiting anonymous requests. Retry later.
502github_upstreamGitHub could not be reached or returned an inconsistent response.
504github_timeoutGitHub did not answer within 5 seconds for one request or 15 seconds overall.
Request
curl -X POST https://centerofagentic.com/api/skills/github-source \
  -H "Authorization: Bearer $COA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"version":1,"mode":"discover","repository":"example-org/agent-skills","ref":"main","folder":""}'
Response
{
  "commit": "1373f0c6fc4273b98b263d4b871fd35fbbdebce0",
  "folders": ["skills/report-review", "skills/ticket-triage"],
  "limits": {
    "skillBytes": 65536,
    "files": 100,
    "folderBytes": 5242880,
    "depth": 8,
    "entries": 2000,
    "requests": 128,
    "concurrency": 4,
    "requestMs": 5000,
    "totalMs": 15000,
    "metadataBytes": 1048576,
    "wireBytes": 16777216,
    "chunkBytes": 262144
  }
}

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