When on-call raises a bug ticket, RCA walks the logical blast radius of stack traces to rank recently changed code commits by proximity. Stop guessing; locate the culprit instantly.
RCA is built from the ground up on top of Cognee, the open-source AI memory engine. Rather than querying raw file strings or relying on expensive, non-deterministic LLM vector chunks, RCA structures your codebase as a persistent knowledge graph in Cognee.
Ingests codebase structures into Cognee's native embedded memory adapters without requiring cloud API keys.
Uses deterministic UUID mapping, allowing git diff line ranges and tree-sitter logical scopes to link to the exact same nodes.
Reconciles previous releases, keeping historic MODIFIED_IN edges intact across repeated code baseline synchronizations.
from rca import env
from rca.baseline import build_baseline
from rca.diff_sync import sync_release
from rca.query import analyze
await env.init() # embedded Cognee graph, fully local
# tree-sitter -> CodeGraphEntities in the Cognee graph
await build_baseline("/path/to/repo")
await sync_release(repo, prev_sha, rel_sha, "v1.1.0", ts)
# Deterministic ids: uuid5("type:file_path:symbol")
# -> graph add_nodes MERGEs, so re-ingest upserts
findings = await analyze(stack_trace, k_hops=2)
RCA represents a paradigm shift from pure string grep or embeddings-only retrieval by introducing historical context directly to code structure.
Parses files into logical components (files, functions, classes, and call/import edges) using tree-sitter grammars. Assigns deterministic IDs to prevent duplicates.
Maps git diff prev..rel line ranges directly to enclosing logical symbols, tagging them with MODIFIED_IN edges to release records.
Starts at stack traceback "seed nodes" and walks the call graph blast radius up to k-hops, ranking candidates by proximity and release recency.
Integrate RCA directly into your CI/CD pipeline or run it locally in your developer environment. Sync releases on git tags and parse incidents as they land.
pip install -r requirements.txt
python demo.py # narrated CLI walkthrough
python dashboard/server.py # web dashboard playground (port 8080)