A powerful NPM library for creating and managing knowledge graphs for Claude Code. Integrates with Obsidian-style documentation, claude-flow for AI coordination, and provides enterprise-grade features for production deployments.
${changed.length} files changed since last sync); `
---
Agent System
A comprehensive agent framework with specialized agents for different tasks.
Agent Types: -
ResearcherAgent - Research and information gathering - CoderAgent - Code generation and modification - TesterAgent - Test creation and validation - AnalystAgent - Analysis and recommendations - ArchitectAgent - System design and architecture`typescript import { BaseAgent, getRegistry, AgentType, createTask } from '@weavelogic/knowledge-graph-agent';
// Get the agent registry const registry = getRegistry();
Interactive visualization dashboard built with Next.js 14.
$3
`bash
Start dashboard on port 3000
kg serve --dashboard
Development mode with hot reload
kg dashboard start
Build for production
kg dashboard build
Serve production build
kg dashboard serve `
$3
- Graph Visualization: Interactive cytoscape.js graph with zoom, pan, and node selection - Data Tables: Sortable, filterable tables with TanStack Table - Search: Full-text and semantic search with filters - Real-time Updates: WebSocket subscriptions for live data - Agent Monitoring: View agent status and execution history - Workflow Tracking: Monitor workflow progress and results
$3
`bash kg dashboard start # Start dev server kg dashboard start --port 8080 # Custom port kg dashboard start --open # Open in browser kg dashboard build # Production build kg dashboard serve # Serve production kg dashboard status # Check status kg dashboard open # Open in browser `
---
Concurrent Server Execution
Run multiple servers simultaneously with the
serve command.`bash
Start all servers
kg serve --all
Start specific servers
kg serve --mcp --graphql kg serve --graphql --dashboard
Custom ports
kg serve --all --port-graphql 4001 --port-dashboard 3001
With custom database
kg serve --all --db ./data/knowledge.db `
$3
| Flag | Description | Default | |------|-------------|---------| |
--mcp | Enable MCP server (stdio) | Enabled by default | | --graphql | Enable GraphQL server | Port 4000 | | --dashboard | Enable web dashboard | Port 3000 | | --all | Enable all servers | - | | --port-graphql | GraphQL port | 4000 | | --port-dashboard | Dashboard port | 3000 | | --db | Database path | .kg/knowledge.db |
---
MCP Server
Model Context Protocol server for Claude integration with 30+ tools.
kg init | Initialize knowledge graph in project | | kg init-primitives | Bootstrap primitives from codebase | | kg analyze-codebase | Analyze dependencies and services |
kg serve | Start MCP server (default) | | kg serve --all | Start all servers | | kg serve --graphql | Start GraphQL server | | kg serve --dashboard | Start web dashboard |
kg plugin list | List installed plugins | | kg plugin install | Install a plugin | | kg plugin run [file] | Run an analyzer | | kg plugin info | Show plugin details | | kg plugin create | Create plugin from template |
kg dashboard start | Start dashboard dev server | | kg dashboard build | Build for production | | kg dashboard serve | Serve production build | | kg dashboard status | Check dashboard status |
kg hooks install | Install hooks to capture interactions | | kg hooks uninstall | Remove hooks configuration | | kg hooks status | Show hooks status | | kg hooks sessions | List captured sessions | | kg hooks export | Export captured sessions |
kg diag run | Run full diagnostics | | kg diag health | Check system health | | kg diag repair | Repair database issues | | kg diag backup | Create database backup |
kg workflow start | Start a workflow | | kg workflow status | Get workflow status | | kg vector search | Semantic search | | kg trajectory list | List trajectories | | kg audit query | Query audit trail |
// Integrations VectorStore, AuditTrail, WorkflowManager, } from '@weavelogic/knowledge-graph-agent';
`
---
Changelog
$3
Default Directory Fix: - Changed default target directory from
docs-nn to docs - kg analyze, kg convert docs, and related commands now output to docs/ by default - Use --target docs-nn if you specifically need the old behavior - Updated help text and documentation to reflect the change
$3
Claude Code Hooks System: - Hook Capture System - Capture all Claude interactions (prompts, responses, tool calls) - Hierarchical Storage - Sessions → Conversations → Messages → Tool Calls - Sub-Agent Tracking - Automatically tracks Task tool spawns with full context - Swarm Tracking - Captures claude-flow swarm operations - Markdown Generation - Creates documentation for sessions, conversations, agents - Tool Output Separation - Stores tool outputs in dedicated JSON files - CLI Commands -
kg hooks install/uninstall/status/sessions/export - Comprehensive type definitions with Zod validation - 22 new tests for hook system
kg cultivate for automated documentation buildout - 7-Phase Cultivation Process - Structure → Content → Architecture → Development → Infrastructure → Review → Completion - Development Planning - Generates phased development plans with tasks - Infrastructure Planning - Creates dev/staging/production infrastructure plans - SOP Compliance Analysis - Integrates AI-SDLC SOP requirements - Swarm Orchestration - Uses claude-flow for parallel documentation generation - Support for multi-service projects (api, backend, frontend, admin)
$3
- Added
src/{service}/docs directory scanning and copying for doc generation - Enhanced service documentation detection
$3
- Improved Python project detection for doc generation - Better handling of
requirements.txt and pyproject.toml
$3
- Fixed vault-sync.test.ts timeout issues - Improved test stability
$3
- Fixed repository URL in package.json to match actual GitHub repo name
$3
- Added SOP Governance documentation (
docs/guides/sop-governance.md) - Added SOP Reference documentation (docs/reference/sops.md) - Complete documentation for all 40 AI-SDLC SOPs with requirements and checkpoints - Updated docs README and main README with governance documentation links
$3
- Fixed repository URL in package.json to correct GitHub repo - Resolved stale Dependabot security alerts (Next.js not a dependency)
$3
- Fixed documentation links to use new organized reference structure - Updated Reference section with proper paths to
Core Features: - Agent Equilibrium Selector - Intelligent agent selection based on task requirements - Memory & Graph Pruning - Automatic cleanup and optimization of graph data - Agentic-Flow Integration - Full AgentDB, ReasoningBank, and Federation Hub support - Trajectory Tracking - Agent behavior learning and pattern optimization - Agent Booster Integration - Enhanced agent capabilities with performance boosting - Multi-Model Router - Dynamic model selection based on task complexity - QUIC Transport - High-performance, low-latency communication protocol
Documentation: - Documentation overhaul with Diátaxis framework (tutorials, guides, reference, explanation) - 5 Architecture Decision Records (ADRs) from SPEC files - Comprehensive API/CLI/MCP reference documentation - Enterprise guides (chunking, backup, caching, health monitoring) - Integration architecture docs (claude-flow, ruvector, exochain, agentic-flow) - Getting started tutorials (installation, quick-start, configuration) - MIT License added to project root - Dependencies documentation with licenses - 68 markdown documentation files
$3
- Plugin system with custom analyzers (13 lifecycle hooks, async streaming) - Code Complexity Analyzer plugin (cyclomatic, cognitive, Halstead metrics) - Dependency Health Analyzer plugin (vulnerability scanning, health scores) - GraphQL API with graphql-yoga server and WebSocket subscriptions - Custom GraphQL scalars (DateTime, JSON, UUID, FilePath) - Web dashboard with Next.js 14, cytoscape.js visualization - Dashboard CLI commands (start, build, serve, status) - Concurrent server execution (
kg serve --all`) - ServiceContainer singleton for dependency injection - TypedEventBus for cross-service communication - Plugin CLI commands (list, install, run, info, create)
$3
- Workflow DevKit integration with MCP tools - RuVector semantic search with trajectory tracking - Exochain audit trail with DAG-BFT consensus - 9 MCP tools for workflows, vectors, and audit - 22 CLI subcommands for external integrations
$3
- Chunker with 5 chunking strategies - BackupManager with gzip compression - IntegrityChecker for database validation - AdvancedCache with LRU/LFU/FIFO/TTL eviction - Diagnostics CLI commands
$3
- ServiceManager for background processes - ConfigManager with migrations - HealthMonitor with alerts - DecisionTracker for AI explainability
$3
- Agent system with specialized agents - RulesEngine for automation - WorkflowRegistry for multi-step workflows - VaultMemorySync for memory synchronization - Git integration with auto-commit - MCP Server with 20+ tools
$3
- SeedGenerator for codebase analysis - DeepAnalyzer with claude-flow - Shadow Cache for file tracking - Initial knowledge graph generation
---
Documentation
Comprehensive documentation is available in the docs/ directory, organized using the Diátaxis framework: