Skip to content

Latest commit

 

History

History
220 lines (191 loc) · 12.3 KB

File metadata and controls

220 lines (191 loc) · 12.3 KB

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

[1.0.0] - 2026-03-04

Added

  • MCP Server — FastMCP-based tool server with 9 tools (add_memory, search_memory, add_knowledge, get_conversation_context, get_user_profile, get_emotional_state, get_relationship_state, manage_persona, create_session), stdio transport, cortexflow-mcp entry point
  • LangChain IntegrationCortexFlowChatMessageHistory, CortexFlowRetriever, CortexFlowMemory adapters in cortexflow.integrations.langchain
  • CrewAI IntegrationCortexFlowCrewStorage implementing CrewAI storage protocol in cortexflow.integrations.crewai
  • Pluggable Vector Store BackendsVectorStoreBackend ABC with SQLite (default), ChromaDB, and Qdrant adapters; create_vector_store() factory; wired into KnowledgeStore with dual-write and fallback
  • Temporal FactsTemporalFact and TemporalManager for time-aware fact management with validity windows, superseding, conflict detection; auto-extracts from conversation messages
  • Episodic MemoryEpisode and EpisodicMemoryStore with SQLite + FTS5 full-text search; auto-saves episodes on session close
  • Event System — Thread-safe EventBus with pub/sub, 12 event types, emits at 7 manager lifecycle points; decorator-based handler registration
  • Safety PipelineSafetyPipeline with PII detection (email, phone, SSN, credit card), boundary enforcement (medical/legal/impersonation), custom rules; configurable blocking or filtering
  • New config sectionsVectorStoreConfig, TemporalConfig, EpisodicConfig, EventConfig, SafetyConfig with builder methods
  • New optional dependency groupsmcp, langchain, crewai, chromadb, qdrant
  • 5 example scripts in examples/ directory
  • Convenience methodsget_temporal_facts(), get_recent_episodes(), search_episodes() on manager

Changed

  • Version bumped to 1.0.0
  • pyproject.toml updated with new classifiers, keywords, and cortexflow-mcp entry point
  • __init__.py now exports all new classes (EventType, EventBus, TemporalFact, TemporalManager, Episode, EpisodicMemoryStore, VectorStoreBackend, VectorSearchResult, SafetyLevel, SafetyResult, SafetyRule, SafetyPipeline)
  • README updated with comprehensive documentation for all new features

[0.9.0] - 2026-03-03

Added

  • LiteLLM integration — new LiteLLMClient supporting 100+ LLM providers (OpenAI, Anthropic, Cohere, Azure, Bedrock, etc.) through a unified interface
  • Async LLM interfaceagenerate() and agenerate_from_prompt() methods on LLMProviderInterface with native async support in LiteLLMClient
  • Dependabot — automated weekly dependency updates for pip and GitHub Actions
  • Security scanning — TruffleHog secret scanning and dependency review on PRs via GitHub Actions
  • Personal Fact Extraction for deep memory recall:
    • New fact_detector.py module with regex-based PersonalFactDetector class
    • Detects names, occupations, locations, preferences, possessions, and age statements
    • Entity-aware importance scoring: personal facts score 8.0 (above regular content, below system messages)
    • Entity-preserving compression: fact sentences get maximum score (10.0) in extractive summarization
    • Dual-write to knowledge store: detected facts are automatically stored for BM25 retrieval
    • New use_fact_extraction config flag and .with_fact_extraction() builder method
    • Benchmark result: 5/5 personal facts recalled after 40 filler pairs (up from 0-1/5)
  • Core Reasoning Framework:
    • Implemented ReasoningEngine for multi-step reasoning orchestration
    • Added QueryPlanner for breaking complex queries into reasoning steps
    • Created ReasoningState for tracking multi-step reasoning processes
    • Implemented multiple reasoning strategies (forward/backward chaining, abductive reasoning)
    • Added state tracking mechanisms for reasoning confidence and explanation
  • Path-based Inference capabilities:
    • Implemented BidirectionalSearch for efficient path finding between entities
    • Added WeightedPathSearch for confidence and importance-based path discovery
    • Created ConstrainedPathSearch for relation-filtered path traversal
    • Added PathExplainer for human-readable reasoning traces
    • Integrated with agent chain for enhanced knowledge exploration
  • Enhanced Knowledge Graph Schema and Integration:
    • Extended database schema for relation types and confidence scores
    • Added metadata fields for provenance tracking and versioning
    • Implemented GraphMerger component for intelligent knowledge integration
    • Added entity merging with duplicate detection and conflict resolution
    • Implemented automatic taxonomic relationship extraction
    • Added relationship inference for transitive, symmetric, and inverse relations
  • Performance optimization features for knowledge graph operations:
    • Graph partitioning for efficient storage and retrieval
    • Multi-hop indexing strategies for faster path traversal
    • Query planning system for optimizing reasoning paths
    • Caching mechanisms for common reasoning patterns
    • LRU cache management with prioritization and persistence
    • Advanced indexing for direct relationships and frequent query patterns
    • Cache eviction strategies based on usage patterns and recency
  • Comprehensive Evaluation Framework:
    • Multi-hop reasoning test suite with complex query patterns
    • Automatic metrics for reasoning accuracy (precision, recall, F1)
    • Path continuity and semantic relevance scoring
    • Knowledge graph consistency benchmarks and validation
    • Constraint-based verification (functional, inverse functional, disjoint classes)
    • Visualizations and reports for benchmark results
  • Advanced Graph Traversal Components:
    • Optimized traversal algorithms including BFS, bidirectional search, A* search
    • Graph traversal profiler with performance monitoring and optimization suggestions
    • Weighted path finding with custom weight functions
    • Dijkstra's algorithm implementation for weighted paths
    • Path finding with constraints and exclusions
  • New documentation for performance optimization features
  • Example script demonstrating performance optimization capabilities
  • Evaluation Framework implementation:
    • Added missing multi-hop query methods in CortexFlowManager
    • Implemented knowledge snapshot functionality for consistency tracking
    • Fixed build_knowledge_subgraph method for reliable entity handling
    • Enhanced temporal consistency calculation in consistency metrics
    • Added support for path finding and reasoning path logging
  • Improved memory and resource management:
    • Added proper resource cleanup to Ontology class with close() method and destructor
    • Enhanced CortexFlowManager.close() to properly clean up all child components
    • Implemented context manager pattern for TraversalProfiler with proper cleanup
    • Added safer file operations with context managers to prevent resource leaks
    • Enhanced existing close() methods with more thorough cleanup
    • Added destruction safeguards to ensure resources are properly released
    • Improved error handling in cleanup routines across modules
  • Centralized optional dependency management:
    • Created dependency_utils module with utilities for handling optional dependencies
    • Added check_dependency and import_optional_dependency functions for consistent dependency checking
    • Refactored optional import patterns across modules to use the new utility functions
    • Improved error messaging and logging for missing dependencies

Changed

  • Python 3.10+ required — dropped Python 3.8 and 3.9 support, added 3.13 and 3.14
  • Ruff replaces flake8/black/isort — single Rust-based tool for linting and formatting (10-100x faster)
  • Modern type hints — all modules use PEP 604/585 syntax (list[str], X | None) via from __future__ import annotations
  • CI modernized — Python 3.10-3.14 matrix, Ruff linting, --cov-fail-under=80 coverage threshold
  • Coverage threshold — CI enforces 80% minimum code coverage
  • Refactored search methods in knowledge.py using strategy pattern:
    • Created abstract SearchStrategy interface
    • Implemented concrete strategy classes for BM25, dense vector, hybrid, and keyword search
    • Updated KnowledgeStore to use these strategies through the search_strategy method
  • Improved configuration management:
    • Refactored CortexFlowConfig using builder pattern and nested config classes
    • Organized parameters into logical sections for better clarity and maintainability
    • Added descriptive documentation for all configuration sections
  • Enhanced knowledge module API:
    • Added new add_knowledge() method with clearer naming and purpose
    • Deprecated remember_knowledge() method with proper warnings
    • Improved backward compatibility with support for both old and new config structures
    • Added migration guide for transitioning to new API

Fixed

  • Resolved issues with CortexFlowManager multi-hop query handling
  • Fixed knowledge snapshot functionality for consistency evaluation
  • Improved error handling in graph subgraph building
  • Corrected temporal calculations in consistency metrics
  • Fixed database initialization issues in reasoning engine tests
  • Improved mock implementations for path inference tests
  • Enhanced demonstration script to use mocked objects for reliable testing
  • Corrected bidirectional search implementation for proper path finding
  • Fixed method patching in test_reasoning_process test case
  • Addressed overlapping functionality between remember_explicit and remember_knowledge methods

[0.7.0] - 2023-10-15

Added

  • Uncertainty handling and belief revision mechanisms:
    • Support for explicit representation of uncertainty (confidence scores, probability distributions)
    • Contradiction detection and resolution strategies
    • Source reliability tracking and weighting
    • Methods for reasoning with incomplete information
    • Belief revision history tracking

Changed

  • Improved entity extraction with semantic role labeling
  • Enhanced relation extraction with coreference resolution
  • Updated documentation with uncertainty handling examples

[0.6.0] - 2023-09-22

Added

  • Advanced graph traversal features:
    • Weighted path algorithms prioritizing importance and confidence
    • Bidirectional search for efficient entity connection discovery
    • Constrained path finding with relation type requirements
    • Graph contraction for handling large knowledge graphs
    • Hierarchical graph abstraction for simplified representations

Changed

  • Performance improvements in knowledge retrieval
  • Enhanced entity and relationship extraction

[0.5.0] - 2023-08-18

Added

  • Self-Reflection capabilities to verify knowledge relevance and response consistency
  • Reflection-based learning for improving future responses
  • Configuration options for reflection depth and threshold

Changed

  • Improved token usage with more efficient compression algorithms
  • Enhanced documentation with self-reflection examples

[0.4.0] - 2023-07-25

Added

  • Chain of Agents for collaborative multi-agent reasoning
  • Support for specialized agents with different expertise areas
  • Agent communication protocols for complex query resolution
  • Configuration options for agent chains

Changed

  • Enhanced documentation with Chain of Agents examples
  • Performance improvements in knowledge retrieval

[0.3.0] - 2023-06-30

Added

  • Dynamic memory tier weighting for adaptive token allocation
  • Importance-based balancing between tiers
  • Configuration options for dynamic weighting

Changed

  • Improved compression strategies for working and archive tiers
  • Enhanced documentation with dynamic weighting examples

[0.2.0] - 2023-06-15

Added

  • Advanced retrieval augmentation with GraphRAG
  • Knowledge graph integration for complex querying
  • Support for multi-hop relationship queries

Changed

  • Improved entity and relationship extraction
  • Enhanced documentation with GraphRAG examples

[0.1.0] - 2023-05-01

Added

  • Initial release with multi-tier memory architecture
  • Support for active, working, and archive memory tiers
  • Basic importance-based information retention
  • Knowledge store for persistent information
  • Simple context compression strategies