onto-agent
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@onto-agentwhat is the blast radius of changing src/core.py?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
π OntoAgent
The All-Knowing Code Brain & Architecture Contract Guard for AI Coding Agents
A repository-wide cognitive knowledge graph and architecture governance engine for AI coding agents.
π Why OntoAgent?
Modern coding agents face three structural problems when working with large codebases:
Blind men and the elephant: They only see the current file, not cross-module callers, API contracts, and test dependencies.
Long-context hallucination: "Brute-forcing" the entire repository into the Prompt costs a lot of tokens, has a low signal-to-noise ratio, and the model tends to ignore critical constraints.
Destructive changes are hard to trace: Changing one core class makes it hard to quickly know which upstream modules, tests, and interfaces will break together.
Traditional approaches:
Naive Raw Text: Stuff everything into the context β huge token usage and no structured targeting.
Vector-Chunk RAG: Chunks by text similarity, compresses tokens, but loses AST-level dependencies, inheritance relationships, and contract semantics.
OntoAgent's choice:
Use AST static parsing + embedded graph database to build a repository-wide cognitive graph, so AI agents see the call network, contracts, tests, and blast radius before modifying code.
Related MCP server: code-intel
ποΈ Architecture Flow
graph TD
subgraph Base["εΊεΊ§ε±"]
Kuzu["KΓΉzu Embedded Graph DB"]
AST["AST Parsers: Python / TypeScript / Markdown / JSON"]
end
subgraph Core["ζ ΈεΏεΌζ"]
Blast["Blast Radius Analyzer"]
Context["Smart Context Extractor"]
Compliance["Architecture Compliance Guard"]
Scanner["Codebase Scanner & Entity Ingestion"]
end
subgraph Ecosystem["δΊ€δΊηζ"]
MCP["MCP Server"]
DSH["DSH / Cordis Plugin"]
CLI["onto-agent CLI"]
Dashboard["React 2D Canvas + Dagre Dashboard"]
end
AST --> Scanner
Scanner --> Kuzu
Kuzu --> Blast
Kuzu --> Context
Kuzu --> Compliance
Blast --> MCP
Context --> DSH
Compliance --> CLI
Scanner --> Dashboardπ Benchmark
Reproduce with one command:
python benchmark/run_benchmark.pyBased on deterministic code fixtures, comparing three context construction strategies:
Method | Tokens | Token Reduction | Critical Dep Recall | Test & Contract Recall | Blast Precision | Blast Recall | Blast F1 |
A. Naive Raw Text | 1162 | 0.0% | 100.0% | 100.0% | 50.0% | 100.0% | 66.7% |
B. Vector-Chunk RAG | 282 | 75.7% | 0.0% | 66.7% | 60.0% | 60.0% | 60.0% |
C. OntoAgent AST Graph | 120 | 89.7% | 100.0% | 100.0% | 100.0% | 100.0% | 100.0% |
Conclusions:
OntoAgent reduces token consumption by about 89.7% compared to Naive Raw Text.
OntoAgent leads Vector-Chunk RAG across the board in critical dependency recall, test/contract recall, and blast radius targeting.
Full report:
benchmark/reports/benchmark_report.md.
π Quickstart
1. Install
pip install -e .[test]2. Scan the entire repository
onto-agent scan --path .3. Launch the visualization workbench
python dashboard/api_server.py
# ζεΌ http://127.0.0.1:80004. Configure MCP
Copy integrations/cursor_mcp.json to .cursor/mcp.json, or merge it in Claude Desktop:
{
"mcpServers": {
"onto-agent": {
"command": "python",
"args": ["-m", "onto_agent.mcp"]
}
}
}5. Install the DSH native plugin
dsh plugin --profile web add ./integrations/dsh/onto-agent-pluginπ§ Agent Abilities
get_blast_radius(file_path)
Before modifying any file/symbol, returns:
Direct callers
Indirectly affected modules
Downstream dependencies
Associated API contracts
Tests that must be run
check_architecture_compliance(strict=True)
Checks:
Circular imports
Cross-layer violation calls
Core classes not covered by tests
get_smart_context(query_or_symbol)
Generates high signal-to-noise context before refactoring/generation:
Definition, line numbers, Docstring
Class/function list
imports / callers
API contracts, related tests, related documentation
π Ecosystem
Entry | Method |
MCP | 10 tools including |
DSH |
|
CLI |
|
REST |
|
Dashboard | React + Force Graph + Dagre hierarchical architecture diagram |
ποΈ Project Layout
src/onto_agent/
βββ engine/ # Scanner, ArchitectureGuard, Context, Steering, Reflection
βββ storage/ # KΓΉzu graph storage adapter
βββ mcp/ # MCP Server
βββ client/ # Python SDK
βββ cli.py # Unified CLI
dashboard/ # FastAPI + React workbench
benchmark/ # Reproducible Codex-for-Open benchmark
integrations/ # Cursor / Claude / Windsurf / DSH
docs/ # Design docs & tickets
tests/ # 48+ unit / integration testsπ Documentation
π License
This project is open-sourced under Apache-2.0.
This server cannot be deployed
Maintenance
Related MCP Connectors
Code intelligence platform for AI agents. 20 tools for architecture, security & impact analysis.
Codebase graphs, caller impact analysis, and recorded project context for AI coding agents.
Codebase intelligence for AI agents β dead code, blast radius, ownership.
Governance layer for AI coding agents: knowledge-graph grounding, session audit, policy controls.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceTransforms codebases into structural knowledge graphs for AI agents and developers, providing precise architectural awareness and dependency mapping.54MIT
- AlicenseNot gradedqualityBmaintenanceProvides semantic code search and code insights via a knowledge graph, enabling AI to understand, navigate, and modify complex projects with deep dependency and architecture analysis.MIT
- AlicenseNot gradedqualityDmaintenanceSupercharges AI coding agents with semantic code intelligence, providing pre-built knowledge graphs for surgical context, faster answers, and fewer tool calls.MIT
- AlicenseNot gradedqualityDmaintenanceProvides AI coding agents with persistent architectural memory of codebases, enabling impact analysis, test generation, and code generation with reduced token usage.MIT