Persistent Memory
Reliant stores validated conversation turns in your own database and automatically injects the recent history as context on every subsequent call — giving your agents stateful, per-user memory without any external service.
How it works
Each call that has memory active produces a conversation_id. After the LLM output is validated, the user input and the validated JSON are stored as a turn. On the next call for the same user, the last N turns are prepended to the prompt as read-only context — the system prompt (and all its validation rules) remains untouched, so retries, fallbacks, and quality checks work exactly the same as without memory.
Enabling memory
Memory activates when both conditions are met in the same request:
end_user_idoptions.memory: true in the request body (ad-hoc per call).Option A — Enable on the schema (recommended)
In the dashboard under Schemas, edit your schema and toggle Memory enabled. Every execute call for that schema that includes end_user_id will automatically use memory. You can also configure the memory window (number of turns to inject) per schema.
Option B — Force-enable per request
Pass options.memory: true in the request body to enable memory for that single call, even if the schema does not have it on.
Response
When memory is active, the response includes a conversation_id both at the top level and inside metadata.
Multiple threads with external_id
If the same user needs independent memory threads — for example, separate support tickets or independent chat sessions — pass a different external_id for each thread. Memory is scoped by (project + schema + end_user_id + external_id), so threads never mix.
Full example — stateful extraction
Limits
| Parameter | Default | Description |
|---|---|---|
| Memory window | 10 turns | Number of recent turns injected as context. Configurable per schema. |
| Max per stored turn | 4,000 chars | Content exceeding this is truncated before storage. |
| Max injected context | 24,000 chars | Total history block injected per call. Older turns are omitted if exceeded. |
Security and isolation
Memory is scoped by (project + schema + end_user_id + external_id). It is physically impossible for one user's history to appear in another user's context. Memory is stored in your own database (Railway PostgreSQL) — no data leaves your infrastructure.
The injected history is marked as read-only context and the LLM is explicitly instructed to never follow instructions found inside it. Only the system prompt has authority. This prevents memory-poisoning attacks where a malicious user turn tries to override the schema rules.
Managing memory
In the dashboard, go to Memory to see all active conversation threads, inspect individual turns, and erase a user's memory when needed (e.g. GDPR right-to-erasure requests).