axon  by harshkedia177

Codebase knowledge graph for AI agents and developers

Created 2 weeks ago

New!

548 stars

Top 58.4% on SourcePulse

GitHubView on GitHub
Project Summary

Summary

Axon addresses the challenge of providing AI agents and developers with deep, structural understanding of codebases. It indexes any codebase into a knowledge graph, capturing dependencies, call chains, and execution flows, then exposes this intelligence via MCP tools and a CLI. This enables AI agents to access comprehensive context efficiently, improving reliability and reducing token usage, while developers gain powerful code intelligence features that run entirely locally.

How It Works

Axon ingests source code (Python, TS, JS) via a 12-phase pipeline to build a knowledge graph. It combines static analysis (AST, calls, types) with dynamic insights from git history (change coupling) and execution flow tracing. Algorithms like Leiden detect communities, and a multi-pass approach identifies dead code. This precomputed structural data is stored locally (defaulting to KuzuDB) and served via an MCP server or CLI, offering rich, actionable context in single tool calls.

Quick Start & Requirements

Install via pip install axoniq (Python 3.11+ required). Index a project by running axon analyze . in its directory (~5s). Integrate with AI agents by configuring Axon as an MCP server (e.g., in .mcp.json). Live updates are enabled with axon watch.

Highlighted Details

  • Hybrid Search: Fuses BM25, vector embeddings, and fuzzy matching with Reciprocal Rank Fusion.
  • Impact Analysis: Identifies symbols affected by a change, grouped by depth (direct, indirect, transitive) with confidence scores from call graphs, type refs, and git co-change history.
  • Dead Code Detection: Multi-pass analysis aware of framework specifics and exemptions.
  • Execution Flow Tracing: Detects framework-aware entry points and traces BFS execution paths.
  • Community Detection: Automatically clusters related symbols into functional groups using the Leiden algorithm.
  • Change Coupling: Analyzes 6 months of git history to link files that frequently change together.
  • Structural Branch Comparison: Enables symbol-level diffing between branches without stashing.
  • Noise Filtering: Excludes common language builtins and stdlib methods from call graphs.

Maintenance & Community

Developed by Harsh Kedia (@harshkedia177). The README lacks explicit community channel links (Discord, Slack), suggesting a primarily single-developer initiative.

Licensing & Compatibility

Released under the permissive MIT license, allowing broad adoption in commercial, closed-source projects without significant restrictions.

Limitations & Caveats

As a single-developer project, the bus factor may be a consideration. While supporting Python, TS, and JS, performance characteristics or limitations for extremely large/complex codebases beyond .gitignore filtering are not detailed. Support for additional programming languages is not specified.

Health Check
Last Commit

1 day ago

Responsiveness

Inactive

Pull Requests (30d)
33
Issues (30d)
23
Star History
554 stars in the last 20 days

Explore Similar Projects

Feedback? Help us improve.