Anchor
Changelog
Release history for anchor.
Changelog
All notable changes to anchor are documented here. The format is based on Keep a Changelog, and the project adheres to Semantic Versioning.
[Unreleased]
Added
LLM Providers (anchor.llm)
- Multi-provider LLM interface with unified API across Anthropic, OpenAI, Gemini, Grok, Ollama, OpenRouter, and LiteLLM
FallbackProviderfor automatic failover across multiple LLM backends- Unified error hierarchy:
ProviderError,AuthenticationError,RateLimitError,ContentFilterError,ModelNotFoundError,ServerError,TimeoutError,ProviderNotInstalledError create_providerfactory andregister_providerfor custom backends- Cost calculation via
calculate_costwithMODEL_PRICINGregistry - Streaming support with
StreamChunkandToolCallDelta - Typed message/response models:
Message,LLMResponse,ContentBlock,ToolCall,ToolResult,ToolSchema,Usage,StopReason
MCP Bridge (anchor.mcp)
- Bidirectional Model Context Protocol integration (requires
astro-anchor[mcp]) FastMCPClientBridgefor consuming external MCP servers as anchor toolsFastMCPServerBridgefor exposing anchor pipelines and tools as MCP serversMCPClientPoolfor managing connections to multiple MCP serversMCPClient/MCPServerabstractions with typed config (MCPServerConfig)- MCP resource and prompt models:
MCPResource,MCPPrompt,MCPPromptArgument mcp_tool_to_agent_toolconverter andparse_server_stringutility- Error hierarchy:
MCPError,MCPConfigError,MCPConnectionError,MCPTimeoutError,MCPToolError
Agent Framework (anchor.agent)
- Tool-calling agent with
@tooldecorator for defining agent tools Agentclass with async streaming viaachatSkillandSkillRegistryfor organizing related tools- Built-in
memory_skill/memory_toolsandrag_skill/rag_toolsfor out-of-the-box capabilities
Advanced Retrieval
RoutedRetrieverwith pluggable routing:CallbackRouter,KeywordRouter,MetadataRouterLateInteractionRetrieverwithLateInteractionScorerandMaxSimScorerfor ColBERT-style retrievalSharedSpaceRetrieverfor cross-modal retrieval in a unified embedding spaceCrossModalEncoderandTokenLevelEncoderprotocols for multi-modal embeddingsRoundRobinRerankerandRerankerPipelinefor composable reranking strategies- Async retriever/reranker variants:
AsyncDenseRetriever,AsyncHybridRetriever,AsyncCrossEncoderReranker,AsyncCohereReranker
Evaluation Enhancements
ABTestRunnerandABTestResultfor A/B testing pipeline configurationsHumanEvaluationCollectorandHumanJudgmentfor human-in-the-loop evaluationBatchEvaluatorwith parallelization for large-scale evaluation runsHumanEvaluatorprotocol for pluggable human evaluation backends
Query Enhancements
ContextualQueryTransformerfor context-aware query rewritingConversationRewriterfor resolving coreferences in multi-turn conversationsKeywordClassifier,EmbeddingClassifier,CallbackClassifierfor query routingQueryClassifierprotocol andclassified_retriever_steppipeline step
Memory Enhancements
ProgressiveSummarizationMemorywith multi-tier compactionTierCompactorwithCompactionStrategyandAsyncCompactionStrategyprotocols
Ingestion Enhancements
CodeChunkerfor language-aware code splittingTableAwareChunkerfor preserving table structures during chunking
Tests & Examples
- Unit tests for
_math.py(cosine_similarity and clamp functions) MemoryRetrieverAdaptertests verifying Retriever protocol compliancePipelineExecutionErrorwrapping test with diagnostics verification- Golden path integration test mirroring README usage pattern
- Example:
examples/hybrid_rag.py-- hybrid RAG pipeline with dense retrieval - Example:
examples/custom_retriever.py-- custom Retriever protocol implementation - Example:
examples/budget_management.py-- token budget management and overflow handling - README sections for Priority System (1--10 scale) and Token Budgets
Fixed
test_consolidator.py: eliminated shared mutable state (_orthogonal_indexdict) by converting to factory function pattern (make_orthogonal_embed())test_graph_memory.py: updatedlink_memoryunknown entity test to expectKeyErrorinstead ofValueError- README: fixed retrieval example with runnable
embed_fnandContextItemcreation - README: updated test count from 961 to 1088
[0.1.0] - 2026-02-20
Added
- Core context pipeline with sync/async support (
ContextPipeline) - Token-aware sliding window memory (
SlidingWindowMemory) - Summary buffer memory with progressive compaction (
SummaryBufferMemory) - Memory manager facade unifying conversation and persistent memory (
MemoryManager) - Hybrid RAG retrieval: dense, sparse (BM25), and hybrid (RRF) retrievers
- Multi-signal memory retrieval with recency/relevance/importance scoring (
ScoredMemoryRetriever) - Provider-agnostic formatting: Anthropic, OpenAI, and generic text formatters
- Anthropic multi-block system formatting with prompt caching support
- Protocol-based extensibility (PEP 544) for all extension points
- Token budget management with per-source allocations and overflow tracking
- Pluggable eviction policies: FIFO, importance-based, and paired (user+assistant)
- Memory decay: Ebbinghaus forgetting curve and linear decay
- Recency scoring: exponential and linear strategies
- Memory consolidation with content-hash dedup and cosine-similarity merging
- Simple graph memory with BFS traversal for entity-relationship tracking
- Memory garbage collection with two-phase expired+decayed pruning
- Memory callback protocol for lifecycle observability
- Pipeline query enrichment with memory context
- Auto-promotion of evicted turns to long-term memory
- In-memory reference implementations for all storage protocols
- JSON file-backed persistent memory store
- CLI with index and query commands (via typer+rich)
- 961 tests with 94% coverage