onto-agent
🌌 OntoAgent
The All-Knowing Code Brain & Architecture Contract Guard for AI Coding Agents
Motor de gobernanza de arquitectura y grafo de conocimiento de todo el repositorio para agentes de codificación de IA.
📖 Why OntoAgent?
Los agentes de codificación modernos suelen enfrentarse a tres problemas estructurales al trabajar con grandes bases de código:
El elefante y los ciegos: solo ven el archivo actual, no ven los llamadores entre módulos, los contratos de API ni las dependencias de prueba.
Alucinación de contexto largo: «meter todo el repositorio a la fuerza en el Prompt», con alto coste de tokens, baja relación señal-ruido, y el modelo tiende a ignorar restricciones clave.
Los cambios destructivos son difíciles de rastrear: al modificar una clase central, no se puede saber rápidamente qué módulos ascendentes, pruebas e interfaces explotarán a la vez.
Enfoques tradicionales:
Naive Raw Text: se introduce todo en el contexto, con tokens enormes y sin localización estructurada.
Vector-Chunk RAG: divide en fragmentos por similitud de texto, comprime tokens, pero pierde dependencias a nivel de AST, relaciones de herencia y semántica de contratos.
La elección de OntoAgent:
Construir un grafo de conocimiento de todo el repositorio con análisis estático de AST + base de datos de grafos embebida, para que el agente de IA vea primero la red de llamadas, contratos, pruebas y radio de explosión antes de modificar código.
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
Reproducción con un clic:
python benchmark/run_benchmark.pyBasado en fixtures de código deterministas, compara tres estrategias de construcción de contexto:
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% |
Conclusión:
OntoAgent reduce el consumo de tokens en aproximadamente 89.7% en comparación con Naive Raw Text.
OntoAgent supera a Vector-Chunk RAG en recuperación de dependencias críticas, recuperación de pruebas/contratos y localización del radio de explosión.
El informe completo está en
benchmark/reports/benchmark_report.md.
🚀 Quickstart
1. Instalación
pip install -e .[test]2. Escanear todo el repositorio
onto-agent scan --path .3. Iniciar el panel de trabajo visual
python dashboard/api_server.py
# 打开 http://127.0.0.1:80004. Configurar MCP
Copia integrations/cursor_mcp.json como .cursor/mcp.json, o combínalo en Claude Desktop:
{
"mcpServers": {
"onto-agent": {
"command": "python",
"args": ["-m", "onto_agent.mcp"]
}
}
}5. Instalar el plugin nativo de DSH
dsh plugin --profile web add ./integrations/dsh/onto-agent-plugin🧠 Agent Abilities
get_blast_radius(file_path)
Antes de modificar cualquier archivo/símbolo, devuelve:
Llamadores directos
Módulos afectados indirectamente
Dependencias descendentes
Contratos de API asociados
Pruebas que deben ejecutarse
check_architecture_compliance(strict=True)
Comprueba:
Imports circulares
Llamadas que violan la capa
Clases centrales sin cobertura de pruebas
get_smart_context(query_or_symbol)
Genera contexto de alta relación señal-ruido antes de refactorizar/generar:
Definición, número de líneas, Docstring
Lista de clases/funciones
imports / callers
Contratos de API, pruebas relacionadas, documentación relacionada
🔌 Ecosystem
Entrada | Método |
MCP |
|
DSH |
|
CLI |
|
REST |
|
Dashboard | React + Force Graph + diagrama de arquitectura jerárquica de Dagre |
🗂️ 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
Este proyecto es de código abierto bajo Apache-2.0.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceTransforms codebases into structural knowledge graphs for AI agents and developers, providing precise architectural awareness and dependency mapping.53MIT
- AlicenseNot gradedqualityCmaintenanceProvides 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 gradedqualityBmaintenanceSupercharges AI coding agents with semantic code intelligence, providing pre-built knowledge graphs for surgical context, faster answers, and fewer tool calls.MIT

coderadiusofficial
AlicenseNot gradedqualityAmaintenanceEnables AI agents to query architecture context, data contracts, and blast radius to prevent cross-repo architectural breakage before merging.30Apache 2.0
Related MCP Connectors
AI Agent with Architectural Memory. Impact analysis (free), tests and code from the graph (pro).
Give your AI agent a persistent map of your project's structure, dependencies, and bugs.
Shared, permission-aware company context for AI agents, with provenance, approvals and audit.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/rinDBeans/onto-agent'
If you have feedback or need assistance with the MCP directory API, please join our Discord server