Ratary is an open-source AI Brain Platform built by Ontorata, designed to provide persistent memory, structured knowledge, and intelligent retrieval capabilities for AI models and agents. It sits between AI clients and storage, independent of any single vendor, IDE, or agent framework.
Purpose Solves the problem of AI forgetting context between different sessions. Models forget yesterday's architectural decisions, agents lose customer context between runs, and coding assistants cannot recall why Postgres was chosen over DynamoDB. Ratary provides a persistent, structured, retrievable, and user-owned memory layer.
Key Capabilities
- Memory intelligence: persistent memory with support for summaries, codenames, favorites, archiving, and handoff; version history with support for restore and merge. Semantic enrichment, relational linking, and graph traversal make memory navigable knowledge.
- Hybrid search: hybrid search across SQL, vector, lexical indexes, and graphs, distinguishing browsing from injection, with optional precision modes (hybrid, semantic, fulltext, title).
- Reasoning support: progressive retrieval, token budgets, and summary-first context assembly, typically reducing tokens by about 85% compared with dumping the full memory body into the prompt. Quality signals, consolidation, and compression, with optional pipelines, improve the brain without retraining the model.
- External agent support: capability manifests, workspace scoping, and 28 Ratary MCP tools. External agents can discover brain capabilities, and Ratary never embeds agent reasoning.
- Pluggable adapters: SQL metadata storage can optionally use Postgres, Supabase, MariaDB/MySQL, D1, TiDB/Cockroach, as well as optional pgvector, R2/S3/MinIO, Azure Blob, GCS, Meilisearch, OpenSearch, Neo4j, Redis, DuckDB, ClickHouse. The same application code works across all backends.
- Self-hosted stack: provides postgres or enterprise (MariaDB + MinIO + Redis) configurations.
- Cloud and enterprise: self-host, deploy to Vercel, or run a control plane with metering and federation. RBAC workspaces, audit trails, SSO, and policy hooks. OpenTelemetry, Prometheus metrics, SLO dashboards, and cost visibility.
- Developer experience: OpenAPI, npm @ratary/sdk@1.1.0, @ratary/cli@1.1.0, @ratary/mcp-server@1.1.3, and one-click IDE setup (npm run setup).
- Knowledge Fabric (optional): ingestion from external systems of record, including Notion (hosted production is live), Confluence, Google Drive, SharePoint, and Teams connectors. Webhook HMAC, incremental sync, memory provenance. Enabled via the KNOWLEDGE_FABRIC_ENABLED and CONNECTOR_SYNC_ENABLED flags.
How to Use Prerequisites: Node.js 24 and SQL metadata storage (choose any one; Postgres is the template default). Path A: PostgreSQL (npm + local or Docker). Or use Docker: docker compose --profile postgres up --build — see docs/DOCKER.md. Path B: Cloudflare D1. API address:http://localhost:9876,Swagger Documentation is in /docs. The first REST call requires bootstrapping to obtain an API key (aic_...), see GUIDE — First REST API key. Full guide: docs/GUIDE.md, SDK and MCP examples in docs/examples/. npm packages (@ratary): client libraries are published on npm under the @ratary scope, product name published by Ontorata. No need to clone the server for SDK, CLI, or hosted MCP. Set RATARY_BASE_URL and RATARY_API_KEY (aic_...). Details: packages/README.md and remote MCP installation.
How the architecture works Write: persist memories via Ratary MCP or REST. Enrich: summarization, embedding, and association happen asynchronously. Retrieve: assemble the smallest useful context slice. Learn: optional signals and consolidation improve recall over time. Reuse: one brain across IDEs, agents, and APIs.
When to use it Suitable for AI applications, agents, coding assistants, and enterprise AI systems that need persistent memory. Developers can own memory and use a unified brain across Cursor, Claude Code, custom agents, and remote MCP hosts.
Limitations and notes Ratary does not replace pgvector, LangGraph, or your chosen agent; it complements the existing stack. It does not embed agent reasoning. Enterprise modules are selectively enabled via environment flags and remain lean by default. Ratary MCP is the official memory MCP implementation (stdio in this repository, npm @ratary/mcp-server for hosted REST), different from Ontorata MCP (ecosystem gateway, separate repository).
Project status As of 2026-07-19: Notion + fabric/federation flags enabled on Vercel; D1 db:migrate complete; SDK codegen CI complete; Confluence/Drive/SharePoint/Teams credentials pending; Keycloak IdP pending; MCP listings mostly listed. Platform modules are selectively enabled by default via environment flags.
Contributing Submit PRs to ontorata/ratary: fork → branch → npm run lint && npm run build && npm test → PR. Standard PR gates include build, tests, etc. Organization memory/recall changes require running the full gates, see docs/RATARY-VALIDATION-RUNBOOK.md. For production operations changes see docs/OPS-PRODUCTION-VERIFY.md.
License MIT License.