Context Repository API
Context Repository's published customer API, one page per operation.
This reference is generated from Context Repository's own GET /v1/product-openapi.json, so it cannot drift from what the service serves. The raw document is served at /openapi/context-repository.json.
Context Repository is the part of Coelevate that holds a project's context — skills, knowledge, memories and tools — as versioned assets, and the kits that select which of them an agent is served. This is its customer API: read and search that context, inspect releases and their tags, stage changes for review, settle a change request by approving or rejecting its ops and merging or closing it, and write kits and gaps directly. A key that can only stage a change can propose it and cannot land it: deciding, merging and closing need the review scope, kit writes need the kits scope and gap writes need the gaps scope.
Calling the API
The examples on each page use these shell variables:
export API_URL="<the Context Repository address your key panel shows>" # no trailing slash
export PROJECT_ID="<your project id>"
export TOKEN="<a bearer token, below>"Authentication
A short-lived access token, obtained by exchanging an API key with the OAuth 2.0 client-credentials grant. Send it as Authorization: Bearer <token>. Each operation lists the scope the token must carry; there are five, and none implies another: context:read reads context; context:assets stages a change for review and never decides, merges or closes one; context:review approves or rejects staged ops and merges or closes the change request; context:kits writes kits directly and context:gaps records and closes gaps directly, each of which takes effect at once and bypasses the changeset.
Exchange your API key for a token at the token address your key panel shows, with the OAuth 2.0 client-credentials grant, asking for the scopes you need (context:read, context:assets, context:review, context:kits and context:gaps, separated by a space when you ask for several): read reads context, write stages changes for review, review decides, merges and closes a change request, kits writes kits directly, and gaps records and closes gaps directly. A token issued for another Coelevate API, such as the A2A one, is not accepted here. Staging a change needs both scopes in practice, because you read the open changeset (read) before you write to it (write).
A request that fails authentication returns 401; one whose token lacks the operation's scope returns 403; an unknown project, or a token for a different project, returns 404.
Operations
| Operation | Request | Scope |
|---|---|---|
| List asset types | GET /context/v1/asset-types | context:read |
| List assets | GET /context/v1/assets | context:read |
| Get several assets by id | GET /context/v1/assets/by-id | context:read |
| Get an asset | GET /context/v1/assets/{asset_id} | context:read |
| Get the open changeset | GET /context/v1/changeset | context:read |
| Close the change request | POST /context/v1/changeset/close | context:review |
| Decide every undecided op | POST /context/v1/changeset/decide-outstanding | context:review |
| Decide several staged ops | POST /context/v1/changeset/decisions | context:review |
| Merge the change request | POST /context/v1/changeset/merge | context:review |
| Get staged ops | GET /context/v1/changeset/ops | context:read |
| Stage ops | POST /context/v1/changeset/ops | context:assets |
| Remove a staged op | DELETE /context/v1/changeset/ops/{op_id} | context:assets |
| Decide one staged op | POST /context/v1/changeset/ops/{op_id}/decision | context:review |
| List changesets | GET /context/v1/changesets | context:read |
| Get an object's revisions | GET /context/v1/context-history/{object_id} | context:read |
| Trace where a version came from | GET /context/v1/context-history/{object_id}/lineage | context:read |
| List the sources behind an object | GET /context/v1/context-history/{object_id}/sources | context:read |
| Get an object's version history | GET /context/v1/context-versions/{object_id} | context:read |
| List gaps | GET /context/v1/gaps | context:read |
| Record a gap | POST /context/v1/gaps | context:gaps |
| Get a gap | GET /context/v1/gaps/{gap_id} | context:read |
| Change a gap | PATCH /context/v1/gaps/{gap_id} | context:gaps |
| Get a gap's journal | GET /context/v1/gaps/{gap_id}/journal | context:read |
| Retire a gap | POST /context/v1/gaps/{gap_id}/retire | context:gaps |
| Revert a gap to an earlier version | POST /context/v1/gaps/{gap_id}/revert | context:gaps |
| List kits | GET /context/v1/kits | context:read |
| Create a kit | POST /context/v1/kits | context:kits |
| Retire a kit | DELETE /context/v1/kits/{kit_id} | context:kits |
| Get a kit | GET /context/v1/kits/{kit_id} | context:read |
| Change a kit's own fields | PATCH /context/v1/kits/{kit_id} | context:kits |
| Get a kit's changelog | GET /context/v1/kits/{kit_id}/changelog | context:read |
| Export a kit | GET /context/v1/kits/{kit_id}/export | context:read |
| Get a kit with its assets | GET /context/v1/kits/{kit_id}/full | context:read |
| Get a kit's journal | GET /context/v1/kits/{kit_id}/journal | context:read |
| Add assets to a kit | POST /context/v1/kits/{kit_id}/members | context:kits |
| Remove an asset from a kit | DELETE /context/v1/kits/{kit_id}/members/{asset_id} | context:kits |
| Revert a kit to an earlier version | POST /context/v1/kits/{kit_id}/revert | context:kits |
| Get the project this key belongs to | GET /context/v1/project | context:read |
| List releases | GET /context/v1/releases | context:read |
| Get a release | GET /context/v1/releases/{release} | context:read |
| Replace a release's tags | PUT /context/v1/releases/{release}/tags | context:assets |
| Remove a tag from a release | DELETE /context/v1/releases/{release}/tags/{tag} | context:assets |
| Add a tag to a release | POST /context/v1/releases/{release}/tags/{tag} | context:assets |
| Search the project's context | POST /context/v1/search | context:read |