feat: Implement pai knowledge management system pack #328
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces the new
pai-knowledge-systempack, which provides persistent AI memory and knowledge management using a Graphiti knowledge graph with a FalkorDB backend. This compliments the existing history packIt adds documentation, configuration files, hook integration, and updates to the history system to support seamless knowledge graph syncing and prevent feedback loops. The changes are grouped below by theme.
New Pack Introduction and Documentation
pai-knowledge-systempack to the repository, including itspackage.jsonand documentation entries in bothPACKS.mdandPacks/README.md, describing its features and installation order. [1] [2] [3] [4]Configuration and Environment Setup
config/.env.example) for the pack, detailing required variables for LLM providers, database settings, and concurrency, with clear namespacing to avoid conflicts.config/.mcp.json) for connecting to the pack's SSE endpoint.Hook Integration for Knowledge Sync
config/settings-hooks.json) to enable syncing history and learning events to the knowledge graph at key lifecycle points (SessionStart, Stop, SubagentStop).History System Safeguards
capture-all-events.ts) to exclude knowledge system tool operations from capture, preventing feedback loops and redundant knowledge entries. [1] [2]Utility Library for Markdown Metadata Extraction
src/hooks/lib/frontmatter-parser.ts) to extract structured metadata and clean markdown files for reliable ingestion into the knowledge graph.