$git clone https://github.com/dosco/graphjinGraphJin is a compiler and runtime that gives AI agents one governed graph over the systems a real company already has: databases, warehouses, files, source code, workflows, metadata, and security policy. Instead of handing an agent raw credentials and hoping it guesses correctly
| 1 | # GraphJin — One Governed Graph for Your AI Agents |
| 2 | |
| 3 | [](https://github.com/dosco/graphjin/blob/master/LICENSE) |
| 4 | [](https://www.npmjs.com/package/graphjin) |
| 5 | [](https://hub.docker.com/r/dosco/graphjin/tags) |
| 6 | [](https://discord.gg/6pSWCTZ) |
| 7 | [](https://pkg.go.dev/github.com/dosco/graphjin/core/v3) |
| 8 | [](https://goreportcard.com/report/github.com/dosco/graphjin/core/v3) |
| 9 | |
| 10 | GraphJin is a compiler and runtime that gives AI agents one governed graph over the systems a real company already has: databases, warehouses, files, source code, workflows, metadata, and security policy. Instead of handing an agent raw credentials and hoping it guesses correctly, GraphJin exposes that graph through GraphQL + MCP: the agent discovers before acting, validates queries, runs approved work, observes runtime status — and every answer is checked against an execution ledger before it leaves the server. |
| 11 | |
| 12 | It is not only for agents. GraphJin is still a high-performance GraphQL-to-database compiler, Go library, standalone API service, REST/OpenAPI gateway, and real-time subscription server. The agent use case is where everything comes together: the same compiler that serves your apps can also give AI a smart, auditable way to work across data, code, and operations. |
| 13 | |
| 14 | Works with PostgreSQL, MySQL, MongoDB, SQLite, Oracle, MSSQL, Snowflake, Redshift, BigQuery, Apache Cassandra / Amazon Keyspaces, S3/GCS/local files, CodeSQL source indexes - and models from Claude/GPT-4 to local 7B models. |
| 15 | |
| 16 | ## Why GraphJin For Agents |
| 17 | |
| 18 | - **A built-in agent, one call away** - POST one instruction to `/api/v1/agent` (or call the `ask_graphjin_agent` MCP tool) and GraphJin runs the discovery loop itself - as the caller, under the caller's permissions - and returns a typed, evidence-backed answer. See [Server-Side Agent](#server-side-agent). |
| 19 | - **One governed surface for many systems** - Query operational databases, warehouses, MongoDB, object stores, local files, CodeSQL source indexes, workflows, and GraphJin system roots through GraphQL and MCP. |
| 20 | - **Smart discovery before action** - Agents start with `query_catalog(search: "<user instruction>")`, `graphql_help`, relationship evidence, examples, config recipes, and safety notes before writing or running queries. |
| 21 | - **Guarded action, not raw access** - Source-mode access, query allow-lists, read-only boundaries, policy-aware MCP tools, local encrypted secrets, and `gj_config` preview/apply keep changes auditable. |
| 22 | - **Operational awareness** - `gj_security`, `gj_runtime`, and the built-in console expose policy and bounded runtime status so agents can check what is safe before they act. |
| 23 | - **Durable memory and standing questions** - Saved queries, fragments, and workflows live in the owner-scoped `gj_artifacts` store; cursor-backed watches (`gj_watch`) run standing questions under the owner's permissions, resume from persisted subscription cursors, and deliver fired events to a durable inbox (`gj_watch_event`), webhooks, or workflows. Normal watches are durable by default; explicit ephemeral watches use TTL leases. |
| 24 | |
| 25 | ## Installation |
| 26 | |
| 27 | **npm (all platforms)** |
| 28 | ```bash |
| 29 | npm install -g graphjin |
| 30 | ``` |
| 31 | |
| 32 | **macOS (Homebrew)** |
| 33 | ```bash |
| 34 | brew install dosco/graphjin/graphjin |
| 35 | ``` |
| 36 | |
| 37 | **Windows (Scoop)** |
| 38 | ```bash |
| 39 | scoop bucket add graphjin https://github.com/dosco/graphjin-scoop |
| 40 | scoop install graphjin |
| 41 | ``` |
| 42 | |
| 43 | **Linux** |
| 44 | |
| 45 | Download .deb/.rpm from [releases](https://github.com/dosco/graphjin/releases) |
| 46 | |
| 47 | **Docker** |
| 48 | ```bash |
| 49 | docker pull dosco/graphjin |
| 50 | ` |