TrinaxAI’s memory system lets you store persistent facts, preferences, and decisions that are injected into the LLM context on every chat session. Memory entries are stored locally inDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/TrinaxCode/TrinaxAI/llms.txt
Use this file to discover all available pages before exploring further.
storage/user_memory.json and survive restarts. A separate LLM-generated summary (storage/user_memory_summary.json) condenses all entries into a short context paragraph that is automatically prepended to chat queries.
GET /v1/memory and GET /v1/memory/summary require authorization (localhost/LAN or X-Admin-Token). All write operations — POST, DELETE, and POST /v1/memory/refresh — also require authorization.GET /v1/memory
List all stored memory entries in insertion order.Response
Array of memory entry objects.
Example
Response
POST /v1/memory
Append a new persistent memory entry. The entry is immediately written to disk and included in future summary refreshes.Request body
The fact, preference, or decision to remember. Must be a non-empty string after trimming whitespace.
Optional list of string tags for categorization. Empty strings are ignored.
Response
The newly created memory entry object.Unique hex ID of the new entry.
The stored text, as provided.
Unix timestamp of creation.
The sanitized tags list.
Example
Response
DELETE /v1/memory/{memory_id}
Delete a single memory entry by its ID. If the ID does not exist, the response still returns200 with deleted: false.
Path parameters
The hex ID of the memory entry to delete.
Response
true if an entry with the given ID was found and removed. false if the ID was not found.Example
Response
POST /v1/memory/refresh
Re-summarize all stored memory entries into a short (3–5 sentence) context-injection note using the configured local LLM. The result is saved tostorage/user_memory_summary.json and will be used in subsequent chat sessions.
Response
Always
"refreshed" on success.The newly generated summary text. Empty string if there are no memory entries.
Number of memory entries that were summarized.
Example
Response
GET /v1/memory/summary
Read the current LLM-generated memory summary without triggering a refresh. The summary is pre-computed and served from disk, so this call is always fast.Response
The stored summary text, or an empty string if no summary has been generated yet.
Number of memory entries that the summary was built from.
Unix timestamp of when the summary was last generated.
0.0 if no summary exists yet.Example
Response
App State (Cross-Device Sync)
The app-state endpoints provide a lightweight key-value store (persisted tostorage/app_state.json) for syncing PWA settings, preferences, and UI state across devices connected to the same TrinaxAI host. All keys must begin with the tc- prefix.
GET /app-state
Read the shared app state. This endpoint is open — no authorization is required.Response
Always
true.Dictionary of
tc-* keys to string values. Returns an empty object {} if no state has been saved yet.Response
PUT /app-state
Merge new key-value pairs into the shared app state. Existing keys not present invalues are preserved. Only keys prefixed with tc- are accepted; others are silently ignored. The maximum payload size is 6 MB (configurable via TRINAXAI_APP_STATE_MAX_BYTES).
Requires authorization.
Request body
Object of
tc-* string keys to string values to merge into the shared state.Response
DELETE /app-state
Nuclear reset of the shared app state. Clears alltc-* values, cancels any running index jobs, stops the file watcher, unloads the retriever, and wipes the index storage directory. This is a full factory reset of the TrinaxAI runtime state on the host machine.
Required headers
| Header | Value |
|---|---|
X-Admin-Token | Your admin token (or localhost/LAN access) |
X-TrinaxAI-Confirm | Must be exactly reset-app-state |
Response