AchiralAchiral

Docs · LLMs and developers

Version3.14.0

Choose how long each kind of memory stays available for recall before retention marks it as expired.

Retention

Retention takes old memory out of recall on a schedule. Retention keeps the underlying record when a memory expires. A separate data erasure request can permanently delete it.

Manage retention under Settings > General > Retention, at https://{your-slug}.achiral.ai/settings/general/retention.

Who can change it

  • The owner turns retention on or off and sets each period.
  • Admins can open the page and run Preview, but can't change anything.

Turn it on

Retention is off for every organization until the owner switches Retention on. While it is off, nothing leaves recall, whatever the periods say.

Periods

Each kind of memory has its own Keep for period: Forever, 30 days, 90 days, 180 days, 1 year or 2 years. A period set through the API to another number of days shows as that number.

Kind of memoryDefaultAge is measured from
Conversation summaries1 yearWhen the summary was written
Conversation transcripts180 daysWhen the conversation happened
Chat messages2 yearsWhen the message was sent
Decisions2 yearsWhen the decision was made
PreferencesForeverWhen the preference was saved
KnowledgeForeverWhen the knowledge was added

Changes save as soon as you pick a period, and the toast offers Undo.

What happens to expired memory

Retention runs once a day at 03:00 UTC. For every kind of memory with a period other than Forever, it finds the memories older than that period and:

  • Memory (summaries, transcripts, decisions, preferences, knowledge) is tombstoned. It drops out of recall and search for Chiro, assistants and agents, and keeps its content, its provenance and a record of why it left: deletedBy: retention-policy and deleteReason: retention_expired.
  • Chat messages are marked deleted. Conversations stop showing them, and their text is kept.

Training data is not covered by retention.

Preview

Preview counts, for each kind of memory, how much would leave recall if retention ran now with the periods shown. It works while retention is off, so the owner can check the effect before switching it on, and it never changes anything.

The date of the last run shows beside Preview once retention has run.

API

The page uses the compliance API. The API uses the organization in your session. If the session has none, pass organizationSlug as a query parameter.

MethodPathWho
GET/api/compliance/retentionOwner and admins
PUT/api/compliance/retentionOwner
POST/api/compliance/retention/previewOwner and admins

All endpoints under /api/compliance/ share a limit of 20 requests per IP address in a rolling 15-minute window. Calls from the settings page count toward the same limit. If you reach it, the next request returns HTTP 429 with the message “Too many compliance requests, please try again later.” Retry once an earlier request falls outside the window.

Both fields in a PUT request are optional. Omitted fields and individual policy keys keep their current values.

  • retentionEnabled (boolean) turns retention on or off.
  • retentionPolicies (object) sets the period in days for each key you supply. Use a non-negative number, with 0 for Forever. The keys for memory and messages are conversationMemory, tenantConversations, chatMessages, decisionLog, userPreferences, and domainKnowledge. The API also accepts and saves tenantTrainingData, but retention skips training data even when you set a period.

An unknown policy key, a negative period, or a value other than a number returns HTTP 400. Correct the key or value and resend the update.

POST /preview returns a preview object. Each entry reports wouldTombstone (the number of records that would expire) or skipped with a reason, such as indefinite retention or a collection without a tombstone field.