axon

by harshkedia177Verified

Graph-powered code intelligence engine — indexes codebases into a knowledge graph, exposed via MCP tools for AI agents and a CLI for developers.

802
Stars
124
Forks
Python
Language
8/23/2026
Added
View on GitHubDownload ZIP

⚠️ Third-Party Software Notice

This skill is third-party open-source software developed and hosted independently on GitHub. SkillTip is an informational directory and does not control or maintain the underlying repository. Any security checks displayed are automated and limited in scope. Review the source code before installing.

Read the Terms of Service

Installation

Add to your Claude Code skills directory:

# Add to your Claude Code skills
git clone https://github.com/harshkedia177/axon

Getting Started

Guides for using skills like axon.

Security Report

Verified

Last scanned: —

{
  "status": "PASSED",
  "issues": []
}

README.md

Axon logo

Axon

PyPI version PyPI downloads Total installs GitHub stars License

The knowledge graph for your codebase — explore it visually, or let your AI agent query it.

Indexes any codebase into a structural knowledge graph — every dependency, call chain, cluster, and execution flow. Explore it through an interactive web dashboard with force-directed graph visualization, or expose it through MCP tools so AI agents get full structural understanding in every tool call.

$ axon analyze .

Walking files...               142 files found
Parsing code...                142/142
Tracing calls...               847 calls resolved
Analyzing types...             234 type relationships
Detecting communities...       8 clusters found
Detecting execution flows...   34 processes found
Finding dead code...           12 unreachable symbols
Analyzing git history...       18 coupled file pairs
Generating embeddings...       623 vectors stored

Done in 4.2s — 623 symbols, 1,847 edges, 8 clusters, 34 flows

Then explore your codebase visually:

axon ui                      # Opens interactive dashboard at localhost:8420

Three views, one command:

  • Explorer — Interactive force-directed graph (Sigma.js + WebGL). Click any node to see its code, callers, callees, impact radius, and community. Community hull overlays show architectural clusters at a glance.
  • Analysis — Health score, coupling heatmap, dead code report, inheritance tree, branch diff — your codebase health in one dashboard.
  • Cypher Console — Write and run Cypher queries against the graph with syntax highlighting, presets, and history.

Plus: command palette (Cmd+K), keyboard shortcuts, flow trace animations, graph minimap, and SSE-powered live reload when watch mode is active.


The Problem

Your AI agent edits UserService.validate(). It doesn't know that 47 functions depend on that return type, 3 execution flows pass through it, and payment_handler.py changes alongside it 80% of the time.

Breaking changes ship.

This happens because AI agents work with flat text. They grep for callers, miss indirect ones, and have no understanding of how code is connected. Context windows are finite. LSPs don't expose call graphs. Grepping gives you strings, not structure.

The agent needs a knowledge graph — not more text.


How Axon Solves It

Most code intelligence tools give the agent raw files and hope it reads enough. Axon takes a different approach: precompute structure at index time so every tool call returns complete, actionable context.

A 12-phase pipeline runs once over your repo. After that:

  • axon_impact("validate") returns all 47 affected symbols, grouped by depth (will break / may break / review), with confidence scores — in a single call
  • axon_query("auth handler") returns hybrid-ranked results grouped by execution flow, not a flat list of name matches
  • axon_context("UserService") returns callers, callees, type references, community membership, and dead code status — the full picture

Three benefits:

  1. Reliability — the context is already in the tool response. No multi-step exploration that can miss code.
  2. Token efficiency — one tool call instead of a 10-query search chain. Agents spend tokens on reasoning, not navigation.
  3. Model democratization — even smaller models get full architectural clarity because the tools do the heavy lifting.

Zero cloud dependencies. Everything runs locally — parsing, graph storage, embeddings, search. No API keys, no data leaving your machine.


TL;DR

pip install axoniq            # 1. Install
cd your-project && axon analyze .  # 2. Index (one command, ~5s for most repos)
axon ui                       # 3. Explore visually at localhost:8420

For AI agents — add to .mcp.json in your project root:

{
  "mcpServers": {
    "axon": {
      "command": "axon",
      "args": ["serve", "--watch"]
    }
  }
}

For developers — explore the graph yourself:

axon ui                      # Interactive dashboard (standalone or attaches to running host)
axon ui --watch              # Live reload on file changes
axon host --watch            # Shared host: UI + multi-session MCP

What You Get

Explore your codebase visually

Web UI

A full interactive dashboard — no terminal or extensions required. One command:

axon ui                           # Launch at localhost:8420
axon ui --watch                   # Live reload on file changes
axon ui --port 9000               # Custom port
axon ui --dev                     # Dev mode (Vite HMR on :5173)
ViewWhat It Shows
ExplorerInteractive force-directed graph (Sigma.js + WebGL), file tree sidebar, symbol detail panel with code preview, callers/callees, impact analysis, and process memberships. Community hull overlays reveal architectural clusters.
AnalysisHealth score, coupling heatmap, dead code report, inheritance tree visualization, branch diff, and aggregate stats — your codebase health at a glance.
Cypher ConsoleQuery editor with syntax highlighting, preset query library, results table, and query history.

Extras: Command palette (Cmd+K), keyboard shortcuts, graph minimap, flow trace and impact ripple animations, SSE-powered live reload when watch mode is enabled.

The UI is backed by a FastAPI server with a full REST API — see API Endpoints below.

Find anything — by name, concept, or typo

Hybrid Search (BM25 + Vector + Fuzzy)

Three search strategies fused with Reciprocal Rank Fusion:

  • BM25 full-text search — fast exact name and keyword matching via KuzuDB FTS
  • Semantic vector search — conceptual queries via 384-dim embeddings (BAAI/bge-small-en-v1.5)
  • Fuzzy name search — Levenshtein fallback for typos and partial matches

Results are ranked with test file down-ranking (0.5x) and source function/class boosting (1.2x), then grouped by execution flow so the agent sees architectural context in a single call.

Know what breaks before you change it

Impact Analysis with Depth Grouping

When you're about to change a symbol, Axon traces upstream through the call graph, type references, and git coupling history. Results are grouped by depth for actionability:

  • Depth 1 — Direct callers (will break)
  • Depth 2 — Indirect callers (may break)
  • Depth 3+ — Transitive (review)

Every edge carries a confidence score (1.0 = exact match, 0.8 = receiver method, 0.5 = fuzzy) so you can prioritize what to review.

Find what to delete

Dead Code Detection

Not just "zero callers" — a multi-pass analysis that understands your framework:

  1. Initial scan — flags symbols with no incoming calls
  2. Exemptions — entry points, exports, constructors, test code, dunder methods, __init__.py symbols, decorated functions, @property methods
  3. Override pass — un-flags methods overriding non-dead base class methods
  4. Protocol conformance — un-flags methods on Protocol-conforming classes
  5. Protocol stubs — un-flags all methods on Protocol classes (interface contracts)

Understand how code runs, not just where it sits

Execution Flow Tracing

Detects entry points using framework-aware patterns:

  • Python: @app.route, @router.get, @click.command, test_* functions, __main__ blocks
  • JavaScript/TypeScript: Express handlers, exported functions, handler/middleware patterns

Then traces BFS execution flows from each entry point through the call graph, classifying flows as intra-community or cross-community.

See your architecture without reading docs

Community Detection

Uses the Leiden algorithm (igraph + leidenalg) to automatically discover functional clusters. Each community gets a cohesion score and auto-generated label. Agents can ask "what cluster does this symbol belong to?" and get the answer without reading a single design doc.

Find hidden dependencies git knows about

Change Coupling (Git History)

Analyzes 6 months of git history to find dependencies that static analysis misses:

coupling(A, B) = co_changes(A, B) / max(changes(A), changes(B))

Files with coupling strength >= 0.3 and 3+ co-changes get linked. These show up in impact analysis — so when you change user.py, the agent also knows to check user_test.py and auth_middleware.py.

Always up to date

Watch Mode

Live re-indexing powered by a Rust-based file watcher (watchfiles):

$ axon watch
Watching /Users/you/project for changes...

[10:32:15] src/auth/validate.py modified -> re-indexed (0.3s)
[10:33:02] 2 files modified -> re-indexed (0.5s)

File-local phases (parse, imports, calls, types) run immediately on change. Global phases (communities, processes, dead code) batch every 30 seconds.

Structural diff, not text diff

Branch Comparison

Compare branches at the symbol level using git worktrees (no stashing required):

$ axon diff main..feature

Symbols added (4):
  + process_payment (Function) -- src/payments/stripe.py
  + PaymentIntent (Class) -- src/payments/models.py

Symbols modified (2):
  ~ checkout_handler (Function) -- src/routes/checkout.py

Symbols removed (1):
  - old_charge (Function) -- src/payments/legacy.py

Clean call graphs

Noise Filtering

Built-in blocklist (138 entries) automatically filters language builtins (print, len, isinstance), JS/TS globals (console, setTimeout, fetch), React hooks (useState, useEffect), and common stdlib methods from the call graph. Your graph shows your code's relationships, not noise from list.append().


The Pipeline

Axon builds deep structural understanding through 12 sequential analysis phases:

PhaseWhat It Does
File WalkingWalks repo respecting .gitignore, filters by supported languages
StructureCreates File/Folder hierarchy with CONTAINS relationships
Parsingtree-sitter AST extraction — functions, classes, methods, interfaces, enums, type aliases
Import ResolutionResolves import statements to actual files (relative, absolute, bare specifiers)
Call TracingMaps function calls with confidence scores. Noise filtering skips 138 language builtins
HeritageTracks class inheritance (EXTENDS) and interface implementation (IMPLEMENTS)
Type AnalysisExtracts type references from parameters, return types, and variable annotations
Community DetectionLeiden algorithm clusters related symbols into functional communities
Process DetectionFramework-aware entry point detection + BFS flow tracing
Dead Code DetectionMulti-pass analysis with override, protocol, and decorator awareness
Change CouplingGit history analysis — finds files that always change together
Embeddings384-dim vectors for every symbol, enabling semantic search. Skip with --no-embeddings

MCP Integration

Axon exposes its full intelligence as an MCP server. Set it up once, and your AI agent has structural understanding of your codebase forever.

Setup

Claude Code — add to .mcp.json in your project root (or run claude mcp add axon -- axon serve --watch):

{
  "mcpServers": {
    "axon": {
      "command": "axon",
      "args": ["serve", "--watch"]
    }
  }
}

Cursor — add to your MCP settings:

{
  "axon": {
    "command": "axon",
    "args": ["serve", "--watch"]
  }
}

Optional new feature:

axon host --watch

This starts a shared host for the UI and multiple MCP clients. axon setup --claude / axon setup --cursor still prints the standard config.

The --watch flag enables live re-indexing — the graph updates as you edit code.

Tools

ToolWhat the agent gets
axon_queryHybrid search (BM25 + vector + fuzzy) with results grouped by execution flow
axon_context360-degree view — callers, callees, type refs, confidence tags, dead code status
axon_impactBlast radius grouped by depth — direct (will break), indirect (may break), transitive
axon_dead_codeAll unreachable symbols grouped by file
axon_detect_changesMap a git diff to affected symbols and execution flows
axon_list_reposAll indexed repositories with stats
axon_cypherRead-only Cypher queries against the knowledge graph

Every tool response includes a next-step hint guiding the agent through a natural investigation workflow:

query   -> "Next: Use context() on a specific symbol for the full picture."
context -> "Next: Use impact() if planning changes to this symbol."
impact  -> "Tip: Review each affected symbol before making changes."

Resources

URIDescription
axon://overviewNode and relationship counts by type
axon://dead-codeFull dead code report
axon://schemaGraph schema reference for Cypher queries

API Endpoints

The web UI is backed by a FastAPI server. All endpoints are under /api:

EndpointDescription
GET /api/graphFull knowledge graph (paginated)
GET /api/node/{id}Node detail with callers, callees, type refs
GET /api/overviewAggregate node/edge counts
GET /api/searchHybrid search (BM25 + vector + fuzzy)
GET /api/impact/{id}Blast radius analysis by depth
GET /api/dead-codeDead code report
GET /api/communitiesCommunity listing with members
GET /api/couplingChange coupling heatmap data
GET /api/files/{path}Source file content with syntax context
POST /api/cypherExecute read-only Cypher queries
GET /api/diffStructural branch comparison
GET /api/processesExecution flow listing
GET /api/eventsSSE stream for live reload events
POST /api/reindexTrigger a full re-index (watch mode only)

Cypher queries are validated server-side — write keywords (CREATE, DELETE, DROP, etc.) are rejected after comment stripping.


How It Compares

Capabilitygrep / ripgrepLSPContext window stuffingAxon
Interactive graph UINoNoNoYes (full web dashboard)
Text searchYesNoYesYes (hybrid BM25 + vector)
Find all callersNoPartialHit-or-missYes (full call graph with confidence)
Type relationshipsNoYesNoYes (param/return/variable roles)
Dead code detectionNoNoNoYes (multi-pass, framework-aware)
Execution flow tracingNoNoNoYes (entry point -> flow)
Community detectionNoNoNoYes (Leiden algorithm)
Change coupling (git)NoNoNoYes (6-month co-change analysis)
Impact analysisNoNoNoYes (depth-grouped with confidence)
AI agent integrationNoPartialN/AYes (full MCP server)
Structural branch diffNoNoNoYes (node/edge level)
Watch modeNoYesNoYes (Rust-based, 500ms debounce)
Works offlineYesYesNoYes

Supported Languages

LanguageExtensionsParser
Python.pytree-sitter-python
TypeScript.ts, .tsxtree-sitter-typescript
JavaScript.js, .jsx, .mjs, .cjstree-sitter-javascript

Installation

# With pip
pip install axoniq

# With uv (recommended)
uv add axoniq

# With Neo4j backend support
pip install axoniq[neo4j]

Requires Python 3.11+. The web UI (frontend + backend) is included — no Node.js or extra install needed.

From Source

git clone https://github.com/harshkedia177/axon.git
cd axon
uv sync --all-extras
uv run axon --help

To rebuild the frontend after making changes (requires Node.js 18+):

cd src/axon/web/frontend
npm install && npm run build

CLI Reference

axon analyze [PATH]          Index a repository (default: current directory)
    --full                   Force full rebuild (skip incremental)
    --no-embeddings          Skip vector embedding generation (faster indexing)

axon status                  Show index status for current repo
axon list                    List all indexed repositories (auto-populated on analyze)
axon clean                   Delete index for current repo
    --force / -f             Skip confirmation prompt

axon query QUERY             Hybrid search the knowledge graph
    --limit / -n N           Max results (default: 20)

axon context SYMBOL          360-degree view of a symbol
axon impact SYMBOL           Blast radius analysis
    --depth / -d N           BFS traversal depth (default: 3)

axon dead-code               List all detected dead code
axon cypher QUERY            Execute a raw Cypher query (read-only)

axon watch                   Watch mode — live re-indexing on file changes
axon diff BASE..HEAD         Structural branch comparison

axon host                    Shared host for UI + HTTP MCP (default: localhost:8420)
    --port / -p PORT         Port to serve on (default: 8420)
    --watch / --no-watch     Enable live file watching
    --dev                    Dev mode — proxy to Vite dev server for HMR
    --no-open                Don't auto-open browser

axon ui                      Launch the web UI (default: localhost:8420)
    --port / -p PORT         Port to serve on (default: 8420)
    --watch / -w             Enable live file watching with auto-reindex
    --dev                    Dev mode — proxy to Vite dev server for HMR
    --no-open                Don't auto-open browser
    --direct                 Force standalone mode even if a shared host exists

axon setup                   Print MCP configuration JSON
    --claude                 For Claude Code
    --cursor                 For Cursor

axon mcp                     Start the MCP server (stdio transport)
axon serve                   Start the MCP server
    --watch, -w              Enable live file watching with auto-reindex
axon --version               Print version

Example Workflows

"I need to refactor the User class — what breaks?"

# See everything connected to User
axon context User

# Check blast radius — grouped by depth
axon impact User --depth 3

# Find files that always change with user.py
axon cypher "MATCH (a:File)-[r:CodeRelation]->(b:File) WHERE a.name = 'user.py' AND r.rel_type = 'coupled_with' RETURN b.name, r.strength ORDER BY r.strength DESC"

"Is there dead code we should clean up?"

axon dead-code

"What are the main execution flows?"

axon cypher "MATCH (p:Process) RETURN p.name, p.properties ORDER BY p.name"

"Which parts of the codebase are most tightly coupled?"

axon cypher "MATCH (a:File)-[r:CodeRelation]->(b:File) WHERE r.rel_type = 'coupled_with' RETURN a.name, b.name, r.strength ORDER BY r.strength DESC LIMIT 20"

Knowledge Graph Model

Nodes

LabelDescription
FileSource file
FolderDirectory
FunctionTop-level function
ClassClass definition
MethodMethod within a class
InterfaceInterface / Protocol definition
TypeAliasType alias
EnumEnumeration
CommunityAuto-detected functional cluster
ProcessDetected execution flow

Relationships

TypeDescriptionKey Properties
CONTAINSFolder -> File/Symbol hierarchy--
DEFINESFile -> Symbol it defines--
CALLSSymbol -> Symbol it callsconfidence (0.0-1.0)
IMPORTSFile -> File it imports fromsymbols (names list)
EXTENDSClass -> Class it extends--
IMPLEMENTSClass -> Interface it implements--
USES_TYPESymbol -> Type it referencesrole (param/return/variable)
EXPORTSFile -> Symbol it exports--
MEMBER_OFSymbol -> Community it belongs to--
STEP_IN_PROCESSSymbol -> Process it participates instep_number
COUPLED_WITHFile -> File that co-changes with itstrength, co_changes

Node ID Format

{label}:{relative_path}:{symbol_name}

Examples:
  function:src/auth/validate.py:validate_user
  class:src/models/user.py:User
  method:src/models/user.py:User.save

Architecture

Source Code (.py, .ts, .js, .tsx, .jsx)
    |
    v
+----------------------------------------------+
|         Ingestion Pipeline (12 phases)        |
|                                               |
|  walk -> structure -> parse -> imports        |
|  -> calls -> heritage -> types                |
|  -> communities -> processes -> dead_code     |
|  -> coupling -> embeddings                    |
+----------------------+-----------------------+
                       |
                       v
              +-----------------+
              | KnowledgeGraph  |  (in-memory during build)
              +--------+--------+
                       |
          +------------+------------+
          v            v            v
     +---------+ +---------+ +---------+
     | KuzuDB  | |  FTS    | | Vector  |
     | (graph) | | (BM25)  | | (HNSW)  |
     +----+----+ +----+----+ +----+----+
          +------------+------------+
                       |
              StorageBackend Protocol
                       |
           +-----------+-----------+
           v           v           v
     +----------+ +----------+ +----------+
     |   MCP    | |  Web UI  | |   CLI    |
     |  Server  | | (FastAPI | | (Typer)  |
     | (stdio)  | |  + React)| |          |
     +----+-----+ +----+-----+ +----+-----+
          |             |            |
     Claude Code    Browser      Terminal
     / Cursor      (developer)  (developer)

Tech Stack

LayerTechnologyPurpose
Parsingtree-sitterLanguage-agnostic AST extraction
Graph StorageKuzuDBEmbedded graph database with Cypher, FTS, and vector support
Graph Algorithmsigraph + leidenalgLeiden community detection
EmbeddingsfastembedONNX-based 384-dim vectors (~100MB, no PyTorch)
MCP Protocolmcp SDK (FastMCP)AI agent communication via stdio
Web BackendFastAPI + UvicornREST API for the web UI, SSE for live updates
Web FrontendReact + TypeScript + ViteInteractive dashboard with Tailwind CSS
Graph VisualizationSigma.js + GraphologyWebGL graph rendering with ForceAtlas2 layout
CLITyper + RichTerminal interface with progress bars
File WatchingwatchfilesRust-based file system watcher
GitignorepathspecFull .gitignore pattern matching

Storage

Everything lives locally:

your-project/
+-- .axon/
    +-- kuzu/          # KuzuDB graph database (graph + FTS + vectors)
    +-- meta.json      # Index metadata and stats

Add .axon/ to your .gitignore.

A global registry at ~/.axon/repos/ is automatically populated on axon analyze, enabling axon list to discover all indexed repositories across your machine.

The storage layer is abstracted behind a StorageBackend Protocol — KuzuDB is the default, with an optional Neo4j backend available via pip install axoniq[neo4j].


Development

git clone https://github.com/harshkedia177/axon.git
cd axon
uv sync --all-extras

# Run tests
uv run pytest

# Lint
uv run ruff check src/

# Run from source
uv run axon --help

# Frontend development (React + Vite with HMR)
cd src/axon/web/frontend
npm install
npm run dev                  # Vite dev server on :5173
# In another terminal:
uv run axon ui --dev         # Backend on :8420, proxies to Vite

License

MIT


Read the case study → — the design decisions, the trade-offs, and what broke along the way.

Built by Harsh Kedia.

Frequently Asked Questions

What is axon?

axon is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by harshkedia177. Graph-powered code intelligence engine — indexes codebases into a knowledge graph, exposed via MCP tools for AI agents and a CLI for developers. It has 802 GitHub stars.

Is axon safe to use?

Yes. axon passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.

How do I install axon?

Clone the repository with "git clone https://github.com/harshkedia177/axon" and add it to your Claude Code skills directory (see the Installation section above).

What programming language is axon written in?

axon is primarily written in Python. It is open-source under harshkedia177 on GitHub, so you can review or fork the full source.

Are there alternatives to axon?

Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh axon against similar tools.

Comments (0)

No comments yet. Be the first to share your thoughts!

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI Agentsai-agentsanthropicclaude-code
View details
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI Agentsai-agentsbrainstorming
View details

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI Agentsai-agentsanthropicclaude-code
View details

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI Agentsclaude-codeai-tools
View details

claude-code

by anthropics

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

120,03119,897Shell
AI Agents
View details

Developers Also Liked

Based on votes and bookmarks from developers who liked this skill

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI Agentsai-agentsanthropicclaude-code
View details
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI Agentsai-agentsbrainstorming
View details

n8n

by n8n-io

12

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

201,88160,308TypeScript
MCP Serversapisai-tools
View details

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI Agentsai-agentsanthropicclaude-code
View details

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI Agentsclaude-codeai-tools
View details