Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

Get Context

Retrieve a single context from your wisdom graph.

GET/v1/context/{graph_id}Get a single context by ID or name

Authentication

All requests require an Authorization: Bearer <agent-secret> header.

Query Parameters

NameTypeStatusDefaultDescription
context_idstringrequiredContext ID in "type:name" format.

Alternative Endpoints

Get by Name

GET/v1/context/{graph_id}?context_name={name}Get a context by name

Batch Get

POST/v1/context/{graph_id}/batchBatch get multiple contexts

Batch request body:

{
  "context_ids": ["skill:react_hooks", "skill:rust_lifetimes"]
}

Response

200Success
{
  "context_id": "skill:react_hooks",
  "context": {
    "context_type": "skill",
    "context_name": "react_hooks"
  },
  "locus_id": "locus_abc123",
  "payload": {
    "topic": "react_hooks",
    "value": "Use useCallback for memoized callbacks"
  }
}

Returns 404 when the requested context does not exist.

Examples

curl — Get by ID

curl -G "https://api.locusgraph.com/v1/context/graph_01" \
  -H "Authorization: Bearer <agent-secret>" \
  --data-urlencode "context_id=skill:react_hooks"

curl — Get by Name

curl -G "https://api.locusgraph.com/v1/context/graph_01" \
  -H "Authorization: Bearer <agent-secret>" \
  --data-urlencode "context_name=react_hooks"

curl — Batch Get

curl -X POST "https://api.locusgraph.com/v1/context/graph_01/batch" \
  -H "Authorization: Bearer <agent-secret>" \
  -H "Content-Type: application/json" \
  -d '{
    "context_ids": ["skill:react_hooks", "skill:rust_lifetimes"]
  }'

Related

List Contexts
Retrieve Memories