H-KFX (Hybrid Knowledge Fixer) is a fully autonomous bug-fixing agent. A developer creates a Jira ticket describing a bug and pointing to the relevant file. H-KFX takes it from there: it analyzes the problem with GPT-4o, searches a RAG knowledge base of past fixes stored in MongoDB, augments this with external best practices via Tavily AI, generates a code fix, runs the relevant test suite in isolation to validate the fix, and: if approved: opens and merges a GitHub pull request. The Jira ticket is then automatically marked Done.
A new Jira ticket is created → webhook fires to the Flask backend (exposed via ngrok). Ticket metadata (summary, description, repo URL, branch, file) is parsed.
GPT-4o reads the ticket and the relevant source file to understand the root cause and formulate a fix strategy.
Vector search over a knowledge base of past bug fixes. Similar historical fixes are retrieved and injected as context into the code generation prompt.
Tavily searches the web for external best practices, library documentation, and community solutions relevant to the bug type.
GPT-4o generates the fix. The agent derives and runs only the relevant tests in an isolated environment. If validation fails, the agent self-corrects (up to 3 retries).
A review link is posted on the Jira ticket. The developer inspects the diff in the React frontend and approves. H-KFX creates and merges the GitHub PR, then closes the Jira ticket.
The architecture of H-KFX, read a task description → retrieve relevant context → reason → use tools → validate the output → report, is the same scaffold needed for an autonomous interpretability investigator agent. Such an agent would: read a model behavior anomaly, retrieve prior circuit analyses, use interpretability tools (activation patching, probing) to investigate, validate a mechanistic hypothesis, and produce an explanation. H-KFX demonstrates that this loop works end-to-end at production speed.