POST /api/v1/{context_id}/context

Changed on

Query memory and return formatted context for LLM prompt injection

Request

Path parameters

context_idstring required

Spectron context id

Request body

kinteger

Max hits to return (default 10, max 50).

labelsstring[]

Label filter (design §4): key=value strings the result rows must all carry; applied after the scope predicate (never widening).

querystring required
scopeViewstring nullable

Scope read breadth: strict (default) | merged | crossTeam (§7.1).

Response

contextstring required
queryMsinteger required
tier'direct' | 'cache' | 'hybrid' | 'escalated' required

Which tier resolved the query. Exposed on the response for the CLI's --tier flag (Phase 8) and so callers can tell when their query went all the way to tier 4.

Changes

    • warning

      added the new escalated enum value to the response property for the response status

    • info

      added the non-success response with the status

    • info

      removed the full_context enum value from the response property for the response status

    • warning

      added the new cache enum value to the response property for the response status

    • warning

      added the new direct enum value to the response property for the response status

    • warning

      added the new full_context enum value to the response property for the response status

    • warning

      added the new hybrid enum value to the response property for the response status