CentR Icon CentR v0.1.0
Local-First • SQLite + FTS5 • 0 Cloud Telemetry

Project Intelligence for AI Coding Agents

CentR gives coding agents persistent project memory, reusable learning, and only the context they actually need.

Store everything useful. Send almost nothing.
$ npm install -g @centr-ai/cli
CentR System Architecture

The Exploration Tax in AI Coding

Why do agents waste 30-50% of their turn budget reading the same files?

Standard Agent Exploration

The agent enters blind. It runs find_by_name, then grep_search, then reads 3 irrelevant files, follows imports, searches again, and exhausts 2–4 turns and thousands of prompt tokens before writing a single line of code.

With CentR Intelligence

CentR supplies the exact AST symbols, relevant file paths, architectural constraints, and validated learnings directly in turn 1. The agent pinpoints the target file directly without blind exploratory searches.

How CentR Operates

Store everything useful. Send almost nothing.

CentR Lifecycle Overview
01

Index & Sync

Parses TypeScript/JavaScript AST into symbols, imports, and routes. Incremental SHA-256 sync verifies changes in sub-10ms.

02

Retrieve

SQLite 3 + FTS5 BM25 ranked search scores symbols, paths, and memories with sub-2ms latency.

03

Reason (Optional)

Optional local SLM re-ranks bounded candidates. Strict hallucination guards ensure zero invented files.

04

Learn

Observed successes update evidence confidence scores. Validated learnings become reusable across projects.

Engineered for Real Repositories

Deterministic intelligence where it counts, semantic reasoning where it helps.

🌲

AST-Based Code Indexing

Extracts functions, classes, interfaces, types, and dependencies using TypeScript's Compiler API. Never guesses.

🧠

Project Memory

Project-isolated institutional knowledge. Retains architecture patterns, bug resolutions, and API contracts.

🌐

Evidence-Based Learning

Cross-project wisdom requiring mathematical evidence (≥ 70% success rate, ≥ 3 validations) before promotion.

⚖️

Token Budgeting

Greedy relevance packing strictly bounds context tokens (e.g. 4000 tokens), preventing agent context overflow.

🤖

Optional Local Brain

Local Small Language Models (Ollama 1B–7B) for semantic re-ranking, task understanding, and failure diagnosis.

🔌

Model Context Protocol (MCP)

Native stdio MCP server for seamless plug-and-play with Claude Code, Cursor, and OpenAI Codex.

CentR V1 vs. CentR V2

V2 augments the deterministic Core. It does not replace it.

Feature CentR V1 (Core) CentR V2 (Hybrid Brain)
Primary Authority Deterministic Core (AST + SQLite) Deterministic Core (Core is Authority, Brain is Advisor)
Search Latency < 2 ms (FTS5 BM25) < 2 ms Core + ~7–12 ms local SLM re-ranking
Cloud AI Requirement Zero (100% Offline) Zero (100% Offline via local Ollama / SLM)
Semantic Re-ranking Deterministic FTS5 weights Small Language Model prompt scoring
Hallucination Defense Impossible (grounded in AST) Strict candidate bounding (prunes ungrounded IDs)
Fallback Behavior N/A (Pure Deterministic) Automatic fallback to V1 if Brain is slow/offline

Real-Agent A/B Benchmark Results

Preliminary interactive benchmark evaluating 7 software tasks across 21 verified runs.

Preliminary Interactive Benchmark Disclosure

Preliminary interactive benchmark observations showed fewer exploratory tool calls in the tested scenarios. Agent token telemetry was not available, so these results should not be interpreted as a controlled measurement of token savings or universal performance improvement. Observed tool call counts and test results represent verified executions.

Scenario Execution Mode Avg Completion Time Observed Tool Calls Test Pass Rate Git Patch Size
Scenario A (Baseline) manual 167,143 ms 6.0 calls 100% (7/7 passed) +23 lines avg
Scenario B (CentR V1) manual 122,263 ms (-45s) 4.0 calls (preliminary observed) 100% (7/7 passed) +23 lines avg
Scenario C (CentR V2) manual 122,263 ms (-45s) 4.0 calls (preliminary observed) 100% (7/7 passed) +23 lines avg

Simple Terminal Workflow

Initialize your repository with a single command.

bash
# 1. Install CentR globally
npm install -g @centr-ai/cli

# 2. Initialize in your project
cd my-project
centr init

# 3. Generate context for a coding task
centr context "Add rate limiting middleware to auth routes"

# 4. Search symbols or view status
centr search "verifyToken"
centr status