Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .claude/settings.local.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"permissions": {
"allow": [
"Bash(bun test:*)",
"Bash(node:*)",
"Bash(cat:*)",
"Bash(find:*)",
"Bash(tree:*)",
"Bash(wc:*)",
"mcp__pai-knowledge__add_memory",
"Bash(ls:*)",
"Bash(grep:*)"
]
}
}
6 changes: 6 additions & 0 deletions PACKS.md
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,12 @@ Browse all packs: [Packs/](Packs/)
| [kai-agents-skill](Packs/kai-agents-skill.md) | Skill | Dynamic agent composition with specialized personalities and voices |
| [kai-prompting-skill](Packs/kai-prompting-skill.md) | Skill | Meta-prompting system for programmatic prompt generation |

### Third Party

| Pack | Type | Description |
|------|------|-------------|
| [pai-knowledge-system](Packs/pai-knowledge-system) | Infrastructure | Knowledge graph memory system using Graphiti with FalkorDB for persistent AI memory |

**Installation order:** hooks → history → core-install → voice → observability (optional) → skill packs

**Or install the complete [Kai Bundle](Bundles/Kai/)** which handles ordering automatically.
Expand Down
2 changes: 2 additions & 0 deletions Packs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ PAI System
| [**kai-agents-skill**](kai-agents-skill/) | 1.0.0 | Delegation | Dynamic agent composition - create custom agents with unique personalities, voices, and trait combinations |
| [**kai-prompting-skill**](kai-prompting-skill/) | 1.0.0 | Methodology | Meta-prompting system with Handlebars templates, Claude 4.x best practices, and the Ultimate Prompt Template |
| [**kai-browser-skill**](kai-browser-skill/) | 1.0.0 | Automation | Code-first browser automation with Playwright - 99% token savings over MCP, screenshots, verification, web testing |
| [**pai-knowledge-system**](pai-knowledge-system/) | 1.0.0 | Infrastructure | Persistent knowledge management with Graphiti + FalkorDB - automatic entity extraction, semantic search, relationship mapping |

---

Expand All @@ -164,6 +165,7 @@ Packs have dependencies. Install in this order:
7. kai-art-skill ← Depends on core-install
8. kai-browser-skill ← Optional, standalone (only needs Bun + Playwright)
9. kai-observability-server ← Optional, depends on hooks
10. pai-knowledge-system ← Optional, depends on history-system
```

**Or install the complete [Kai Bundle](../Bundles/Kai/)** which handles ordering automatically.
Expand Down
Binary file added Packs/icons/pai-knowledge-system.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions Packs/kai-history-system/src/capture-all-events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,21 @@ function setAgentForSession(sessionId: string, agentName: string): void {
} catch (error) {}
}

// Tools to exclude from capture (prevents feedback loops with knowledge system)
const EXCLUDED_TOOL_PATTERNS = [
/^mcp__pai-knowledge__/, // All PAI knowledge system tools
/^mcp__.*__search_memory/, // Any MCP memory search
/^mcp__.*__add_memory/, // Any MCP memory add
/^mcp__.*__get_episodes/, // Any MCP episode retrieval
/^mcp__.*__delete_/, // Any MCP delete operations
/^mcp__.*__clear_graph/, // Graph clearing
];

function shouldExcludeTool(toolName: string | undefined): boolean {
if (!toolName) return false;
return EXCLUDED_TOOL_PATTERNS.some(pattern => pattern.test(toolName));
}

async function main() {
try {
const args = process.argv.slice(2);
Expand All @@ -88,6 +103,11 @@ async function main() {
const stdinData = await Bun.stdin.text();
const hookData = JSON.parse(stdinData);

// Skip capture for excluded tools (knowledge system operations)
if (shouldExcludeTool(hookData.tool_name)) {
process.exit(0);
}

const sessionId = hookData.session_id || 'main';
let agentName = getAgentForSession(sessionId);

Expand Down
976 changes: 976 additions & 0 deletions Packs/pai-knowledge-system.md

Large diffs are not rendered by default.

Loading