Skip to main content

Crate sediment

Crate sediment 

Source
Expand description

Sediment: Semantic memory for AI agents

A local-first, MCP-native vector database for AI agent memory.

§Features

  • Embedded storage - LanceDB-powered, directory-based, no server required
  • Local embeddings - Uses all-MiniLM-L6-v2 locally, no API keys needed
  • MCP-native - 4 tools for seamless LLM integration
  • Project-aware - Scoped memories with automatic project detection
  • Auto-chunking - Long content is automatically chunked for better search

Re-exports§

pub use chunker::ChunkResult;
pub use chunker::ChunkingConfig;
pub use chunker::chunk_content;
pub use db::Database;
pub use document::ContentType;
pub use embedder::EMBEDDING_DIM;
pub use embedder::Embedder;
pub use error::Result;
pub use error::SedimentError;
pub use item::Chunk;
pub use item::ConflictInfo;
pub use item::Item;
pub use item::ItemFilters;
pub use item::SearchResult;
pub use item::StoreResult;
pub use retry::RetryConfig;
pub use retry::with_retry;

Modules§

access
Access tracking for memory decay scoring.
chunker
Chunking logic for splitting documents into searchable pieces
consolidation
Memory consolidation: auto-merging duplicates and linking related items.
db
Database module using LanceDB for vector storage
document
Content type for chunking
embedder
error
graph
Graph store using SQLite for relationship tracking between memories.
item
Unified Item type for semantic storage
mcp
MCP (Model Context Protocol) server implementation
retry
Retry utilities with exponential backoff

Structs§

ProjectConfig
Project configuration stored in .sediment/config

Enums§

ListScope
Scope for listing items (recall always searches all with boosting)
StoreScope
Scope for storing items

Functions§

boost_similarity
Apply similarity boosting based on project context.
central_db_path
Get the central database path.
clear_migration_marker
Clear the migration marker after LanceDB items have been updated.
default_db_path
Get the default global database path (alias for central_db_path for backwards compatibility)
derive_git_root_commit
Derive a stable project ID from the git repository’s initial (root) commit hash.
find_project_root
Find the project root by walking up from the given path.
get_or_create_project_id
Get or create the project ID for a given project root.
init_project
Initialize a project directory for Sediment.
pending_migration
Check if a project ID migration is pending (UUID→git hash).