Field-by-field reference for the SQLite memory tables — the agents’ persistent knowledge graph.
Under review — agent memory may move to Convex
The agent-memory layer is likely to use Convex (native vector search, full-text search and the @convex-dev/agent component) rather than a separate SQLite service — Convex is already self-hosted, reactive and backed up. SQLite stays only as the embedded Convex backend store; pgvector / Qdrant is the graduation path at scale. The schema below is kept for reference and is revisited when the agentic layer is built.
SQLite stores the agents’ persistent knowledge as a lightweight knowledge graph around one central memory_items table — not raw market data. Every conclusion keeps its evidence; revisions are immutable.
Memory tables
memory_items
Field
Type
Description
id
string
Memory ID
memory_type
string
Episodic, semantic, procedural, experimental, human
entity_type
string
Token, opportunity, strategy, trade
entity_id
string, optional
Related operational entity
title
string
Memory title
summary
text
Concise knowledge
content
JSON
Structured memory content
importance
number
Importance score
confidence
number
Confidence score
valid_from
datetime, optional
Beginning of validity
valid_until
datetime, optional
End of validity
status
string
Active, superseded, invalidated, archived
source_type
string
Trade, experiment, human, agent
source_id
string, optional
Source entity
created_by
string
Human, agent or system
created_at
datetime
Creation date
updated_at
datetime
Last update
last_accessed_at
datetime, optional
Last retrieval
access_count
integer
Retrieval count
memory_relations
Field
Type
Description
id
string
Relation ID
source_memory_id
string
Source memory
target_memory_id
string
Target memory
relation_type
string
Supports, contradicts, caused, similar_to
strength
number
Relation strength
confidence
number
Confidence
created_by
string
Human, agent or system
created_at
datetime
Creation date
memory_evidence
Field
Type
Description
id
string
Evidence ID
memory_id
string
Related memory
evidence_type
string
Market data, trade, report, human note
source_reference
string
Operational or analytical reference
direction
string
Support, contradict, neutral
weight
number
Evidence weight
observed_at
datetime, optional
Evidence event time
summary
text
Evidence summary
data
JSON, optional
Structured evidence
created_at
datetime
Creation date
memory_embeddings
Field
Type
Description
memory_id
string
Related memory
embedding_model
string
Model used
embedding_version
string
Model/version identifier
embedding
vector/blob
Vector representation
content_hash
string
Detects outdated embedding
created_at
datetime
Creation date
memory_feedback
Field
Type
Description
id
string
Feedback ID
memory_id
string
Retrieved memory
workflow_run_id
string, optional
Workflow using memory
feedback_type
string
Useful, irrelevant, incorrect, outdated
score
number
Feedback score
note
text, optional
Explanation
created_by
string
Human or agent
created_at
datetime
Creation date
memory_revisions
Field
Type
Description
id
string
Revision ID
memory_id
string
Related memory
revision_number
integer
Revision
previous_content
JSON
Previous state
change_reason
text
Reason for change
changed_by
string
Human, agent or system
created_at
datetime
Revision date
memory_compaction_runs
Field
Type
Description
id
string
Compaction run ID
status
string
Running, complete, failed
scope
string
Token, strategy, period, global
source_memory_count
integer
Memories processed
created_memory_count
integer
Consolidated memories created
superseded_memory_count
integer
Memories superseded
summary
text
Compaction summary
started_at
datetime
Start time
completed_at
datetime, optional
Completion time
Structured first, vectors last
Retrieval prefers structured fields, then FTS5, then sqlite-vec similarity. memory_embeddings is optional and never replaces structured queries.