Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.thrindex.com/llms.txt

Use this file to discover all available pages before exploring further.

Memory

A memory is a text fact tied to an agent and a user. You send content (max 8 KB), plus agent_id and user_id. Optional: metadata (JSON), confidence (0–1, default 1). Write short, factual sentences — one idea per memory when you can.
User prefers weekly email digests.
User timezone is Europe/Berlin.

Scoping

ScopeSource
OrganizationFrom your API key — never sent in the request body
agent_idYou — identifies which agent owns the memory
user_idYou — your app’s user id
Search only returns memories for the agent_id and user_id you pass. Keys cannot access another organization’s data. agent_id and user_id: required on write and search, max 256 chars, charset [A-Za-z0-9._:-].

Write

POST /v1/memories202 with { "id": "...", "status": "queued" }. Processing (embedding, ranking metadata) runs in the background. Do not assume the memory is searchable in the same millisecond. POST /v1/memories/search200 with ranked results.
FieldDefaultNotes
queryrequiredNatural language, max 2048 chars
k101–100
task_contextOptional; improves ranking for the current task
levelall0, 1, or 2 to filter
Each result includes content, score, importance, and created_at.

Typical loop

  1. Search for context when a session starts or before an LLM call.
  2. After a turn worth remembering, call add.
  3. Inject search results into the prompt.
Call the API from your backend only. Do not put API keys in browsers or mobile clients.

Delete

DELETE /v1/memories/{id} — soft delete by default (excluded from search). DELETE /v1/memories/{id}?hard=true — permanent erasure (GDPR). Irreversible.