agentdb 1.1.8 ā 1.1.9
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.
- package/dist/cli/agentdb-cli.js +72 -0
- package/package.json +1 -1
package/dist/cli/agentdb-cli.js
CHANGED
|
@@ -428,6 +428,68 @@ class AgentDBCLI {
|
|
|
428
428
|
// ============================================================================
|
|
429
429
|
// CLI Entry Point
|
|
430
430
|
// ============================================================================
|
|
431
|
+
async function handleMcpCommands(subcommand, args) {
|
|
432
|
+
if (!subcommand || subcommand === 'start') {
|
|
433
|
+
log.header('\nš Starting AgentDB MCP Server');
|
|
434
|
+
log.info('Protocol: stdio (for Claude Desktop)');
|
|
435
|
+
log.info('Tools: 15+ frontier memory and vector operations\n');
|
|
436
|
+
|
|
437
|
+
console.log('š” Add to Claude Desktop config (~/.config/Claude/claude_desktop_config.json):');
|
|
438
|
+
console.log(JSON.stringify({
|
|
439
|
+
mcpServers: {
|
|
440
|
+
agentdb: {
|
|
441
|
+
command: 'npx',
|
|
442
|
+
args: ['-y', 'agentdb@latest', 'mcp']
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
}, null, 2));
|
|
446
|
+
console.log('\nš Available Tools:');
|
|
447
|
+
console.log(' ⢠reflexion_store - Store episodes with self-critique');
|
|
448
|
+
console.log(' ⢠reflexion_retrieve - Retrieve relevant past episodes');
|
|
449
|
+
console.log(' ⢠skill_create - Create reusable skills');
|
|
450
|
+
console.log(' ⢠skill_search - Search skills by similarity');
|
|
451
|
+
console.log(' ⢠causal_add_edge - Add causal relationships');
|
|
452
|
+
console.log(' ⢠causal_query - Query causal effects');
|
|
453
|
+
console.log(' ⢠recall_with_certificate - Causal utility recall');
|
|
454
|
+
console.log(' ⢠learner_discover - Auto-discover patterns');
|
|
455
|
+
console.log(' ⢠db_stats - Database statistics');
|
|
456
|
+
console.log(' ⢠...and 6 more!\n');
|
|
457
|
+
|
|
458
|
+
log.warning('Note: Full MCP server implementation coming in AgentDB v1.2.0');
|
|
459
|
+
log.info('Current: Use CLI commands directly or via agentic-flow MCP');
|
|
460
|
+
log.info('Workaround: npx agentic-flow@latest mcp (includes agentdb tools)');
|
|
461
|
+
}
|
|
462
|
+
else if (subcommand === 'list' || subcommand === 'tools') {
|
|
463
|
+
console.log('\nš¦ AgentDB MCP Tools (15 total)\n');
|
|
464
|
+
console.log('Reflexion Memory:');
|
|
465
|
+
console.log(' 1. reflexion_store - Store episodes with critique');
|
|
466
|
+
console.log(' 2. reflexion_retrieve - Retrieve relevant episodes');
|
|
467
|
+
console.log(' 3. reflexion_critique_summary - Get critique lessons\n');
|
|
468
|
+
console.log('Skill Library:');
|
|
469
|
+
console.log(' 4. skill_create - Create reusable skill');
|
|
470
|
+
console.log(' 5. skill_search - Search skills');
|
|
471
|
+
console.log(' 6. skill_consolidate - Auto-create from episodes\n');
|
|
472
|
+
console.log('Causal Memory:');
|
|
473
|
+
console.log(' 7. causal_add_edge - Add causal edge');
|
|
474
|
+
console.log(' 8. causal_query - Query causal effects');
|
|
475
|
+
console.log(' 9. causal_experiment_create - Create A/B test');
|
|
476
|
+
console.log(' 10. causal_experiment_calculate - Calculate uplift\n');
|
|
477
|
+
console.log('Causal Recall:');
|
|
478
|
+
console.log(' 11. recall_with_certificate - Retrieve with provenance\n');
|
|
479
|
+
console.log('Nightly Learner:');
|
|
480
|
+
console.log(' 12. learner_discover - Auto-discover patterns');
|
|
481
|
+
console.log(' 13. learner_prune - Clean low-quality edges\n');
|
|
482
|
+
console.log('Database:');
|
|
483
|
+
console.log(' 14. db_stats - Database statistics');
|
|
484
|
+
console.log(' 15. db_export - Export data\n');
|
|
485
|
+
}
|
|
486
|
+
else {
|
|
487
|
+
log.error(`Unknown mcp subcommand: ${subcommand}`);
|
|
488
|
+
console.log('\nUsage:');
|
|
489
|
+
console.log(' agentdb mcp [start] - Start MCP server (stdio)');
|
|
490
|
+
console.log(' agentdb mcp list - List available MCP tools');
|
|
491
|
+
}
|
|
492
|
+
}
|
|
431
493
|
async function main() {
|
|
432
494
|
const args = process.argv.slice(2);
|
|
433
495
|
if (args.length === 0 || args[0] === 'help' || args[0] === '--help' || args[0] === '-h') {
|
|
@@ -458,6 +520,9 @@ async function main() {
|
|
|
458
520
|
else if (command === 'db') {
|
|
459
521
|
await handleDbCommands(cli, subcommand, args.slice(2));
|
|
460
522
|
}
|
|
523
|
+
else if (command === 'mcp') {
|
|
524
|
+
await handleMcpCommands(subcommand, args.slice(2));
|
|
525
|
+
}
|
|
461
526
|
else {
|
|
462
527
|
log.error(`Unknown command: ${command}`);
|
|
463
528
|
printHelp();
|
|
@@ -700,6 +765,13 @@ ${colors.bright}DATABASE COMMANDS:${colors.reset}
|
|
|
700
765
|
agentdb db stats
|
|
701
766
|
Show database statistics
|
|
702
767
|
|
|
768
|
+
${colors.bright}MCP INTEGRATION:${colors.reset}
|
|
769
|
+
agentdb mcp [start]
|
|
770
|
+
Start MCP server for Claude Desktop integration
|
|
771
|
+
|
|
772
|
+
agentdb mcp list
|
|
773
|
+
List all available MCP tools
|
|
774
|
+
|
|
703
775
|
${colors.bright}ENVIRONMENT:${colors.reset}
|
|
704
776
|
AGENTDB_PATH Database file path (default: ./agentdb.db)
|
|
705
777
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agentdb",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.9",
|
|
4
4
|
"description": "AgentDB - Frontier Memory Features: Causal reasoning, reflexion memory, skill library, explainable recall, and automated learning for AI agents. 150x faster vector search with HNSW indexing.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|