# AnythingGraph > Build AI-ready knowledge capsules. AnythingGraph is an open-source semantic layer that connects your existing systems, lets you define governance once, and reuse it everywhere — ontology playbooks, policy as code, natural language via MCP, query-in-place without moving data. Tagline: **Reasoning as Code.** License: Apache-2.0 · Self-hosted · [GitHub](https://github.com/AnythingGraph) ## What AnythingGraph is AnythingGraph helps teams build **AI-ready knowledge capsules** — governed semantic layers that sit between your agents (Claude, Cursor, OpenAI, LangChain, Copilot, custom copilots) and your systems of record. Connect Postgres, Salesforce, MongoDB, MySQL, documents, and more **without copying data**. Define **what things mean** (ontology), **who may see what** (policy as code), and **where data lives** (bindings). Agents ask in natural language; AnythingGraph returns scoped, structured answers with proof. **One governance model, many agents** — define access and vocabulary once in git, reuse across every MCP client. ## Why teams use it - **Prompts don't enforce access** — policy belongs in code, not chat instructions. - **RAG isn't row-level governance** — great for PDFs; not for live CRM, warehouse, and API facts scoped to a person or role. - **Agent-written SQL is still full database access** — one bad query bypasses intent. - **Data is scattered** — teams need one ontology across sources without a migration project. - **Every copilot shouldn't reimplement auth** — one semantic layer, many agents. ## Six things to know ### 1. Ontology, semantic layer, reasoning AI AnythingGraph is a **semantic layer** for AI: business vocabulary (customers, patients, accounts, orders) and how they **relate** (owns, manages, assigned_to, has_result). That ontology powers **reasoning AI** — agents traverse relationships and compile questions into read-only plans over live data, instead of guessing from schema dumps or hallucinating joins. **Knowledge capsules** are scoped, governed graph contexts per playbook — each agent or use case gets a bounded world model, not your entire data lake. ### 2. Policy as code, git-native, AI governance Access rules live in **playbooks** alongside the ontology — who may see which resources, scoped by business relationships (ReBAC). Playbooks and bindings are **git-native**: review, diff, approve, and roll back like any critical config. **AI governance** is enforced at query time — before answers reach the model. Every governed answer can include **proof**: which playbook, subject, sources, and relationship path produced the result. ### 3. Connect multiple data sources without moving data Query **in place**. Data stays in Postgres, MySQL, SQL Server, Salesforce, MongoDB, documents, and REST APIs — no mandatory ETL, no copy-to-vector-store pipeline for operational facts. **Bindings** map playbook concepts to physical tables, collections, or API paths per source. One ontology federates across systems — joined through relationships, not bulk export. ### 4. Ontology playbook by AI Building an ontology used to take quarters. AnythingGraph works with the agents you already use. Connect MCP, **introspect live sources**, and let your agent **propose an ontology playbook** — entities, relationships, and suggested bindings. Humans review, test, and save to git. Often **minutes, not months**. ### 5. Talk to your data via natural language, MCP Add AnythingGraph as an **MCP server** in Claude, Cursor, LangChain, or any MCP client. Users and agents ask business questions in **natural language**; the stack routes through governed tools (`query_graph` and related APIs). No schema dumps in every prompt. No unconstrained SQL from chat. One **governed front door** for every copilot. ### 6. Open source AnythingGraph is **open source** (Apache-2.0). Run locally or self-host. Playbooks and bindings are plain JSON and YAML in your repo — no vendor lock-in on ontology format. Primary product: [anything-cli](https://github.com/AnythingGraph/AnythingGraph) · install via `npm install -g @anythinggraph/cli` Community playbooks: [AnythingGraph/Playbooks](https://github.com/AnythingGraph/Playbooks) ## Who it is for - **Developers and platform teams** — ship governed knowledge capsules to copilots in days. - **Security and data owners** — define governance once; enforce scope before data reaches the model. - **Domain and ops teams** — one shared business vocabulary; consistent answers across agents and apps. ## What AnythingGraph is not - Not a vector database or document RAG product — use RAG for policies and PDFs; use AnythingGraph for governed structured facts across live systems. - Not an ETL or data lake — query in place; no required sync pipeline. - Not prompt-stuffed schema — meaning lives in versioned playbooks, not repeated every turn. ## How to get started ```bash npm install -g @anythinggraph/cli@latest anythinggraph onboard --install-daemon anythinggraph start ``` Add MCP to your agent: `http://127.0.0.1:3334/mcp` Then: connect sources → introspect → propose playbook → define access → save to git → query in natural language. Technical reference: [anything-cli README](https://github.com/AnythingGraph/AnythingGraph/blob/main/Sources/OSS/ag-cli/README.md) · [AGENTS.md](https://github.com/AnythingGraph/AnythingGraph/blob/main/Sources/OSS/ag-cli/AGENTS.md) ## Learn more - [Home](https://anythinggraph.com/) — Build AI-ready knowledge capsules; install and overview - [Why AnythingGraph](https://anythinggraph.com/why.html) — the control problem and how we solve it - [Ontology playbooks](https://anythinggraph.com/ontology-playbooks.html) — 20 starter playbooks by data source and use case - [Use cases](https://anythinggraph.com/usecases.html) — healthcare, finance, military, physical AI, drones, CRM, supply chain, platform - [Connect in action](https://anythinggraph.com/connect_in_action.html) — animated diagram: sources → AnythingGraph → AI agents - [Interactive demo](https://anythinggraph.com/demo.html) — scripted walkthrough (clinical PHI, ontology, ReBAC, proof) - [Documentation](https://anythinggraph.github.io/) — playbooks, bindings, adapters - [Playbooks guide](https://anythinggraph.github.io/playbooks/) ## Blog - [Reasoning as Code](https://anythinggraph.com/blog/reasoning-as-code.html) — the missing layer between enterprise data and AI agents - [Stop moving data for AI](https://anythinggraph.com/blog/stop-moving-data-for-ai.html) — query-in-place vs ETL for agents - [Why document search is not enough](https://anythinggraph.com/blog/why-document-search-is-not-enough.html) — RAG vs structured facts - [Blog index](https://anythinggraph.com/blog/index.html) ## Key terms - **Knowledge capsule** — A scoped, governed semantic layer (playbook + bindings) — a bounded world model for agents, not full database access. - **Playbook** — Versioned JSON: ontology (entities, relationships) plus optional access policy. - **Binding** — YAML mapping from playbook concepts to a live source (table, collection, API). - **Semantic layer** — Business meaning between agents and raw systems of record. - **Reasoning AI** — Structured traversal and planning over ontology, not free-form SQL or chunk retrieval. - **Proof** — Auditable metadata on governed answers (playbook, subject, sources, path). ## Repositories - [AnythingGraph/AnythingGraph](https://github.com/AnythingGraph/AnythingGraph) — OSS monorepo: CLI, reasoning service, MCP, playbooks, bindings - [AnythingGraph/AnythingGraph](https://github.com/AnythingGraph/AnythingGraph) — OSS monorepo (CLI installer, website) - [AnythingGraph/Playbooks](https://github.com/AnythingGraph/Playbooks) — example ontology playbooks - [npm @anythinggraph/cli](https://www.npmjs.com/package/@anythinggraph/cli) ## Contact - Website: https://anythinggraph.com - GitHub: https://github.com/AnythingGraph - Discord: https://discord.gg/b778aXsKYe