opentrace

skill
SUMMARY

OpenTrace is a knowledge graph platform that maps system architecture, code structure, and service relationships giving you a visual, queryable map of how your codebase and infrastructure connect.

README.md

OpenTrace

Deploy
PyPI - Version
NPM Version
License

A knowledge graph that maps your codebase structure, service architecture, and system relationships — then exposes it all through MCP so AI tools can understand your systems.

Try Now

oss.opentrace.ai — no install required, runs entirely in your browser.

Docs - for help and support

Quick Start

git clone https://github.com/opentrace/opentrace.git
cd opentrace
make install
make ui

Open http://localhost:5173, add a GitHub repo, and explore the graph.

What It Does

OpenTrace indexes source code directly in your browser — no server required. Point it at a GitHub or GitLab repo and it will:

  1. Parse every file using tree-sitter WASM grammars (12 languages)
  2. Extract classes, functions, imports, and call relationships
  3. Build a knowledge graph stored in LadybugDB WASM (embedded graph database)
  4. Summarize every node using template-based identifier analysis
  5. Expose the graph to an in-app chat agent via MCP tools

Architecture

┌──────────────────────────────────────────────────────┐
│                    UI (React/TS)                     │
│         Browser-based indexer + graph explorer       │
│           localhost:5173         ┌─────────────────┐ │
│                                  │  Web Worker     │ │
│                                  │  tree-sitter    │ │
│                                  │  WASM parsers   │ │
│                                  └─────────────────┘ │
│                                  ┌─────────────────┐ │
│                                  │  LadybugDB WASM    │ │
│                                  │  graph store    │ │
│                                  └─────────────────┘ │
└──────────────────────────────────────────────────────┘

Supported Languages

Full Extraction (symbols + calls + imports) Structural Extraction (symbols only)
Python, TypeScript/JavaScript, Go Rust, Java, Kotlin, C#, C/C++, Ruby, Swift

Config and data files (JSON, YAML, TOML, Protobuf, SQL, GraphQL, Bash) are indexed as file nodes.

Graph Tools

The built-in chat agent has access to these tools:

Tool Description
search_graph Full-text search across nodes by name or properties
list_nodes List nodes by type with optional property filters
get_node Get full details of a single node by ID
traverse_graph BFS traversal to discover connected nodes
load_source Fetch source code for an indexed file or symbol

Repository Structure

ui/                   — React/TypeScript frontend (graph explorer + browser indexer)
agent/                — Python agent (loads data into the graph)
proto/                — Protobuf definitions (shared API contracts)
claude-code-plugin/   — Claude Code plugin (MCP server config)

Development

Prerequisites

  • Node.js 22+ (see ui/.nvmrc)
  • npm

Commands

make install          # Install dependencies
make agent            # Run Python agent
make ui               # Start dev server (localhost:5173)
make build            # Production build
make test             # Run tests
make fmt              # Format code
make lint             # Lint
make proto            # Generate protobuf types
make ui-build-static  # Static build (no API server dependency)

Agent

cd agent
uv sync          # Install dependencies
uv run pytest    # Run tests

Running Tests

cd ui
npm test              # Run all tests
npm run lint          # ESLint + Prettier check

Agents

Agent Description
@code-explorer Explore indexed code structure — find classes, functions, services and their relationships
@dependency-analyzer Analyze dependencies and blast radius for code changes

Commands

Command Description
/graph-status Show overview of indexed nodes by type, list repos and services
/explore <name> Quick exploration of a named component in the graph

Graph Node Types

Service, Repo, Repository, Class, Module, Function, File, Directory, Cluster, Namespace, Deployment, InstrumentedService, Span, Log, Metric, Endpoint, Database, DBTable

Claude Code Plugin

OpenTrace ships a Claude Code plugin that connects Claude to an OpenTrace MCP server. See claude-code-plugin/ for configuration.

Contributing

See CONTRIBUTING.md for guidelines on how to contribute.

License

Apache License 2.0 — see LICENSE for details.

Reviews (0)

No results found