Skip to main content

Module agenticdb

Module agenticdb 

Source
Expand description

AgenticDB API Compatibility Layer

§⚠️ CRITICAL WARNING: PLACEHOLDER EMBEDDINGS

THIS MODULE USES HASH-BASED PLACEHOLDER EMBEDDINGS - NOT REAL SEMANTIC EMBEDDINGS

The generate_text_embedding() function creates embeddings using a simple hash function that does NOT understand semantic meaning. Similarity is based on character overlap, NOT meaning.

For Production Use:

  • Integrate a real embedding model (sentence-transformers, OpenAI, Anthropic, Cohere)
  • Use ONNX Runtime, candle, or Python bindings for inference
  • See /examples/onnx-embeddings for a production-ready integration example

What This Means:

  • “dog” and “cat” will NOT be similar (different characters)
  • “dog” and “god” WILL be similar (same characters, different order)
  • Semantic search will not work as expected

Provides a drop-in replacement for agenticDB with 5-table schema:

  • vectors_table: Core embeddings + metadata
  • reflexion_episodes: Self-critique memories
  • skills_library: Consolidated patterns
  • causal_edges: Cause-effect relationships with hypergraphs
  • learning_sessions: RL training data

Structs§

AgenticDB
Main AgenticDB interface
CausalEdge
Causal edge in the hypergraph
Experience
Single RL experience
LearningSession
Learning session for RL training
PolicyAction
Policy action with reward information
PolicyEntry
Policy entry combining state and action
PolicyMemoryStore
Policy Memory Store interface for AI agent policy memory
Prediction
Prediction with confidence interval
ReflexionEpisode
Reflexion episode for self-critique memory Note: Serialized using JSON (not bincode) due to serde_json::Value in metadata field
SessionStateIndex
Session State Index for real-time session context
SessionTurn
Session turn entry
Skill
Skill definition in the library
UtilitySearchResult
Query result with utility score
WitnessEntry
Witness log entry with hash chain
WitnessLog
Witness Log for cryptographically-linked audit trail