{"id":51016397,"url":"https://github.com/isatyamks/codentir","last_synced_at":"2026-06-21T11:02:07.106Z","repository":{"id":334915543,"uuid":"1121634982","full_name":"isatyamks/codentir","owner":"isatyamks","description":"Graph-native engineering investigation engine for root cause discovery, causal analysis, and ownership intelligence.","archived":false,"fork":false,"pushed_at":"2026-06-13T08:47:42.000Z","size":3046,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-06-13T10:22:41.822Z","etag":null,"topics":["agent-orchestration","agent-skills","agentic","agentic-ai","agentic-workflow","ai","ai-agents","human-in-the-loop","knowledge-graph","langchain","langgraph","langsmith","llms","root-cause-analysis","semantic-search","vector-search"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/isatyamks.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-23T09:54:28.000Z","updated_at":"2026-06-13T09:20:53.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/isatyamks/codentir","commit_stats":null,"previous_names":["isatyamks/multimodal-rag","isatyamks/atlasqa"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/isatyamks/codentir","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isatyamks%2Fcodentir","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isatyamks%2Fcodentir/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isatyamks%2Fcodentir/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isatyamks%2Fcodentir/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/isatyamks","download_url":"https://codeload.github.com/isatyamks/codentir/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isatyamks%2Fcodentir/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34607126,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-21T02:00:05.568Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agent-orchestration","agent-skills","agentic","agentic-ai","agentic-workflow","ai","ai-agents","human-in-the-loop","knowledge-graph","langchain","langgraph","langsmith","llms","root-cause-analysis","semantic-search","vector-search"],"created_at":"2026-06-21T11:02:06.059Z","updated_at":"2026-06-21T11:02:07.080Z","avatar_url":"https://github.com/isatyamks.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# Codentir\n**Beyond observability. Into investigation.**\n\n*Engineering Investigation Engine for modern software organizations.*\n\n\u003c/div\u003e\n\n### Let's be real about the problem.\nWhen production goes down, it is absolute chaos. You are digging through Slack threads, jumping into Jira, staring at Datadog dashboards, and trying to remember who pushed what commit three hours ago. Mean Time To Resolution (MTTR) sucks because humans simply cannot connect the dots across five different tools fast enough when millions of dollars are on the line.\n\n### Enter Codentir.\nWe built Codentir to be a ridiculously smart, ultra-agentic virtual SRE. We didn't just build a basic wrapper that lets you \"chat with your logs.\" We built a massive, autonomous reasoning engine that ingests your entire engineering reality, connects the dots, and literally tells you what broke and how to fix it.\n\n## OUR MOAT: The Ultra-Agentic End-to-End System\n\nHere is why Codentir is miles ahead of anything else out there. We built a massive 11-stage LangGraph workflow. It does not just search; it thinks, investigates, and proves its work. \n\nHere is exactly what happens under the hood when you give it an incident. This pipeline is our absolute moat:\n\n1. **Semantic Understanding Engine:** First, the LLM reads the room. It parses your query to figure out if you are just asking a general architecture question or if production is literally on fire and it needs to start a hardcore investigation.\n2. **Hybrid Discovery (The Smart Search):** We don't just rely on basic vector search. We use a heavy-duty 3-way hybrid setup. BM25 catches exact trace IDs. Dense vectors grab the semantic meaning. Then a Cross-Encoder reranker hits the results with deep attention so the most critical context floats to the very top.\n3. **Evidence Chain Extraction (The Detective):** This is where it gets crazy. Codentir walks through a NetworkX knowledge graph. It actively links a broken deployment back to a specific Jira ticket, which links to a Slack alert, which links to a PR. It builds the causal chain from scratch.\n4. **Path \u0026 Cause Ranking:** It statistically scores every single causal path it found. It isolates the exact bad commit or config change out of thousands of possibilities.\n5. **Change Intelligence Deep-Dive:** Once it flags a bad commit, it spins up specialized sub-agents. These look at deployment windows, release branches, code diffs, and even code owners to figure out exactly what syntax caused the crash.\n6. **Hypothesis Generation:** It drafts a concrete, engineering-grade theory of why things broke based on the evidence.\n7. **Blast Radius Calculator:** Before you even ask, it maps forward in the graph to tell you what else is going to break because of this issue. Downstream microservices? Database schemas? It knows.\n8. **Action Plan \u0026 Remediation:** It tells you exactly how to fix it. Revert this commit, run this script, or flip this feature flag.\n9. **The Final Report:** It writes the postmortem for you. Done.\n\n### The Fail-Safe: Dynamic Human-In-The-Loop\nWe know AI can hallucinate, so we hardcoded a stop-gap. If the system is not 90% confident in its root cause analysis at the ranking stage, it completely stops. It refuses to guess. It pings a human engineer, shows its top theories, asks for a course correction, and then injects that human feedback right back into its brain to keep going.\n\n```mermaid\nstateDiagram-v2\n    direction TB\n    \n    state \"Phase 1: Ingestion \u0026 Triage\" as P1 {\n        1: LLM Intent Parsing\n        2: Context Aggregation\n        1 --\u003e 2\n    }\n    \n    state \"Phase 2: Multi-Modal Retrieval\" as P2 {\n        3: Sparse Search (BM25)\n        4: Dense Search (Vector Embeddings)\n        5: Cross-Encoder Deep Attention\n        3 --\u003e 5\n        4 --\u003e 5\n    }\n    \n    state \"Phase 3: Causal Graph Inference\" as P3 {\n        6: Evidence Chain Traversal\n        7: Statistical Path Ranking\n        8: Candidate Isolation\n        6 --\u003e 7\n        7 --\u003e 8\n    }\n\n    state \"Phase 4: Agentic Resolution\" as P4 {\n        9: Sub-Agent Swarm (Diff, Release, Code Owners)\n        10: Engineering Hypothesis Draft\n        11: Blast Radius Mapping\n        12: Automated Remediation Scripting\n        9 --\u003e 10\n        10 --\u003e 11\n        11 --\u003e 12\n    }\n\n    state \"Human-In-The-Loop (HITL) Gateway\" as HITL\n\n    [*] --\u003e P1\n    P1 --\u003e P2 : \"Incident Declared\"\n    P2 --\u003e P3 : \"Context Hydrated\"\n    P3 --\u003e HITL : \"Math Confidence \u003c 90%\"\n    P3 --\u003e P4 : \"Math Confidence \u003e 90%\"\n    \n    HITL --\u003e P4 : \"Human Override/Approval\"\n    HITL --\u003e P2 : \"Human Re-Steers Query\"\n    \n    P4 --\u003e [*] : \"Postmortem Finalized\"\n```\n\n## The Foundation: A Validated Knowledge Graph\n\nBefore the agentic loop even wakes up, we have to make sure the data is flawless. \n\nCodentir ingests Git commits, Jira tickets, incidents, and Slack messages. But we don't just dump them into a database. We run them through a strict Validation Orchestrator that enforces data schemas. If the data is garbage, it gets rejected. The clean data gets wired into a massive NetworkX graph. This is how we mathematically eliminate hallucination risks from orphaned data.\n\n```mermaid\ngraph TD\n    subgraph \"1. Fragmented Enterprise Data\"\n        A1[Git Repositories]\n        A2[Jira / Linear Tickets]\n        A3[Datadog / PagerDuty Alerts]\n        A4[Slack / Teams Threads]\n    end\n\n    subgraph \"2. The Ironclad Validation Layer\"\n        B1{Validation Orchestrator}\n        B2[Schema Enforcement]\n        B3[Orphaned Data Rejection]\n    end\n\n    subgraph \"3. The Trinity Backend\"\n        C1[(NetworkX Causal Graph)]\n        C2[(Dense Vector Store)]\n        C3[(BM25 Keyword Index)]\n    end\n\n    subgraph \"4. Execution\"\n        D1((LangGraph Reasoning Engine))\n    end\n\n    A1 \u0026 A2 \u0026 A3 \u0026 A4 --\u003e B1\n    B1 --\u003e B2\n    B2 --\u003e B3\n    B3 --\u003e |Validated Entities| C1\n    B3 --\u003e |Semantic Embeddings| C2\n    B3 --\u003e |Tokenized Text| C3\n\n    C1 --\u003e |Topology \u0026 Paths| D1\n    C2 --\u003e |Context Similarities| D1\n    C3 --\u003e |Exact Trace IDs| D1\n```\n\n## Deep Dive Documentation\n\nWant to know exactly how the engine ticks? Check out our core architecture docs:\n- [The Agentic Reasoning Loop](docs/agentic_reasoning.md)\n- [Hybrid Retrieval System](docs/hybrid_retrieval.md)\n- [The Causal Knowledge Graph](docs/knowledge_graph.md)\n\n## How to run this beast\n\nWe made it super easy to fire up on your local machine. Just make sure your environment variables are set up (like your `GROQ_API_KEY`) and hit the CLI. We highly recommend passing the `--agent` flag so you get the full LangGraph reasoning experience instead of just the basic retrieval.\n\n```bash\npython -m src.codentir.cli \\\n    --data-dir \"data\" \\\n    --tenant-id \"tenant_default\" \\\n    --query \"Payment gateway is throwing 500s right now\" \\\n    --agent\n```\n\n### What those flags actually do:\n| Argument | What it does | Required |\n| :--- | :--- | :---: |\n| `--data-dir` | Points to the folder where your ingested system artifacts live. | Yes |\n| `--tenant-id` | Multi-tenant isolation so you don't mix up customer data. | Yes |\n| `--query` | Tell the system what is broken or what you want to know. | Yes |\n| `--agent` | Flips the switch to turn on the massive 11-stage reasoning loop. | Yes |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fisatyamks%2Fcodentir","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fisatyamks%2Fcodentir","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fisatyamks%2Fcodentir/lists"}