agentic-flow 1.7.0 → 1.7.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/.claude/agents/test-neural.md +5 -0
  2. package/.claude/settings.json +20 -19
  3. package/.claude/skills/agentdb-memory-patterns/SKILL.md +166 -0
  4. package/.claude/skills/agentdb-vector-search/SKILL.md +126 -0
  5. package/.claude/skills/agentic-flow/agentdb-memory-patterns/SKILL.md +166 -0
  6. package/.claude/skills/agentic-flow/agentdb-vector-search/SKILL.md +126 -0
  7. package/.claude/skills/agentic-flow/reasoningbank-intelligence/SKILL.md +201 -0
  8. package/.claude/skills/agentic-flow/swarm-orchestration/SKILL.md +179 -0
  9. package/.claude/skills/reasoningbank-intelligence/SKILL.md +201 -0
  10. package/.claude/skills/skill-builder/README.md +308 -0
  11. package/.claude/skills/skill-builder/SKILL.md +910 -0
  12. package/.claude/skills/skill-builder/docs/SPECIFICATION.md +358 -0
  13. package/.claude/skills/skill-builder/resources/schemas/skill-frontmatter.schema.json +41 -0
  14. package/.claude/skills/skill-builder/resources/templates/full-skill.template +118 -0
  15. package/.claude/skills/skill-builder/resources/templates/minimal-skill.template +38 -0
  16. package/.claude/skills/skill-builder/scripts/generate-skill.sh +334 -0
  17. package/.claude/skills/skill-builder/scripts/validate-skill.sh +198 -0
  18. package/.claude/skills/swarm-orchestration/SKILL.md +179 -0
  19. package/CHANGELOG.md +117 -0
  20. package/README.md +81 -17
  21. package/dist/cli-proxy.js +33 -2
  22. package/dist/mcp/standalone-stdio.js +4 -200
  23. package/dist/reasoningbank/index.js +4 -0
  24. package/dist/utils/cli.js +22 -0
  25. package/docs/AGENTDB_INTEGRATION.md +379 -0
  26. package/package.json +4 -4
  27. package/.claude/answer.md +0 -1
  28. package/dist/agentdb/benchmarks/comprehensive-benchmark.js +0 -664
  29. package/dist/agentdb/benchmarks/frontier-benchmark.js +0 -419
  30. package/dist/agentdb/benchmarks/reflexion-benchmark.js +0 -370
  31. package/dist/agentdb/cli/agentdb-cli.js +0 -717
  32. package/dist/agentdb/controllers/CausalMemoryGraph.js +0 -322
  33. package/dist/agentdb/controllers/CausalRecall.js +0 -281
  34. package/dist/agentdb/controllers/EmbeddingService.js +0 -118
  35. package/dist/agentdb/controllers/ExplainableRecall.js +0 -387
  36. package/dist/agentdb/controllers/NightlyLearner.js +0 -382
  37. package/dist/agentdb/controllers/ReflexionMemory.js +0 -239
  38. package/dist/agentdb/controllers/SkillLibrary.js +0 -276
  39. package/dist/agentdb/controllers/frontier-index.js +0 -9
  40. package/dist/agentdb/controllers/index.js +0 -8
  41. package/dist/agentdb/index.js +0 -32
  42. package/dist/agentdb/optimizations/BatchOperations.js +0 -198
  43. package/dist/agentdb/optimizations/QueryOptimizer.js +0 -225
  44. package/dist/agentdb/optimizations/index.js +0 -7
  45. package/dist/agentdb/tests/frontier-features.test.js +0 -665
  46. package/dist/memory/SharedMemoryPool.js +0 -211
  47. package/dist/memory/index.js +0 -6
  48. package/dist/reasoningbank/AdvancedMemory.js +0 -67
  49. package/dist/reasoningbank/HybridBackend.js +0 -91
  50. package/dist/reasoningbank/index-new.js +0 -87
  51. package/docs/AGENTDB_TESTING.md +0 -411
  52. package/scripts/run-validation.sh +0 -165
  53. package/scripts/test-agentdb.sh +0 -153
package/CHANGELOG.md CHANGED
@@ -5,6 +5,123 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [1.7.3] - 2025-10-19
9
+
10
+ ### Fixed
11
+ - **CRITICAL: Skills Installation Path** - Fixed skills to install at top level for Claude Code discovery
12
+ - **Before**: Skills installed to `.claude/skills/agentic-flow/[skill-name]/` (WRONG - nested subdirectory)
13
+ - **After**: Skills install to `.claude/skills/[skill-name]/` (CORRECT - top level)
14
+ - Claude Code requires skills at top level, NOT in subdirectories
15
+ - Affects `npx agentic-flow skills create` command
16
+ - All 4 example skills (agentdb-vector-search, agentdb-memory-patterns, swarm-orchestration, reasoningbank-intelligence) now install correctly
17
+
18
+ ### Migration
19
+ If you installed skills with v1.7.2:
20
+ ```bash
21
+ # Move skills from subdirectory to top level
22
+ cd .claude/skills
23
+ mv agentic-flow/* .
24
+ rmdir agentic-flow
25
+ # Restart Claude Code
26
+ ```
27
+
28
+ Or simply reinstall:
29
+ ```bash
30
+ rm -rf .claude/skills
31
+ npx agentic-flow@latest skills create
32
+ ```
33
+
34
+ ## [1.7.2] - 2025-10-19
35
+
36
+ ### Added
37
+ - **Skills System Integration** - Full CLI support for Claude Code Skills management
38
+ - `npx agentic-flow skills list` - List all installed skills (personal + project)
39
+ - `npx agentic-flow skills init` - Initialize skills directories (~/.claude/skills and .claude/skills)
40
+ - `npx agentic-flow skills create` - Create agentic-flow example skills (AgentDB, swarm, reasoningbank)
41
+ - `npx agentic-flow skills init-builder` - Install skill-builder framework for creating custom skills
42
+ - `npx agentic-flow skills help` - Show comprehensive skills command documentation
43
+ - Skills automatically discovered by Claude Code across all surfaces (Claude.ai, CLI, SDK, API)
44
+
45
+ ### Changed
46
+ - **README Updates** - Added comprehensive Skills System documentation
47
+ - New Skills System section with Quick Start guide
48
+ - Updated Quick Navigation table to highlight Skills
49
+ - Updated CLI Commands section with all 5 skills commands
50
+ - Added skill structure examples with YAML frontmatter
51
+ - Listed 5 built-in skills: skill-builder, agentdb-memory-patterns, agentdb-vector-search, reasoningbank-intelligence, swarm-orchestration
52
+
53
+ ### Documentation
54
+ - Updated both main README.md and npm package README.md with identical Skills documentation
55
+ - Added skills to Quick Navigation for easy discovery
56
+ - Included benefits: reusable, discoverable, structured, progressive, validated
57
+
58
+ ## [1.7.1] - 2025-10-19
59
+
60
+ ### Fixed
61
+ - **CRITICAL: Skills Top-Level Installation** - Fixed skills to install at top level for Claude Code discovery
62
+ - **Claude Code requires**: `~/.claude/skills/[skill-name]/` (top level)
63
+ - **NOT supported**: `~/.claude/skills/namespace/[skill-name]/` (nested subdirectories)
64
+ - All skills now correctly install at top level: `~/.claude/skills/skill-builder/`, `~/.claude/skills/swarm-orchestration/`, etc.
65
+ - Skills are now properly discovered by Claude Code after restart
66
+ - Reverted incorrect v1.7.0 namespace changes that broke skill discovery
67
+
68
+ ### Changed
69
+ - Updated `skills-manager.ts` to install all skills at top level (removed nested namespace)
70
+ - Moved skill source files from `agentic-flow/` subdirectory to top level in `.claude/skills/`
71
+ - Simplified source detection paths
72
+
73
+ ### Documentation
74
+ - Added `docs/plans/skills/SKILLS_TOP_LEVEL_FIX.md` - Explanation of fix and testing
75
+ - Updated `docs/plans/skills/SKILL_INSTALLATION_ANALYSIS.md` - Corrected with top-level requirement
76
+ - Deprecated `docs/plans/skills/MIGRATION_v1.7.0.md` - Namespace approach was incorrect
77
+
78
+ ### Migration
79
+ If you installed skills with v1.7.0:
80
+ ```bash
81
+ # Move skills from namespace to top level
82
+ cd ~/.claude/skills
83
+ for skill in agentic-flow/*; do
84
+ mv "agentic-flow/$skill" "$(basename $skill)"
85
+ done
86
+ rm -rf agentic-flow
87
+ # Restart Claude Code
88
+ ```
89
+
90
+ Or simply reinstall:
91
+ ```bash
92
+ npx agentic-flow skills init personal --with-builder
93
+ ```
94
+
95
+ ## [1.6.6] - 2025-10-18
96
+
97
+ ### Changed
98
+
99
+ - **AgentDB v1.0.5** - Updated to latest version with browser bundle support
100
+ - Now includes `dist/agentdb.min.js` (196KB) and `dist/agentdb.js` (380KB) for CDN usage
101
+ - Browser bundles support direct import via unpkg/jsDelivr
102
+ - Source maps included for debugging
103
+ - WASM backend fully functional in browser environments
104
+
105
+ ## [1.6.5] - 2025-10-18
106
+
107
+ ### Changed
108
+
109
+ - **AgentDB Dependency** - Updated to use published npm package instead of local file reference
110
+ - Changed from `"agentdb": "file:../packages/agentdb"` to `"agentdb": "^1.0.4"`
111
+ - Now uses stable published version from npm registry
112
+ - Includes all 20 MCP tools (10 core AgentDB + 10 learning tools)
113
+ - Easier installation and dependency management for end users
114
+
115
+ ### Added
116
+
117
+ - **AgentDB v1.0.4 Integration** - Complete MCP learning system now available
118
+ - 10 learning tools: learning_start_session, learning_end_session, learning_predict, learning_feedback, learning_train, learning_metrics, learning_transfer, learning_explain, experience_record, reward_signal
119
+ - Q-learning with epsilon-greedy exploration
120
+ - Multi-dimensional reward system (success 40%, efficiency 30%, quality 20%, cost 10%)
121
+ - Experience replay buffer with prioritized sampling
122
+ - Transfer learning between similar tasks
123
+ - Session management with state persistence
124
+
8
125
  ## [1.6.4] - 2025-10-16
9
126
 
10
127
  ### 🚀 QUIC Transport - Production Ready (100% Complete)
package/README.md CHANGED
@@ -17,7 +17,7 @@
17
17
  |-------------|---------------|---------------|
18
18
  | [Quick Start](#-quick-start) | [Agent Booster](#-core-components) | [Agent List](#-agent-types) |
19
19
  | [Deployment Options](#-deployment-options) | [ReasoningBank](#-core-components) | [MCP Tools](#-mcp-tools-213-total) |
20
- | [Model Optimization](#-model-optimization) | [Multi-Model Router](#-using-the-multi-model-router) | [Complete Docs](https://github.com/ruvnet/agentic-flow/tree/main/docs) |
20
+ | [Model Optimization](#-model-optimization) | [Skills System](#-skills-system-claude-code-integration) | [Complete Docs](https://github.com/ruvnet/agentic-flow/tree/main/docs) |
21
21
 
22
22
  ---
23
23
 
@@ -53,33 +53,19 @@ Most AI coding agents are **painfully slow** and **frustratingly forgetful**. Th
53
53
  | Component | Description | Performance | Documentation |
54
54
  |-----------|-------------|-------------|---------------|
55
55
  | **Agent Booster** | Ultra-fast local code transformations via Rust/WASM (auto-detects edits) | 352x faster, $0 cost | [Docs](https://github.com/ruvnet/agentic-flow/tree/main/agent-booster) |
56
- | **AgentDB** | State-of-the-art memory with causal reasoning, reflexion, and skill learning | p95 < 50ms, 80% hit rate | [Docs](./src/agentdb/README.md) |
57
56
  | **ReasoningBank** | Persistent learning memory system with semantic search | 46% faster, 100% success | [Docs](https://github.com/ruvnet/agentic-flow/tree/main/agentic-flow/src/reasoningbank) |
58
57
  | **Multi-Model Router** | Intelligent cost optimization across 100+ LLMs | 85-99% cost savings | [Docs](https://github.com/ruvnet/agentic-flow/tree/main/agentic-flow/src/router) |
59
58
  | **QUIC Transport** | Ultra-low latency agent communication via Rust/WASM QUIC protocol | 50-70% faster than TCP, 0-RTT | [Docs](https://github.com/ruvnet/agentic-flow/tree/main/crates/agentic-flow-quic) |
60
59
 
61
- **CLI Usage**:
62
- - **AgentDB**: Full CLI with 17 commands (`npx agentdb <command>`)
63
- - **Multi-Model Router**: Via `--optimize` flag
64
- - **Agent Booster**: Automatic on code edits
65
- - **ReasoningBank**: API only
66
- - **QUIC Transport**: API only
67
-
68
- **Programmatic**: All components importable: `agentic-flow/agentdb`, `agentic-flow/router`, `agentic-flow/reasoningbank`, `agentic-flow/agent-booster`, `agentic-flow/transport/quic`
60
+ **CLI Usage**: Multi-Model Router via `--optimize`, Agent Booster (automatic), ReasoningBank (API only), QUIC Transport (API only)
61
+ **Programmatic**: All components importable: `agentic-flow/router`, `agentic-flow/reasoningbank`, `agentic-flow/agent-booster`, `agentic-flow/transport/quic`
69
62
 
70
63
  **Get Started:**
71
64
  ```bash
72
- # CLI: AgentDB memory operations
73
- npx agentdb reflexion store "session-1" "implement_auth" 0.95 true "Success!"
74
- npx agentdb skill search "authentication" 10
75
- npx agentdb causal query "" "code_quality" 0.8
76
- npx agentdb learner run
77
-
78
65
  # CLI: Auto-optimization (Agent Booster runs automatically on code edits)
79
66
  npx agentic-flow --agent coder --task "Build a REST API" --optimize
80
67
 
81
68
  # Programmatic: Import any component
82
- import { ReflexionMemory, SkillLibrary, CausalMemoryGraph } from 'agentic-flow/agentdb';
83
69
  import { ModelRouter } from 'agentic-flow/router';
84
70
  import * as reasoningbank from 'agentic-flow/reasoningbank';
85
71
  import { AgentBooster } from 'agentic-flow/agent-booster';
@@ -262,10 +248,18 @@ npx agentic-flow mcp status # Check server status
262
248
  npx agentic-flow --list # List all 79 agents
263
249
  npx agentic-flow agent info coder # Get agent details
264
250
  npx agentic-flow agent create # Create custom agent
251
+
252
+ # Skills management (NEW in v1.5.11+)
253
+ npx agentic-flow skills list # List all installed skills
254
+ npx agentic-flow skills init # Initialize skills directories
255
+ npx agentic-flow skills create # Create agentic-flow example skills
256
+ npx agentic-flow skills init-builder # Install skill-builder framework
257
+ npx agentic-flow skills help # Show skills help
265
258
  ```
266
259
 
267
260
  **Built-in MCP Tools** (7): agent execution, list agents, create agent, agent info, conflicts check, model optimizer, list all agents
268
261
  **External MCP Servers**: claude-flow (101 tools), flow-nexus (96 tools), agentic-payments (10 tools)
262
+ **Skills System**: Create reusable AI workflows with YAML frontmatter and progressive disclosure
269
263
 
270
264
  ---
271
265
 
@@ -381,6 +375,76 @@ for (const file of files) {
381
375
 
382
376
  ---
383
377
 
378
+ ## 🎓 Skills System (Claude Code Integration)
379
+
380
+ **NEW in v1.5.11+**: Create reusable AI workflows with proper YAML frontmatter, progressive disclosure, and Claude Code integration.
381
+
382
+ ### What Are Skills?
383
+
384
+ Skills are structured AI workflows that Claude can autonomously discover and execute across all surfaces (Claude.ai, Claude Code, SDK, API). Each skill is a self-contained SKILL.md file with YAML frontmatter defining its capabilities.
385
+
386
+ ### Quick Start
387
+
388
+ ```bash
389
+ # Initialize skills directories
390
+ npx agentic-flow skills init # Creates ~/.claude/skills and .claude/skills
391
+
392
+ # Install skill-builder framework (for creating custom skills)
393
+ npx agentic-flow skills init-builder # Adds skill-builder to your project
394
+
395
+ # Create example agentic-flow skills
396
+ npx agentic-flow skills create # Creates AgentDB, swarm, reasoningbank skills
397
+
398
+ # List all installed skills
399
+ npx agentic-flow skills list # Shows personal and project skills
400
+
401
+ # Get help
402
+ npx agentic-flow skills help # Show all commands and usage
403
+ ```
404
+
405
+ ### Skill Structure
406
+
407
+ Every skill requires a SKILL.md file with YAML frontmatter:
408
+
409
+ ```yaml
410
+ ---
411
+ name: "Skill Name" # REQUIRED: Max 64 chars
412
+ description: "What this skill does # REQUIRED: Max 1024 chars
413
+ and when Claude should use it." # Include BOTH what & when
414
+ ---
415
+
416
+ # Skill Name
417
+
418
+ ## What This Skill Does
419
+ [Instructions for Claude]
420
+
421
+ ## Quick Start
422
+ [Basic usage examples]
423
+
424
+ ## Prerequisites
425
+ [Requirements]
426
+ ```
427
+
428
+ ### Built-in Skills
429
+
430
+ - **skill-builder** - Create new Claude Code Skills with proper structure
431
+ - **agentdb-memory-patterns** - Persistent memory patterns for AI agents
432
+ - **agentdb-vector-search** - Semantic search with AgentDB
433
+ - **reasoningbank-intelligence** - Adaptive learning and pattern recognition
434
+ - **swarm-orchestration** - Multi-agent coordination workflows
435
+
436
+ ### Benefits
437
+
438
+ - ✅ **Reusable**: Share skills across projects and teams
439
+ - ✅ **Discoverable**: Claude finds and uses skills automatically
440
+ - ✅ **Structured**: YAML frontmatter ensures consistency
441
+ - ✅ **Progressive**: Expand details only when needed
442
+ - ✅ **Validated**: Built-in validation catches errors early
443
+
444
+ **Learn More:** [Skills Documentation](https://github.com/ruvnet/agentic-flow/tree/main/agentic-flow/.claude/skills)
445
+
446
+ ---
447
+
384
448
  ## 🎛️ Programmatic API
385
449
 
386
450
  ### Multi-Model Router
package/dist/cli-proxy.js CHANGED
@@ -31,8 +31,10 @@ import { parseArgs } from "./utils/cli.js";
31
31
  import { getAgent, listAgents } from "./utils/agentLoader.js";
32
32
  import { claudeAgent } from "./agents/claudeAgent.js";
33
33
  import { handleReasoningBankCommand } from "./utils/reasoningbankCommands.js";
34
+ import { handleAgentDBCommand } from "./utils/agentdbCommands.js";
34
35
  import { handleConfigCommand } from "./cli/config-wizard.js";
35
36
  import { handleAgentCommand } from "./cli/agent-manager.js";
37
+ import { handleSkillsCommand } from "./cli/skills-manager.js";
36
38
  import { ModelOptimizer } from "./utils/modelOptimizer.js";
37
39
  import { detectModelCapabilities } from "./utils/modelCapabilities.js";
38
40
  import { AgentBoosterPreprocessor } from "./utils/agentBoosterPreprocessor.js";
@@ -54,7 +56,7 @@ class AgenticFlowCLI {
54
56
  process.exit(0);
55
57
  }
56
58
  // If no mode and no agent specified, show help
57
- if (!options.agent && options.mode !== 'list' && !['config', 'agent-manager', 'mcp-manager', 'proxy', 'quic', 'claude-code', 'mcp', 'reasoningbank'].includes(options.mode)) {
59
+ if (!options.agent && options.mode !== 'list' && !['config', 'agent-manager', 'mcp-manager', 'agentdb', 'skills', 'proxy', 'quic', 'claude-code', 'mcp', 'reasoningbank'].includes(options.mode)) {
58
60
  this.printHelp();
59
61
  process.exit(0);
60
62
  }
@@ -74,6 +76,18 @@ class AgenticFlowCLI {
74
76
  await handleAgentCommand(agentArgs);
75
77
  process.exit(0);
76
78
  }
79
+ if (options.mode === 'agentdb') {
80
+ // Handle AgentDB commands
81
+ const agentdbArgs = process.argv.slice(3); // Skip 'node', 'cli-proxy.js', 'agentdb'
82
+ await handleAgentDBCommand(agentdbArgs);
83
+ process.exit(0);
84
+ }
85
+ if (options.mode === 'skills') {
86
+ // Handle Skills commands
87
+ const skillsArgs = process.argv.slice(3); // Skip 'node', 'cli-proxy.js', 'skills'
88
+ await handleSkillsCommand(skillsArgs);
89
+ process.exit(0);
90
+ }
77
91
  if (options.mode === 'mcp-manager') {
78
92
  // Handle MCP manager commands (add, list, remove, etc.)
79
93
  const { spawn } = await import('child_process');
@@ -892,6 +906,7 @@ COMMANDS:
892
906
  config [subcommand] Manage environment configuration (interactive wizard)
893
907
  mcp <command> [server] Manage MCP servers (start, stop, status, list)
894
908
  agent <command> Agent management (list, create, info, conflicts)
909
+ agentdb <command> AgentDB vector database management (init, search, migrate, etc.)
895
910
  proxy [options] Run standalone proxy server for Claude Code/Cursor
896
911
  quic [options] Run QUIC transport proxy for ultra-low latency (50-70% faster)
897
912
  claude-code [options] Spawn Claude Code with auto-configured proxy
@@ -920,6 +935,21 @@ AGENT COMMANDS:
920
935
  npx agentic-flow agent info <name> Show detailed agent information
921
936
  npx agentic-flow agent conflicts Check for package/local conflicts
922
937
 
938
+ AGENTDB COMMANDS (Vector Database for ReasoningBank):
939
+ npx agentic-flow agentdb init Initialize AgentDB database
940
+ npx agentic-flow agentdb search Search similar patterns (vector similarity)
941
+ npx agentic-flow agentdb insert Insert pattern with embedding
942
+ npx agentic-flow agentdb train Train learning model on experiences
943
+ npx agentic-flow agentdb stats Display database statistics
944
+ npx agentic-flow agentdb optimize Optimize database (consolidation, pruning)
945
+ npx agentic-flow agentdb migrate Migrate from legacy ReasoningBank
946
+ npx agentic-flow agentdb export Export patterns to JSON
947
+ npx agentic-flow agentdb import Import patterns from JSON
948
+ npx agentic-flow agentdb help Show detailed AgentDB help
949
+
950
+ Performance: 150x-12,500x faster than legacy ReasoningBank
951
+ Features: HNSW indexing, learning plugins, reasoning agents, QUIC sync
952
+
923
953
  OPTIONS:
924
954
  --task, -t <task> Task description for agent mode
925
955
  --model, -m <model> Model to use (triggers OpenRouter if contains "/")
@@ -1018,11 +1048,12 @@ OPENROUTER MODELS (Best Free Tested):
1018
1048
  All models above support OpenRouter leaderboard tracking via HTTP-Referer headers.
1019
1049
  See https://openrouter.ai/models for full model catalog.
1020
1050
 
1021
- MCP TOOLS (213+ available):
1051
+ MCP TOOLS (223+ available):
1022
1052
  • agentic-flow: 7 tools (agent execution, creation, management, model optimization)
1023
1053
  • claude-flow: 101 tools (neural networks, GitHub, workflows, DAA)
1024
1054
  • flow-nexus: 96 cloud tools (sandboxes, distributed swarms, templates)
1025
1055
  • agentic-payments: 6 tools (payment authorization, multi-agent consensus)
1056
+ • agentdb: 10 tools (vector search, learning, reasoning, optimization)
1026
1057
 
1027
1058
  OPTIMIZATION BENEFITS:
1028
1059
  💰 Cost Savings: 85-98% cheaper models for same quality tasks
@@ -533,198 +533,7 @@ server.addTool({
533
533
  }
534
534
  }
535
535
  });
536
- // ========================================
537
- // AgentDB Vector Database Tools (Core 5)
538
- // ========================================
539
- // Tool: Get database statistics
540
- server.addTool({
541
- name: 'agentdb_stats',
542
- description: 'Enhanced database statistics including table counts, memory usage, and performance metrics for all AgentDB tables.',
543
- parameters: z.object({}),
544
- execute: async () => {
545
- try {
546
- const cmd = `npx agentdb db stats`;
547
- const result = execSync(cmd, {
548
- encoding: 'utf-8',
549
- maxBuffer: 5 * 1024 * 1024,
550
- timeout: 10000
551
- });
552
- return JSON.stringify({
553
- success: true,
554
- stats: result.trim(),
555
- timestamp: new Date().toISOString()
556
- }, null, 2);
557
- }
558
- catch (error) {
559
- throw new Error(`Failed to get database stats: ${error.message}`);
560
- }
561
- }
562
- });
563
- // Tool: Store reasoning pattern
564
- server.addTool({
565
- name: 'agentdb_pattern_store',
566
- description: 'Store a reasoning pattern in ReasoningBank for future retrieval and learning. Patterns capture successful problem-solving approaches.',
567
- parameters: z.object({
568
- sessionId: z.string().describe('Session identifier for the pattern'),
569
- task: z.string().describe('Task description that was solved'),
570
- reward: z.number().min(0).max(1).describe('Success metric (0-1, where 1 is perfect success)'),
571
- success: z.boolean().describe('Whether the task was completed successfully'),
572
- critique: z.string().optional().describe('Self-reflection or critique of the approach'),
573
- input: z.string().optional().describe('Input or context for the task'),
574
- output: z.string().optional().describe('Output or solution generated'),
575
- latencyMs: z.number().optional().describe('Time taken in milliseconds'),
576
- tokensUsed: z.number().optional().describe('Number of tokens consumed')
577
- }),
578
- execute: async ({ sessionId, task, reward, success, critique, input, output, latencyMs, tokensUsed }) => {
579
- try {
580
- const args = [
581
- sessionId,
582
- `"${task}"`,
583
- reward.toString(),
584
- success.toString()
585
- ];
586
- if (critique)
587
- args.push(`"${critique}"`);
588
- if (input)
589
- args.push(`"${input}"`);
590
- if (output)
591
- args.push(`"${output}"`);
592
- if (latencyMs !== undefined)
593
- args.push(latencyMs.toString());
594
- if (tokensUsed !== undefined)
595
- args.push(tokensUsed.toString());
596
- const cmd = `npx agentdb reflexion store ${args.join(' ')}`;
597
- const result = execSync(cmd, {
598
- encoding: 'utf-8',
599
- maxBuffer: 10 * 1024 * 1024,
600
- timeout: 30000
601
- });
602
- return JSON.stringify({
603
- success: true,
604
- sessionId,
605
- task: task.substring(0, 100) + (task.length > 100 ? '...' : ''),
606
- reward,
607
- stored: true,
608
- message: 'Pattern stored successfully in ReasoningBank',
609
- output: result.trim()
610
- }, null, 2);
611
- }
612
- catch (error) {
613
- throw new Error(`Failed to store pattern: ${error.message}`);
614
- }
615
- }
616
- });
617
- // Tool: Search reasoning patterns
618
- server.addTool({
619
- name: 'agentdb_pattern_search',
620
- description: 'Search for similar reasoning patterns in ReasoningBank by task description. Retrieves past successful approaches to guide current problem-solving.',
621
- parameters: z.object({
622
- task: z.string().describe('Task description to search for similar patterns'),
623
- k: z.number().optional().default(5).describe('Number of results to retrieve (default: 5)'),
624
- minReward: z.number().optional().describe('Minimum reward threshold (0-1) to filter results'),
625
- onlySuccesses: z.boolean().optional().describe('Only retrieve successful episodes'),
626
- onlyFailures: z.boolean().optional().describe('Only retrieve failed episodes (for learning)')
627
- }),
628
- execute: async ({ task, k, minReward, onlySuccesses, onlyFailures }) => {
629
- try {
630
- const args = [`"${task}"`, (k || 5).toString()];
631
- if (minReward !== undefined)
632
- args.push(minReward.toString());
633
- if (onlyFailures)
634
- args.push('true', 'false');
635
- else if (onlySuccesses)
636
- args.push('false', 'true');
637
- const cmd = `npx agentdb reflexion retrieve ${args.join(' ')}`;
638
- const result = execSync(cmd, {
639
- encoding: 'utf-8',
640
- maxBuffer: 10 * 1024 * 1024,
641
- timeout: 30000
642
- });
643
- return JSON.stringify({
644
- success: true,
645
- query: task,
646
- k: k || 5,
647
- filters: {
648
- minReward,
649
- onlySuccesses: onlySuccesses || false,
650
- onlyFailures: onlyFailures || false
651
- },
652
- results: result.trim(),
653
- message: `Retrieved ${k || 5} similar patterns from ReasoningBank`
654
- }, null, 2);
655
- }
656
- catch (error) {
657
- throw new Error(`Failed to search patterns: ${error.message}`);
658
- }
659
- }
660
- });
661
- // Tool: Get pattern statistics
662
- server.addTool({
663
- name: 'agentdb_pattern_stats',
664
- description: 'Get aggregated statistics and critique summary for patterns related to a specific task. Provides insights from past attempts.',
665
- parameters: z.object({
666
- task: z.string().describe('Task description to analyze'),
667
- k: z.number().optional().default(5).describe('Number of recent patterns to analyze (default: 5)')
668
- }),
669
- execute: async ({ task, k }) => {
670
- try {
671
- const cmd = `npx agentdb reflexion critique-summary "${task}" ${k || 5}`;
672
- const result = execSync(cmd, {
673
- encoding: 'utf-8',
674
- maxBuffer: 10 * 1024 * 1024,
675
- timeout: 30000
676
- });
677
- return JSON.stringify({
678
- success: true,
679
- task,
680
- analyzedPatterns: k || 5,
681
- summary: result.trim(),
682
- message: 'Pattern statistics and critique summary generated'
683
- }, null, 2);
684
- }
685
- catch (error) {
686
- throw new Error(`Failed to get pattern stats: ${error.message}`);
687
- }
688
- }
689
- });
690
- // Tool: Clear query cache
691
- server.addTool({
692
- name: 'agentdb_clear_cache',
693
- description: 'Clear the AgentDB query cache to free memory or force fresh queries. Useful after bulk updates or when debugging.',
694
- parameters: z.object({
695
- confirm: z.boolean().optional().default(false).describe('Confirmation to clear cache (set to true to proceed)')
696
- }),
697
- execute: async ({ confirm }) => {
698
- try {
699
- if (!confirm) {
700
- return JSON.stringify({
701
- success: false,
702
- message: 'Cache clear operation requires confirmation. Set confirm=true to proceed.',
703
- warning: 'Clearing cache will remove all cached query results and may temporarily impact performance.'
704
- }, null, 2);
705
- }
706
- // Since there's no direct CLI command for cache clearing, we'll provide information
707
- // In a real implementation, this would call a cache management function
708
- const info = {
709
- success: true,
710
- operation: 'cache_clear',
711
- message: 'Query cache cleared successfully',
712
- note: 'AgentDB uses in-memory cache for query optimization. Cache will rebuild automatically on next queries.',
713
- timestamp: new Date().toISOString(),
714
- nextSteps: [
715
- 'First queries after cache clear may be slower',
716
- 'Cache will warm up with frequently accessed patterns',
717
- 'Consider running agentdb_stats to verify memory reduction'
718
- ]
719
- };
720
- return JSON.stringify(info, null, 2);
721
- }
722
- catch (error) {
723
- throw new Error(`Failed to clear cache: ${error.message}`);
724
- }
725
- }
726
- });
727
- console.error('✅ Registered 15 tools (7 agentic-flow + 3 agent-booster + 5 agentdb):');
536
+ console.error('✅ Registered 10 tools (7 agentic-flow + 3 agent-booster):');
728
537
  console.error(' • agentic_flow_agent (execute agent with 13 parameters)');
729
538
  console.error(' • agentic_flow_list_agents (list 66+ agents)');
730
539
  console.error(' • agentic_flow_create_agent (create custom agent)');
@@ -732,14 +541,9 @@ console.error(' • agentic_flow_list_all_agents (list with sources)');
732
541
  console.error(' • agentic_flow_agent_info (get agent details)');
733
542
  console.error(' • agentic_flow_check_conflicts (conflict detection)');
734
543
  console.error(' • agentic_flow_optimize_model (auto-select best model)');
735
- console.error(' • agent_booster_edit_file (352x faster code editing) ⚡');
736
- console.error(' • agent_booster_batch_edit (multi-file refactoring) ⚡');
737
- console.error(' • agent_booster_parse_markdown (LLM output parsing) ⚡');
738
- console.error(' • agentdb_stats (database statistics) 🧠 NEW');
739
- console.error(' • agentdb_pattern_store (store reasoning patterns) 🧠 NEW');
740
- console.error(' • agentdb_pattern_search (search similar patterns) 🧠 NEW');
741
- console.error(' • agentdb_pattern_stats (pattern analytics) 🧠 NEW');
742
- console.error(' • agentdb_clear_cache (clear query cache) 🧠 NEW');
544
+ console.error(' • agent_booster_edit_file (352x faster code editing) ⚡ NEW');
545
+ console.error(' • agent_booster_batch_edit (multi-file refactoring) ⚡ NEW');
546
+ console.error(' • agent_booster_parse_markdown (LLM output parsing) ⚡ NEW');
743
547
  console.error('🔌 Starting stdio transport...');
744
548
  server.start({ transportType: 'stdio' }).then(() => {
745
549
  console.error('✅ Agentic-Flow MCP server running on stdio');
@@ -99,6 +99,10 @@ export async function runTask(options) {
99
99
  consolidated
100
100
  };
101
101
  }
102
+ // AgentDB Integration
103
+ // Ultra-fast vector database drop-in replacement
104
+ // 150x-12,500x faster than legacy implementation
105
+ export { createAgentDBAdapter, createDefaultAgentDBAdapter, migrateToAgentDB, validateMigration } from './agentdb-adapter.js';
102
106
  // Version info
103
107
  export const VERSION = '1.0.0';
104
108
  export const PAPER_URL = 'https://arxiv.org/html/2509.25140v1';
package/dist/utils/cli.js CHANGED
@@ -49,6 +49,16 @@ export function parseArgs() {
49
49
  options.mode = 'reasoningbank';
50
50
  return options;
51
51
  }
52
+ // Check for agentdb command
53
+ if (args[0] === 'agentdb') {
54
+ options.mode = 'agentdb';
55
+ return options;
56
+ }
57
+ // Check for skills command
58
+ if (args[0] === 'skills') {
59
+ options.mode = 'skills';
60
+ return options;
61
+ }
52
62
  for (let i = 0; i < args.length; i++) {
53
63
  const arg = args[i];
54
64
  switch (arg) {
@@ -155,6 +165,7 @@ USAGE:
155
165
  npx agentic-flow [COMMAND] [OPTIONS]
156
166
 
157
167
  COMMANDS:
168
+ skills <command> Claude Code Skills management (init, create, list)
158
169
  reasoningbank <cmd> Memory system that learns from experience (demo, test, init)
159
170
  claude-code [options] Spawn Claude Code with proxy + Agent Booster (57x faster edits)
160
171
  mcp <command> [server] Manage MCP servers (start, stop, status, list)
@@ -171,6 +182,12 @@ REASONINGBANK COMMANDS:
171
182
  npx agentic-flow reasoningbank benchmark Run performance benchmarks
172
183
  npx agentic-flow reasoningbank status Show memory statistics
173
184
 
185
+ SKILLS COMMANDS:
186
+ npx agentic-flow skills init [location] Initialize skills directories (personal/project/both)
187
+ npx agentic-flow skills create Create example agentic-flow skills
188
+ npx agentic-flow skills list List all installed skills
189
+ npx agentic-flow skills help Show skills help
190
+
174
191
  MCP COMMANDS:
175
192
  npx agentic-flow mcp start [server] Start MCP server(s)
176
193
  npx agentic-flow mcp stop [server] Stop MCP server(s)
@@ -216,6 +233,11 @@ OPTIONS:
216
233
  --help, -h Show this help message
217
234
 
218
235
  EXAMPLES:
236
+ # Skills (Claude Code integration!)
237
+ npx agentic-flow skills init # Initialize skills directories
238
+ npx agentic-flow skills create # Create agentdb-quickstart skill
239
+ npx agentic-flow skills list # List all installed skills
240
+
219
241
  # ReasoningBank (Learn from agent experience!)
220
242
  npx agentic-flow reasoningbank demo # See 0% → 100% success transformation
221
243
  npx agentic-flow reasoningbank test # Run 27 validation tests