Coelevate Documentation
API ReferenceContext Repository

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

OperationRequestScope
List asset typesGET /context/v1/asset-typescontext:read
List assetsGET /context/v1/assetscontext:read
Get several assets by idGET /context/v1/assets/by-idcontext:read
Get an assetGET /context/v1/assets/{asset_id}context:read
Get the open changesetGET /context/v1/changesetcontext:read
Close the change requestPOST /context/v1/changeset/closecontext:review
Decide every undecided opPOST /context/v1/changeset/decide-outstandingcontext:review
Decide several staged opsPOST /context/v1/changeset/decisionscontext:review
Merge the change requestPOST /context/v1/changeset/mergecontext:review
Get staged opsGET /context/v1/changeset/opscontext:read
Stage opsPOST /context/v1/changeset/opscontext:assets
Remove a staged opDELETE /context/v1/changeset/ops/{op_id}context:assets
Decide one staged opPOST /context/v1/changeset/ops/{op_id}/decisioncontext:review
List changesetsGET /context/v1/changesetscontext:read
Get an object's revisionsGET /context/v1/context-history/{object_id}context:read
Trace where a version came fromGET /context/v1/context-history/{object_id}/lineagecontext:read
List the sources behind an objectGET /context/v1/context-history/{object_id}/sourcescontext:read
Get an object's version historyGET /context/v1/context-versions/{object_id}context:read
List gapsGET /context/v1/gapscontext:read
Record a gapPOST /context/v1/gapscontext:gaps
Get a gapGET /context/v1/gaps/{gap_id}context:read
Change a gapPATCH /context/v1/gaps/{gap_id}context:gaps
Get a gap's journalGET /context/v1/gaps/{gap_id}/journalcontext:read
Retire a gapPOST /context/v1/gaps/{gap_id}/retirecontext:gaps
Revert a gap to an earlier versionPOST /context/v1/gaps/{gap_id}/revertcontext:gaps
List kitsGET /context/v1/kitscontext:read
Create a kitPOST /context/v1/kitscontext:kits
Retire a kitDELETE /context/v1/kits/{kit_id}context:kits
Get a kitGET /context/v1/kits/{kit_id}context:read
Change a kit's own fieldsPATCH /context/v1/kits/{kit_id}context:kits
Get a kit's changelogGET /context/v1/kits/{kit_id}/changelogcontext:read
Export a kitGET /context/v1/kits/{kit_id}/exportcontext:read
Get a kit with its assetsGET /context/v1/kits/{kit_id}/fullcontext:read
Get a kit's journalGET /context/v1/kits/{kit_id}/journalcontext:read
Add assets to a kitPOST /context/v1/kits/{kit_id}/memberscontext:kits
Remove an asset from a kitDELETE /context/v1/kits/{kit_id}/members/{asset_id}context:kits
Revert a kit to an earlier versionPOST /context/v1/kits/{kit_id}/revertcontext:kits
Get the project this key belongs toGET /context/v1/projectcontext:read
List releasesGET /context/v1/releasescontext:read
Get a releaseGET /context/v1/releases/{release}context:read
Replace a release's tagsPUT /context/v1/releases/{release}/tagscontext:assets
Remove a tag from a releaseDELETE /context/v1/releases/{release}/tags/{tag}context:assets
Add a tag to a releasePOST /context/v1/releases/{release}/tags/{tag}context:assets
Search the project's contextPOST /context/v1/searchcontext:read