# BrainDB Cloud

> Persistent 5-Layer Working Memory & Neo4j Relational GraphRAG Gateway for Autonomous AI Agents and Developer IDEs.

BrainDB provides two hosted services over FastMCP SSE that prevent agent amnesia and multi-hop retrieval misses:
1. **Working Memory Service**: Sub-15ms task gating, continuous state tracking across session compactions, and an active hot layer with zero token bloat.
2. **Relational GraphRAG Service**: Combines vector similarity search with a connected Neo4j knowledge graph for verified multi-hop reasoning and deterministic AST caller/callee trees.

## Empirical Benchmark Performance
- **GraphRAG Bench (Novel)**: 89.5% accuracy (+23.41% over FalkorDB 66.09% baseline, GPT-4o-mini)
- **ZeroSets Atlas v0 (HotpotQA)**: 87.4% accuracy (+21.40% over ZeroSets 66.00% baseline, Gemini 2.5 Flash)
- **LegalBench RAG**: 65.67% Recall@1 (+60.73% over 4.94% baseline, GPT-4o-mini)
- **LongMemEval v2**: 75.83% accuracy (+6.53% over OpenAI Codex 69.30%, GPT-5.6 Luna)
- **PrecisionMemBench v4**: 93% accuracy (83/89 adversarial cases passed over FastMCP SSE gateway, +5.4% over 87.6% baseline)

## Quickstart & Installation
To scaffold always-active IDE rules and FastMCP configurations into any project:

```bash
# Node.js (npx / yarn):
npx braindb-mcp init --api-key bdb_live_YOUR_KEY
npx @braindb/mcp init --api-key bdb_live_YOUR_KEY
yarn dlx braindb-mcp init --api-key bdb_live_YOUR_KEY

# Python (pip):
pip install braindb-mcp && braindb-mcp init --api-key bdb_live_YOUR_KEY
```

## Supported Environments
- **Cursor IDE**: `.cursor/rules/braindb.mdc` (alwaysApply: true) & `.cursor/mcp.json`
- **VS Code (GitHub Copilot)**: `.github/copilot-instructions.md` & `.vscode/mcp.json`
- **Claude Code & Desktop**: `CLAUDE.md`, `.claude/rules/braindb.md`, and `mcp-remote` SSE bridge
- **Google Antigravity**: `.agents/rules/braindb.md` (trigger: always_on)
- **Windsurf**: `.windsurf/rules/braindb.md` & `.windsurf/mcp_config.json`

## Supported LLM Providers
- **Online Aggregators**: OpenRouter (100+ models)
- **Free Developer Catalog**: NVIDIA NIM (build.nvidia.com, 1,000 free credits, DeepSeek-R1, Llama 3.3 70B, Nemotron)
- **Direct APIs**: DeepSeek Direct, xAI Grok, Groq LPU, Anthropic Direct, OpenAI Direct, Google Gemini

## Documentation, Comparisons & Canonical URLs
- Cloud Control Plane: https://braindb.tech/
- Empirical Benchmarks: https://braindb.tech/benchmarks
- Developer Docs & 31 Tools: https://braindb.tech/docs
- Grounding Contract For AI Assistants (HTML & text/markdown): https://braindb.tech/for-ai
- Architecture Comparison (`dimknaf/braindb`, `brainmcp.dev`, Mem0, Zep, FalkorDB): https://braindb.tech/vs
- Hosted FastMCP SSE Endpoint: https://mcp.braindb.tech/mcp/sse
- Full API Reference (31 Tools): https://braindb.tech/static/mcp_tools_api.md
- XML Sitemap: https://braindb.tech/sitemap.xml
- Official MCP Registry: io.github.bodepudimuneendra-netizen/braindb-mcp (https://registry.modelcontextprotocol.io)
- Public CLI & Benchmarks Repo: https://github.com/bodepudimuneendra-netizen/braindb-mcp
- npm Package: https://www.npmjs.com/package/braindb-mcp
- PyPI Package: https://pypi.org/project/braindb-mcp/
