{"id":18098,"library":"agentdb","title":"AgentDB","description":"AgentDB v3 (3.0.0-alpha.11) is a proof-gated graph intelligence database for AI agents, requiring cryptographic proof for every state mutation. It provides native Rust performance via @ruvector/graph-transformer with 8 verified graph modules, including HNSW search, causal reasoning, and reflexion memory. The library supports episodic memory, skill libraries, and lifelong learning with explainable provenance. Released as alpha, it targets Node.js >=18.0.0 and ships TypeScript types. Key differentiators: mandatory proof verification on mutations, causal reasoning capabilities, and native Rust acceleration.","status":"active","version":"3.0.0-alpha.11","language":"javascript","source_language":"en","source_url":"https://github.com/ruvnet/agentic-flow","tags":["javascript","agentdb","vector-database","ai-agents","memory","causal-reasoning","reflexion","episodic-memory","skill-library","typescript"],"install":[{"cmd":"npm install agentdb","lang":"bash","label":"npm"},{"cmd":"yarn add agentdb","lang":"bash","label":"yarn"},{"cmd":"pnpm add agentdb","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Core graph engine providing native Rust performance for graph operations and HNSW search.","package":"@ruvector/graph-transformer","optional":false},{"reason":"Required for cryptographic proof generation and verification on state mutations.","package":"crypto","optional":false}],"imports":[{"note":"AgentDB v3 is ESM-only. Use ESM imports; CJS require will fail.","wrong":"const AgentDB = require('agentdb')","symbol":"AgentDB","correct":"import { AgentDB } from 'agentdb'"},{"note":"initGraph is exported from a subpath 'agentdb/graph', not the main package entry.","wrong":"import { initGraph } from 'agentdb'","symbol":"initGraph","correct":"import { initGraph } from 'agentdb/graph'"},{"note":"Proof is a TypeScript type only. Use type import to avoid runtime overhead.","wrong":"import { Proof } from 'agentdb'","symbol":"Proof","correct":"import type { Proof } from 'agentdb/types'"}],"quickstart":{"code":"import { AgentDB } from 'agentdb';\nimport { initGraph } from 'agentdb/graph';\nimport type { Proof } from 'agentdb/types';\n\nasync function main() {\n  const db = await AgentDB.create({ path: './agentdb_data' });\n  const graph = await initGraph({ type: 'memory', dimensions: 128 });\n  await graph.insert({ id: '1', vector: new Float32Array(128).fill(0.5), metadata: { task: 'learn' } });\n  const proof: Proof = await graph.prove({ id: '1' });\n  console.log('Proof:', proof.hash);\n  const results = await graph.search({ vector: new Float32Array(128).fill(0.4), k: 10 });\n  console.log('Search results:', results);\n  await db.close();\n}\nmain().catch(console.error);","lang":"typescript","description":"Creates an AgentDB instance, initializes a memory graph with 128 dimensions, inserts a node, generates a cryptographic proof, and performs a search query."},"warnings":[{"fix":"Update all code to use the new v3 API. Refer to migration guide at https://github.com/ruvnet/agentic-flow/wiki/v3-migration.","message":"AgentDB v3 is a complete rewrite. APIs from v2.x are incompatible. Migrate by reviewing new proof-gated mutation patterns.","severity":"breaking","affected_versions":">=3.0.0 <4.0.0"},{"fix":"Replace Agent with AgentDB.create() and MemoryGraph with initGraph(). Use subpath imports for specific modules.","message":"The old v2 API symbols like Agent, MemoryGraph are no longer exported; use AgentDB and initGraph instead.","severity":"deprecated","affected_versions":">=3.0.0"},{"fix":"Always call .prove() before mutation or use the proof returned from the mutation method if available.","message":"All graph mutations (insert, update, delete) require a valid cryptographic proof. Omitting proof will throw an error.","severity":"gotcha","affected_versions":">=3.0.0"},{"fix":"Upgrade Node.js to 18 or later. If stuck on older Node, use agentdb v2.x (last v2 release is 2.3.6).","message":"Node.js versions below 18 are not supported. The package uses global fetch and Web Crypto API.","severity":"breaking","affected_versions":">=3.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Change to import { AgentDB } from 'agentdb' and ensure your project uses ES modules (set 'type': 'module' in package.json).","cause":"Using CJS require() on an ESM-only package.","error":"TypeError: agentdb_1.AgentDB is not a constructor"},{"fix":"Before mutating, call graph.prove() with the appropriate parameters and pass the proof to the mutation method.","cause":"Mutations attempted without a valid cryptographic proof.","error":"Error: Proof verification failed: invalid signature"},{"fix":"If using TypeScript, ensure 'moduleResolution' is set to 'node16' or 'bundler'. For JavaScript, check that the package is correctly installed.","cause":"Subpath import not resolved; possibly due to bundler misconfiguration or missing types.","error":"Cannot find module 'agentdb/graph' or its corresponding type declarations."}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}