Skip to main content

Module agentdb

Module agentdb 

Source
Expand description

AgentDB adapter for pattern-aware tiering.

Provides a bridge between the TieredStore and an external HNSW vector index. When connected, tiering decisions can be influenced by semantic similarity to frequently-accessed patterns.

§Overview

Block metadata is converted into a compact 4-dimensional embedding via pattern_from_meta, then stored in a PatternIndex. The AdaptiveTiering struct combines the index with a TierConfig to produce tier suggestions based on weighted neighbor voting.

The default InMemoryPatternIndex uses brute-force linear scan with cosine similarity, suitable for up to ~10K blocks. A real deployment would swap in an HNSW-backed implementation.

Structs§

AdaptiveTiering
Pattern-aware tiering advisor.
InMemoryPatternIndex
Brute-force in-memory implementation of PatternIndex.
PatternVector
A block’s access-pattern embedding for similarity search.

Traits§

PatternIndex
Trait for a vector index over access-pattern embeddings.

Functions§

pattern_from_meta
Convert block metadata into a 4-dimensional pattern vector.