Get a kit with its assets
Returns one kit together with the body of every asset it holds, grouped by type, in one call.
GET /context/v1/kits/{kit_id}/full
Returns one kit together with the body of every asset it holds, grouped by type, in one call. Pass release or tag to read the assets as a release published them; the kit's own members are always the version named by version, or the current one. An unknown release is a 404.
Requires the context:read scope.
Parameters
| Parameter | Location | Required | Description |
|---|---|---|---|
kit_id | path | yes | The kit's id. |
version | query | no | Read this version of the kit instead of the current one. |
release | query | no | Read the kit's assets as this release published them. Omit for the latest state. |
tag | query | no | Resolve the kit's assets as the release holding this tag published them. A tag no release holds is a 404. Cannot be combined with release. |
Responses
| Status | Meaning |
|---|---|
200 | The request succeeded. |
401 | The token is missing, expired or invalid. |
403 | The token does not carry the scope this operation requires. |
404 | No such project, or the token belongs to a different project. |
422 | The request was not valid: a parameter or the body failed validation. |
The 200 response body:
| Field | Type | Required | Description |
|---|---|---|---|
assets | map of object | yes | Every served asset keyed by its id. Each asset's fields depend on its type. |
kit | KitResponse | yes | The kit itself. |
kit_id | string | yes | The kit's id. |
members | map of array of string | yes | The ids of what the kit served, grouped by asset type. |
resolved | ResolvedRelease or null | no | The release the assets were read at, with its tags. |
Shapes
The named shapes used above.
KitResponse
A context kit: a named, versioned selection of assets an agent is given for a kind of work. A kit is not an asset: it has its own versions and its own change journal, and a release never changes one.
| Field | Type | Required | Description |
|---|---|---|---|
auto_maintain | boolean | yes | Whether the kit has opted in to automatic upkeep of its members. Off by default. |
description | string | yes | What the kit is for. |
entries | array of KitEntry | yes | The kit's skills and the tools each binds. |
gaps | array of object | yes | Knowledge gaps the kit carries. |
id | string | yes | The kit's id. |
ignored_members | array of KitIgnoredMemberRecord | yes | Members the release this read named could not serve, with the reason. Empty when nothing was skipped. |
last_changed_by | string or null | no | Who last changed the kit. |
last_changed_by_kind | string or null | no | person or automation. |
last_updated | string or null | no | When the kit last changed. |
last_updated_by | string or null | no | Whether a person (human) or an automation (ai) last changed the kit. |
member_cards | map of array of AssetCard or null | no | The short form of each served asset, grouped by asset type. |
member_roles | map of string | yes | For each kind of asset id, the role a kit holds it in. |
members | array of KitMemberRecord | yes | What this version of the kit holds, in serving order. |
members_by_type | map of array of string | yes | The ids of the assets the kit served at that release, grouped by asset type. |
metadata | map of string | yes | The kit's free-form key-value pairs. |
name | string or null | no | The kit's canonical name, projects/{project}/kits/{id}. A request that takes a kit id in its body or query accepts this name in its place; a URL path takes the bare id. It is null when the id cannot be written in a canonical name. |
project_id | string | yes | The project the kit belongs to. |
release | integer or null | no | The release this read resolved the kit's assets at. |
retired | boolean | yes | Whether the kit has been retired. |
tags | array of string | yes | The kit's free-form labels. |
title | string | yes | The kit's title. |
version | integer | yes | The kit's version. It moves when the kit's fields or its members change. |
versions | array of integer or null | no | Every version the kit has had. Present when a kit is read. |
KitEntry
A skill a kit holds and the tools it binds.
| Field | Type | Required | Description |
|---|---|---|---|
skill_id | string | yes | The skill's id. |
skill_name | string | yes | The skill's name. |
tool_ids | array of string | yes | The ids of the tools the skill binds. |
KitIgnoredMemberRecord
A held asset the kit did not serve at the release the read named, and why.
| Field | Type | Required | Description |
|---|---|---|---|
member | KitMemberRecord | yes | The held asset. |
reason | string | yes | retired (a release retired it and nothing replaced it), superseded (a release retired it and the successors below were served in its place) or unpublished (the pinned release does not contain it yet). |
successor_ids | array of string | yes | The assets served in its place, in order. Empty unless superseded. |
KitMemberRecord
One asset a kit holds.
| Field | Type | Required | Description |
|---|---|---|---|
asset_id | string | yes | The held asset's id. |
asset_kind | string | yes | The kind the id names: skill, knowledge, tool, gap, memory, example, pointer or asset. |
rank | integer | yes | Its place within the role. Ranks are sparse, so an asset can be put between two others without renumbering them. |
role | string | yes | How the kit holds it: contains, offers or carries. |
AssetCard
The short form of an asset: enough to show it in a list without reading its body.
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | The asset's id. |
summary | string or null | no | A one- or two-line summary, or null when the asset's type has none. |
tags | array of string | yes | The asset's tags. |
title | string or null | no | A short title, or null when the asset's type has none. |
ResolvedRelease
The release a read was resolved at.
| Field | Type | Required | Description |
|---|---|---|---|
tags | array of string | yes | The tags that release carries. |
version | integer | yes | The release number. |
Example
curl -sS "$API_URL/context/v1/kits/$KIT_ID/full" \
-H "Authorization: Bearer $TOKEN"