v1

latestOpenAPI 3.1.0BUSL-1.12026-07-1756132288.0 KB

Query memory and return formatted context for LLM prompt injection

post/api/v1/{context_id}/context

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' | 'full_context' 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.