Expand description
Semantic, hash-chained memory for long-running agents.
mentisdb provides an append-only, adapter-backed memory log for
durable, queryable cognitive state. Thoughts are timestamped, hash-chained,
typed, optionally connected to prior thoughts, and exportable as prompts or
Markdown memory snapshots. The current default backend is binary, but the
chain model is intentionally independent from any single storage format.
Modules§
- cli
- Shared CLI helpers for
mentisdbdsetup and wizard subcommands. - integrations
- Host-agent integration models for MentisDB setup, detection, and writes.
- paths
- Cross-platform path resolution helpers for MentisDB and host integrations.
- search
- Search-specific derived state and ranking helpers.
- server
- HTTP servers for exposing MentisDB as MCP and REST services.
Structs§
- Agent
Public Key - Public verification key associated with an agent identity.
- Agent
Record - Registry entry describing one durable agent identity.
- Agent
Registry - Per-chain registry of the agents that have written thoughts.
- Binary
Storage Adapter - Append-only binary storage adapter for MentisDb.
- Jsonl
Storage Adapter - Append-only JSONL storage adapter for MentisDb.
- Mentis
Db - Append-only, hash-chained semantic memory store.
- Mentis
DbMigration Report - Summary of a successful chain migration.
- Mentis
DbRegistration - Metadata describing one registered thought chain.
- Mentis
DbRegistry - Registry of all known thought chains in one storage directory.
- Ranked
Search Graph - Graph-expansion configuration for ranked search.
- Ranked
Search Hit - One ranked-search hit.
- Ranked
Search Query - Request for ranked retrieval over committed thoughts.
- Ranked
Search Result - Ranked-search response over committed thoughts.
- Ranked
Search Score - Score breakdown for one ranked-search hit.
- Skill
Document - Structured representation of a parsed skill file.
- Skill
Entry - One skill entry containing immutable uploaded versions plus lifecycle status.
- Skill
Query - Query parameters for
SkillRegistry::search_skills. - Skill
Registry - Durable, append-only skill registry backed by a versioned binary storage file.
- Skill
Registry Manifest - Machine-readable description of the skill-registry schema and searchable fields.
- Skill
Registry Migration Report - Report produced by a skill registry migration pass.
- Skill
Section - One heading-delimited section of a structured skill document.
- Skill
Summary - Lightweight searchable summary of one stored skill.
- Skill
Upload - Upload request for one new immutable skill version.
- Skill
Version - One immutable uploaded skill version.
- Skill
Version Summary - Lightweight summary of one immutable skill version.
- Thought
- A single durable thought record.
- Thought
Input - Builder-like input struct used to append rich thoughts.
- Thought
Query - Retrieval filter for semantic memory queries.
- Thought
Relation - Typed edge in the thought graph.
- Thought
Time Window - Numeric time window used to derive inclusive
since/untilbounds. - Thought
Traversal Cursor - Stable cursor for continuing append-order traversal.
- Thought
Traversal Page - One page of append-order traversal results.
- Thought
Traversal Request - Request for append-order traversal over committed thoughts.
- Vector
Search Hit - One vector-search hit.
- Vector
Search Query - Request for vector similarity retrieval over committed thoughts.
- Vector
Search Result - Vector-search response over committed thoughts.
Enums§
- Agent
Status - Current status of an agent record in the registry.
- Mentis
DbMigration Event - Progress notifications emitted during migration.
- Public
KeyAlgorithm - Supported public-key algorithms for agent identity records.
- Ranked
Search Backend - Ranking backend used to order ranked-search results.
- Skill
Format - Supported import and export formats for skill documents.
- Skill
Status - Lifecycle state of a stored skill entry.
- Skill
Version Content - The stored content form for a single skill version.
- Storage
Adapter Kind - Supported durable storage formats for MentisDb.
- Thought
Relation Kind - Why a thought points to another thought.
- Thought
Role - Operational role of a thought inside the system.
- Thought
Traversal Anchor - Stable locator for one committed thought.
- Thought
Traversal Direction - Direction for append-order thought traversal.
- Thought
Type - Semantic category describing what changed in the agent’s internal model.
- Time
Window Unit - Unit for numeric time-window traversal filters.
- Vector
Search Error - Failure while rebuilding or querying a vector sidecar.
Constants§
- FLUSH_
THRESHOLD - Number of deferred appends before the write buffer is flushed to disk.
- MENTISDB_
CURRENT_ VERSION - Alias for the latest supported MentisDb storage schema version.
- MENTISDB_
SCHEMA_ V0 - Legacy MentisDb storage schema version.
- MENTISDB_
SCHEMA_ V1 - First registry-backed MentisDb storage schema version.
- MENTISDB_
SCHEMA_ V2 - Schema version 2: adds
ThoughtType::Reframe,ThoughtRelationKind::Supersedes, and optional cross-chainThoughtRelation::chain_key. - MENTISDB_
SKILL_ CURRENT_ SCHEMA_ VERSION - Alias for the current structured skill schema version.
- MENTISDB_
SKILL_ REGISTRY_ CURRENT_ VERSION - Alias for the current persisted skill registry file version.
- MENTISDB_
SKILL_ REGISTRY_ V1 - First supported version of the persisted skill registry file.
- MENTISDB_
SKILL_ REGISTRY_ V2 - Second version of the persisted skill registry file — introduces delta/diff content storage and optional signing.
Traits§
- Storage
Adapter - Persistence interface for MentisDb storage backends.
Functions§
- chain_
filename - Stable filename derived from a chain key rather than mutable agent profile data.
- chain_
key_ from_ storage_ filename - Recover the stable chain key portion from a MentisDb storage filename.
- chain_
storage_ filename - Stable filename derived from a chain key and storage adapter kind.
- deregister_
chain - Remove a chain from the registry and delete its storage file from disk.
- export_
skill - Export a structured
SkillDocumentthrough the requested adapter. - import_
skill - Import a skill file through the requested adapter into the structured
SkillDocumentmodel. - load_
registered_ chains - Load the registry of all known thought chains for a storage directory.
- migrate_
registered_ chains - Migrate all legacy v0 chain files in a storage directory to the current format.
- migrate_
registered_ chains_ with_ adapter - Migrate all legacy v0 chain files in a storage directory to the current format and target storage adapter.
- migrate_
skill_ registry - Migrates the skill registry file at
chain_dirfrom V1 to the current V2 format, if needed. - refresh_
registered_ chain_ counts - Refresh stale
thought_countandagent_countvalues in the on-disk registry by opening each registered chain and reading live counts. - signable_
thought_ payload - Render the deterministic signable payload for a proposed thought append.