Overview
Receiptor AI separates:- chat history
- execution state
- approval state
- learning evidence
- long-term memory
ai-memories.
What ai-memories is
ai-memories stores reusable behavior and preferences that the system can apply across sessions.
It is intentionally separate from:
- Redis chat history
- LangGraph thread checkpoints
- approval request persistence
correction-events
correction-events is the learning log. ai-memories is the durable memory layer that agents and ECR can actually use.
What is implemented today
Todayai-memories is used in two ways:
- explicit memory saved through
memories.save - candidate memory promotion from repeated
correction-events - assistant-facing review and removal through
memories.listandmemories.archive
active memories in:
- the web assistant
- the WhatsApp assistant
- the ECR extraction pipeline
Memory model
Each memory record has:scopeuserorgdocumentagent
kind- implemented in current runtime surfaces:
preferencecanonical_mappingworkflow_hintintegration_preference
- reserved in the shared schema for future workflow intelligence:
approval_policy_hintplaybook
- implemented in current runtime surfaces:
sourceuser_declaredmanual_correctionapproval_historysystem
statusactivecandidaterejectedarchived
Current rules
Workspace-first behavior
Operational memories are workspace-scoped by default.- promoted merchant/category/integration/workflow memories are
orgscoped userscope is only allowed for explicitpreferencememories- document-scoped memories still require workspace context
- memory operations require
orgId
Activation behavior
- promotion currently creates
candidatememories only - only
activememories are injected into runtime context - nothing auto-activates from a single correction or approval outcome
What we currently save
preference
Current use:
- explicit user-declared memory
- response style preferences
- presentation preferences
- narrow personal assistant behavior
user,org, ordocument
canonical_mapping
Current use:
- promoted from repeated merchant/category corrections
- explicit merchant/account categorization memories saved by the assistant after resolving the active workspace chart of accounts
- merchant canonicalization
- preferred chart-of-accounts category/account for a merchant
org
- when a user asks the assistant to remember a categorization like “classify Vercel as software”, the assistant should first resolve the active workspace chart of accounts
- those memories should be saved as structured
canonical_mappingrecords, not as free-textpreferencerecords
workflow_hint
Current use:
- promoted from repeated approval rejection feedback
- preview first
- show original before changing
org
integration_preference
Current use:
- promoted from repeated approved integration targets
org
Reserved kinds
playbook and approval_policy_hint remain in the shared schema as reserved
types for future workflow intelligence. They are not currently accepted by the
memory capability surface, promoted by the learning system, or consumed by
runtime retrieval.
Where each type is used today
Web assistant
The web assistant readsactive memories and injects them into planning context.
Currently relevant:
preferencecanonical_mappingworkflow_hintintegration_preference
WhatsApp assistant
The WhatsApp assistant uses the same long-term memory context model as the web assistant. Currently relevant:preferencecanonical_mappingworkflow_hintintegration_preference
ECR
ECR readsactive memories and turns them into:
promptHintsroutingHintsentityHintsnormalizationHints
canonical_mapping- merchant normalization
- category preference normalization
workflow_hint- prompt hints
- routing hints
- sender-domain hints
integration_preference- normalization context for downstream integration-aware behavior
preference- prompt hints only