Skip to main content

Project knowledge indexer for AI agents — scans code, tracks documentation staleness, and serves a knowledge graph to AI agents via MCP

Project description

axiom-graph

PyPI version Python versions Documentation License: MIT

A local-first code intelligence layer built for AI agents. axiom-graph scans your Python and TypeScript, then weaves your code, docs, tests, and workflows into a single typed mesh over the source — and keeps that mesh honest as the code changes.

The payoff is context reduction. Instead of re-reading a whole file to understand one function, an agent asks the mesh and gets back exactly what a careful reviewer would pull up: the function, the doc section that describes it, the tests that validate it, and the workflow that calls it — one focused bundle of context, not a file dump. And the moment any of those threads drifts out of sync with the code, the mesh says so.

Quick Start

pip install, no SaaS and no account. A few commands take an unindexed repo to a live drift signal:

pip install axiom-graph[viz]

axiom-graph init .     # one-time: scan and build the full index
# ...edit a function that docs and tests describe...
axiom-graph build .    # incremental re-index
axiom-graph check .    # what fell out of sync?

check answers with exactly what drifted and why — the symbol you changed, the doc sections that document it, the tests that validate it, and any downstream page riding the chain:

own: 1 CONTENT_UPDATED / 0 DESC_UPDATED / 0 RENAMED / 0 NOT_FOUND · link: 2 LINKED_STALE / 0 BROKEN_LINK · 47 VERIFIED

That one line is the whole product: change code, and the mesh tells you what it knocked out of date.

Why it's different

Most tools treat code, docs, and tests as separate worlds joined by prose references. axiom-graph treats them as one graph of nodes joined by intent-typed edges — a doc section documents a function, a test validates it, a workflow delegates to a task. That single choice buys two capabilities from one mesh:

  • Intent-scoped retrieval — traverse the typed edges out from a node and land on exactly the linked docs, tests, and workflows. No grep, no guessing which file matters.
  • Drift detection — when a body or docstring changes, axiom-graph hashes them separately and propagates the change along the same edges, marking only the genuinely affected nodes for re-verification. It follows edge semantics rather than firing on every caller, so staleness stays a trustworthy signal instead of noise.

A few more choices set it apart:

  • Atomic, modular docs (DocJSON). Documentation is written in DocJSON, where every section is its own addressable node with stable links — an agent reads one section instead of a whole document.
  • An annotated semantic layer, not a full call graph. Lightweight @workflow / @task / Step / AutoStep markers annotate the orchestration highways of your system with intent and order, giving a readable map without the noise of every helper call. The markers come from the companion axiom-annotations package (pip install axiom-annotations).
  • Local-first. The whole mesh is a single SQLite database (.axiom_graph/graph.db) that lives in your repo. Free, open-source, no SaaS to sign up for.

Three surfaces onto the mesh

The same mesh is reachable three ways:

  • MCP server — for agents. The primary integration surface: search, graph traversal, source retrieval, staleness checks, and doc editing, all exposed as tools an agent calls directly over the Model Context Protocol. Setup is in MCP Server Setup below.
  • CLI — for humans. init, build, and check, plus commands to explore the graph, inspect history, and export. axiom-graph check --fail-on any doubles as a CI gate that blocks stale docs from merging.
  • Viz dashboard — to browse. axiom-graph viz . launches an interactive browser UI with graph and list views, a doc manager, a workflow explorer, and detail panels over every node.

Full guides for all three live in the documentation.

Agents on the mesh: the PEV proof

The clearest evidence the model works is the PEV Agent Nexus — a Plan–Execute–Validate workflow where a chain of agents (Architect, Builder, Reviewer, Auditor) build real changes by reading and writing the mesh over MCP. They pull intent-scoped context to plan, traverse the graph to check callers before refactoring, and let the Auditor update the affected docs and record a verification snapshot so staleness clears cleanly. It is the thesis end to end: agents doing real work because the mesh gives them the right context and an honest drift signal. See the PEV overview in the documentation.

Documentation

Full documentation — getting started, the core concepts (the mesh, ontology, DocJSON, annotations, staleness, history), the CLI, the viz dashboard, and the MCP tool reference — lives at:

📖 axiom-graph.readthedocs.io

MCP Server Setup

The MCP server is how AI agents interact with axiom-graph. It uses stdio transport.

Claude Code — create .mcp.json in your project root:

{
  "mcpServers": {
    "axiom-graph": {
      "type": "stdio",
      "command": "/path/to/your/venv/bin/python",
      "args": ["-m", "axiom_graph.mcp_server"]
    }
  }
}

Any other client — the entry point is axiom-graph-mcp (an installed console script) or python -m axiom_graph.mcp_server; both speak JSON-RPC over stdio with logs on stderr. VS Code (Copilot / Continue) configuration and logging options (AXIOM_GRAPH_LOG_LEVEL, AXIOM_GRAPH_LOG_FILE) are covered in the documentation.

Links

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

axiom_graph-2.1.0.tar.gz (448.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

axiom_graph-2.1.0-py3-none-any.whl (503.8 kB view details)

Uploaded Python 3

File details

Details for the file axiom_graph-2.1.0.tar.gz.

File metadata

  • Download URL: axiom_graph-2.1.0.tar.gz
  • Upload date:
  • Size: 448.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.10.9 Windows/10

File hashes

Hashes for axiom_graph-2.1.0.tar.gz
Algorithm Hash digest
SHA256 3a3a93ea24a675cc71f8226c11b60dc4895f579373a006452afa3fac5753f5d3
MD5 0c05f79593dfe5d1fb7a9cddec232060
BLAKE2b-256 739a22aebf24ecce42dcf8f4e5e2c44938897b90cc898fbcffc94123b2b86ea7

See more details on using hashes here.

File details

Details for the file axiom_graph-2.1.0-py3-none-any.whl.

File metadata

  • Download URL: axiom_graph-2.1.0-py3-none-any.whl
  • Upload date:
  • Size: 503.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.10.9 Windows/10

File hashes

Hashes for axiom_graph-2.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d21fc8aac67d7065d7a5f088880986399843818f40834f0dcc6775ea520496d5
MD5 5c5d88807fd291f59594b2b1b2baa4d5
BLAKE2b-256 5b8765826a58ba1524cb7368d5dbd160c299d189ce435d86460cb8ea5b34fb8c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page