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 sendcontent (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.
Scoping
| Scope | Source |
|---|---|
| Organization | From your API key — never sent in the request body |
agent_id | You — identifies which agent owns the memory |
user_id | You — your app’s user id |
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/memories → 202 with { "id": "...", "status": "queued" }.
Processing (embedding, ranking metadata) runs in the background. Do not assume the memory is searchable in the same millisecond.
Search
POST /v1/memories/search → 200 with ranked results.
| Field | Default | Notes |
|---|---|---|
query | required | Natural language, max 2048 chars |
k | 10 | 1–100 |
task_context | — | Optional; improves ranking for the current task |
level | all | 0, 1, or 2 to filter |
content, score, importance, and created_at.
Typical loop
- Search for context when a session starts or before an LLM call.
- After a turn worth remembering, call
add. - Inject search results into the prompt.
Delete
DELETE /v1/memories/{id} — soft delete by default (excluded from search).
DELETE /v1/memories/{id}?hard=true — permanent erasure (GDPR). Irreversible.