Persistent context
for coding agents.

When Claude Code auto-compacts conversations, your agents lose context. Uncompact uses the Supermodel API to maintain a persistent code graph, which reloads after every compaction, keeping agents working like nothing happened.

npx supermodel uncompact
copied to clipboard
More Use Cases
jag — ✦ Claude Code — node · claude
▸▸ bypass permissions on · 1 bash · ↓ to manage Remote Control active
API Primitives

Ground truth for your codebase.

Our API provides ground truth built from static analysis. Dependency, call, domain, and parse graphs combined into a single multi-layer IR. Works across TypeScript, Python, Go, Rust, and more. The graph updates as code changes. Agents query it to understand dependencies, trace calls, map business domains, and avoid mistakes.

Test Supermodel on any public repo (view existing repos)

Function index Every function, class, method with location and signature
Call graph Cross-file and cross-package call relationships with line numbers
Dependencies Internal imports and external packages mapped and queryable
Multi-language TypeScript, Python, Java, Go, Rust, Ruby, C++, and more. One API, any language.
Git aware Recent changes, diffs, commit history linked to code symbols
Always current Graph updates as code changes. Query fresh data every time
Supported languages
TypeScript JavaScript Python Go Rust Java Ruby C++ Kotlin Swift + more

Powered by Supermodel

Graph-powered tools for your software factory

Open source tools built on Supermodel's CodeGraph API to improve agent outputs

Uncompact

A Claude Code hook powered by Supermodel's code graph API. Restores full context after every auto-compaction. Install once, never lose context again.

npx supermodel uncompact
copied to clipboard
Instant restore Graph reloads the moment Claude Code compacts, with no interruption to your workflow
Zero config One command installs the hook and registers it with Claude Code automatically
Persistent context Agents keep working like nothing happened, across sessions of any length

Supermodel MCP Server

The Supermodel MCP server brings the full code graph API into your AI-native editor. Query any symbol, trace any dependency, understand any codebase directly from your agent, without leaving your workflow.

Claude Code Cursor Codex
10+ languages TypeScript, JavaScript, Python, Java, Go, Rust, Ruby, C++, Kotlin, Swift, and more
Multi-layer graphs Call graphs, dependency maps, domain classification, parse trees
Agent-native MCP protocol for direct integration with Claude, Cursor, Windsurf, and more

Deadcode Hunter

Dead code bloats your codebase and pollutes agent context. Deadcode Hunter uses Supermodel's call graph to flag unreachable functions and unused symbols, directly in your pull requests, as a GitHub Action.

Graph-based detection Catches unused code that static analysis and AI reviewers routinely miss
Blast radius analysis Understand the full impact before removing any symbol from your codebase
Runs in CI Flags unreachable functions in pull requests automatically as a GitHub Action

Test Coverage Map

AI guesses at test coverage. Graphs know. Test Coverage Map uses Supermodel's call graph to map every test file to the exact functions it exercises, surfacing untested code paths and showing you what breaks if a test disappears.

Graph-based mapping Traces actual call paths from test files to source functions, not line counts
Untested path detection Surfaces functions with zero test coverage across your entire codebase
Runs in CI Reports coverage gaps directly in pull requests as a GitHub Action

Explore Code Visually with an IDE Extension

The Supermodel extension renders your code graph inside your editor so you can navigate callers, callees, dependencies, and ownership in context. Perfect for onboarding, reviews, and maintaining a birds-eye view of your architecture.

Supermodel IDE extension — interactive code graph
Codegraph Use Cases

Build on the graph.

A single API to generate and maintain code graphs across languages, files, and repositories: Trace calls, dependencies, imports, domain classifications and more. Here's what teams like yours are building.

Impact analysis
Impact analysis

See every file affected by a change before you deploy. Query the graph to understand blast radius across your codebase.

Changed: auth/login.ts
api/routes.ts (imports login)
middleware/auth.ts (calls validateUser)
tests/auth.test.ts (tests login flow)
CI optimization
CI optimization

Run tests only for changed dependencies. Skip everything else. Query the graph to build a dependency-aware test runner.

Modified: utils/format.ts
Run: tests/utils.test.ts
Run: tests/api.test.ts (depends on format)
⊘ Skip: tests/auth.test.ts (no dependency)
Dead code detection
Dead code detection

Find unused functions and imports. Query the graph for symbols with no incoming calls. Auto-generate removal PRs.

Scanning: src/**/*.ts
Found: formatLegacy() (0 callers)
Found: OLD_CONFIG (0 references)
Created PR: Remove unused symbols
Domain classification
Domain classification

Auto-discover business domains from code structure, no annotations required. Understand which files belong to which domain across any repo.

Analyzing: src/**
Domain: Auth (12 files)
Domain: Payments (8 files)
Domain: Notifications (5 files)
Circular dependencies
Circular dependencies

Detect import cycles before they cause build failures or runtime errors. Trace the exact path of any circular dependency across modules.

Scanning: dependency graph
⚠ Cycle: auth.ts → user.ts
  └──► session.ts → auth.ts
Path length: 3 hops
Codebase visualization
Codebase visualization

Generate dependency graphs and architecture diagrams. Export to PNG, SVG, or ASCII for documentation and onboarding.

Visualizing: auth flow
login.ts ──► oauth.ts
  └──► token.ts ──► db.ts
Exported: auth-flow.svg
Documentation generation
Architecture docs

Auto-generate architecture documentation from the graph. Run as a GitHub Action to keep docs in sync with your codebase.

Analyzing: repo structure
6 domains identified
47 cross-domain dependencies
Published: repos.supermodeltools.com
Direct graph queries
Public graph API

Upload any repo. Get back call graphs, dependency maps, and domain classifications. Build what you want on top.

curl -X POST api.supermodeltools.com/v1/graphs
{ "call_graph": { nodes: 847, edges: 2031 },
  "dependency_graph": { modules: 94 },
  "domain_graph": { domains: 6 } }

Pricing

Early adopter pricing. Sign up now, save forever.

Growth Typically $299
$199/mo
  • 30M LOC per month
  • 50MB per upload
Choose plan
Custom
Contact us
  • Unlimited LOC
  • Custom upload size
  • Custom integration
  • Dedicated Slack channel
  • VPC & self-host options
Contact Sales

Start your free trial

14-day free trial. Explore the API and tools before choosing a plan. Overage: $0.10 per 1,000 LOC.

Start free trial

Frequently asked questions

Memory systems rely on agents subjectively selecting what to remember. That works the same way human memory does: you try to hold onto the things that seem important, but you can miss things, and the selection is lossy by design. A code graph is more like a blueprint or a map. It's an external structural model of your system that exists independently of any conversation. It's incrementally updated as code changes, it's accurate because it's derived directly from your source, and it's useful across agents and sessions without asking any agent to decide what was worth remembering.
No. We process your code to build the graph and then immediately remove it. Your source code is not retained after processing. What we keep is the structural graph: function signatures, call relationships, dependency edges, domain classifications, and metadata. The actual source is never persisted.
No. Because your source code is removed immediately after processing, it is never available to train on. We only retain the structural graph, not the code itself. Training on something we don't store is not possible.
TypeScript, JavaScript, Python, Java, Go, Rust, Ruby, C++, Kotlin, Swift, and more. 10+ languages, one API. If your stack spans multiple languages, the graph works across all of them.
The graph updates incrementally. Each file change triggers a partial update — only the changed files and their affected relationships are re-processed, not a full rebuild. This keeps the graph current without meaningful performance overhead, so agents are always querying an accurate model of the current state of your code.
Supermodel is an HTTP API, so any agent that can make API calls can query it. We also provide an MCP server for Claude Code and other MCP-compatible clients, which lets agents query the graph as a native tool without any custom integration code. Full documentation is at docs.supermodeltools.com.
Static analysis tools like ESLint, SonarQube, or tree-sitter are built for specific checks at a point in time. Supermodel builds a persistent, queryable multi-layer graph that includes call relationships, dependency edges, domain classifications, and parse structure combined into a single representation. The graph is designed to be queried by agents at runtime, stays current as code changes, and works across languages and repositories. It's infrastructure for agents, not a linter.
If your business needs special compliance send us a message at engineers@supermodeltools.com.

Supermodel vs. the alternatives

Supermodel GitLab gkg Sourcegraph Baseline LLM
Cross-file dependency resolution10+ and growingLimited languagesDeep, matureGuesses from context window
Works with any repoYesRequires GitLabSelf-hosted or CloudYes
Start using immediatelyAPI key in minutesNeed GitLabContact salesYes
Feed structured context to AI agents UncompactNoNoN/A
Build your own tools/products on the dataPublic graph APINoPrivate APINo
Dead code / test coverage analysisBuilt-in toolsNoNoUnreliable
Runs in CIGitHub ActionsGitLab CI onlyNoYes
Open source toolsBuild your ownNo (EE license)No (proprietary)Varies

Get started today

Your API key in minutes.

14-day free trial. Start powering your agents with CodeGraphs today.

Start free trial