CortexDB Docs
Docs for CortexDB 0.12.8, the version running on CortexDB Cloud (api.cortexdb.ai).
Integrations

n8n

Capture and recall CortexDB memory from n8n workflows via the HTTP Request node.

n8n talks to CortexDB through the HTTP Request node — no package required. Use the REST API directly.

Capture an experience

HTTP Request node → POST https://api-v1.cortexdb.ai/v1/experience, headers Authorization: Bearer {{$env.CORTEX_TOKEN}} + X-Cortex-Actor: user:alice, JSON body:

{
  "scope": "org:acme/user:alice",
  "modality": "conversation",
  "content": { "kind": "text", "text": "={{ $json.message }}" },
  "context": { "observed_at": "={{ $now.toISO() }}" },
  "idempotency_key": "={{ $json.id }}"
}

modality is valid in the REST body

The REST body takes a modality field (the Python SDK's experience() fills it for you, or takes an optional modality=) — the n8n envelope above is correct as written.

Recall

HTTP Request node → POST /v1/recall with body { "scope": "org:acme/user:alice", "view": "holistic", "query": "={{ $json.query }}", "diagnostics": "none" }, then read {{ $json.context_block }} downstream.

See also

On this page