SuperAPIAI Directory

OntoPrune

github.com · AI coding

OntoPrune is a neuro-symbolic context pruning middleware for local small language models (SLMs) and coding agents. Through local AST parsing and an in-memory RDF graph, it converts multi-file source code into minimal typed dependency contracts, isolating closed-world functional boundaries before attention computation, thereby reducing input tokens, lowering first-token latency (TTFT) on CPU, and preventing leakage of internal proprietary code. The project is provided as an MCP server and CLI, supporting cross-file dependency resolution and deterministic verification of generated code.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)
PlatformsLinux

About this tool

OntoPrune is an ultra-lightweight (under 12ms on CPU) neuro-symbolic middleware for pruning context in coding scenarios involving local small language models (SLMs) and cloud large language models (LLMs). Its core idea is to convert multi-file source code into minimal typed dependency contracts before the model's attention computation, exposing only permitted methods and domain types to the model, thereby reducing the dilution of attention by irrelevant context.

Main capabilities include: reducing input tokens by about 60% in modular enterprise architectures; lowering first-token latency (TTFT) by about 62% on local CPU models (such as Ollama); achieving 100% functional test pass rate (Pass@1) across 24 independent sandbox runs; and preventing 100% of proprietary code leakage, because no internal dependency code lines are sent to external APIs. The project also provides a native MCP server (ontoprune-mcp) compatible with Claude Desktop, Cursor, Gemini CLI, or Antigravity IDE, exposing two tools, prune_context and verify_response; it also provides a command-line interface (CLI). Usage includes connecting to coding assistants via MCP configuration, or using the CLI for context pruning and verification. Applicable scenarios are local AI-assisted programming, code comprehension in multi-module projects, and code intelligence assistance in privacy-sensitive environments. Regarding limitations, the materials do not provide specific installation commands, complete CLI parameters, detailed supported language lists, pricing models, or complete platform compatibility information; some information is not yet available.

Up/Down to navigate · Enter to open · ESC to closeBrowse all tools