Skip to main content

Crate indra_db

Crate indra_db 

Source
Expand description

§indra_db

A content-addressed graph database for versioned thoughts.

indra_db combines git-like content-addressed storage with graph database semantics, enabling agents to maintain evolving knowledge graphs with full history and semantic search capabilities.

§Core Concepts

  • Thoughts: Content-addressed nodes with embeddings
  • Relations: Typed edges between thoughts (float to latest version)
  • Commits: Immutable snapshots of graph state
  • Branches: Named refs to commits, enabling parallel hypotheses

§Example

use indra_db::Database;

let mut db = Database::open_or_create(".indra")?;
let thought = db.create_thought("The cat sat on the mat")?;
db.commit("Initial thought")?;

Re-exports§

pub use embedding::Embedder;
pub use embedding::MockEmbedder;
pub use graph::TraversalDirection;
pub use model::Commit;
pub use model::Edge;
pub use model::EdgeType;
pub use model::Hash;
pub use model::Thought;
pub use model::ThoughtId;
pub use remote::refresh_access_token;
pub use remote::Auth;
pub use remote::CredentialStore;
pub use remote::Credentials;
pub use remote::PullResult;
pub use remote::Remote;
pub use remote::RemoteConfig;
pub use remote::SyncClient;
pub use remote::SyncConfig;
pub use remote::SyncState;
pub use remote::UserInfo;
pub use remote::DEFAULT_API_URL;
pub use search::SearchResult;
pub use store::ObjectStore;
pub use viz::VizCommit;
pub use viz::VizExport;
pub use viz::VizMeta;
pub use viz::VizThought;

Modules§

embedding
Pluggable embedding system
graph
Graph operations: traversal, neighbor queries, etc.
model
Core data model types for indra_db
ops
Git-like operations: branch, checkout, diff, merge
remote
Remote repository management
search
Search operations: vector search, keyword search
store
Content-addressed object store
trie
Merkle trie for structural sharing of graph state
viz
Visualization data types for Indra knowledge bases

Structs§

Database
The main database interface

Enums§

Error
Errors that can occur in indra_db operations

Constants§

MAGIC
Magic bytes for file identification
VERSION
Database version for format compatibility

Type Aliases§

Result
Result type alias for indra_db operations