Inspiration
AgentHeal was inspired by my experience working in corporate manufacturing environments, where our agentic systems must adapt to changing production data, business policies, quality thresholds, and routing rules.
In these settings, data drift, policy changes, and small code breakdowns can quickly become costly: incorrect decisions, delayed escalations, inconsistent reporting, or downtime. The challenge is not only detecting failures—it is identifying what changed, isolating the affected component, and fixing it safely before the issue spreads.
AgentHeal brings that maintenance mindset to AI agents: detect drift early, target the smallest safe repair, validate it, and keep a human accountable for release approval.
What it does
AgentHeal is a pluggable, GitOps-first self-healing layer for single-agent and multi-agent systems.
It records agent traces, detects meaningful drift from errors, latency, tool failures, output quality, and feedback, identifies the likely agent and source files, generates a minimal unified diff, validates it in an isolated Git worktree, and creates a GitHub pull request only after explicit approval.
The Council sandbox demonstrates the full lifecycle: a routing regression is automatically detected, reviewed, repaired through a validated PR, manually merged, and verified as healthy when the same scenario is rerun.
How we built it
We built AgentHeal as a Python package with LangGraph orchestration and four core stages:
- Drift detection from telemetry, errors, latency, tool failures, and feedback.
- Minimal patch generation using a dedicated coding model.
- Safety checks and isolated Git worktree validation.
- Review-gated GitHub PR creation.
The sandbox combines FastAPI, SSE streaming, React, SQLite authentication, and a Sarvam-powered LLM Council. We used Codex and GPT-5.6 to design the architecture, build the monitoring workflow, strengthen safety boundaries, generate tests, and improve the demo experience.
Challenges I ran into
The core challenge was avoiding false confidence. A model can describe a problem convincingly without proving that the underlying system is actually broken.
We made AgentHeal behavior-driven: it executes a controlled acceptance probe against the current codebase before opening a repair incident. Once a reviewed PR is merged, the same probe verifies the corrected behavior and prevents the old alert from reopening.
We also addressed secure BYOK configuration, local authentication, safe GitHub token handling, browser path restrictions, and ensuring that previews never modify the primary checkout.
Accomplishments that I'm proud of
- Built a complete detect → diagnose → patch → validate → PR → verify workflow.
- Applied lessons from manufacturing operations to AI-agent reliability.
- Made repairs minimal, reviewable, and isolated from the primary checkout.
- Added behavior-based verification rather than relying only on LLM reasoning.
- Kept PR publishing explicit, admin-only, and server-policy controlled.
- Created a visual Council sandbox that makes both agent deliberation and AgentHeal’s maintenance decisions auditable.
What I learned
In manufacturing, reliable systems need monitoring, traceability, controlled changes, and clear escalation paths. AgentHeal applies the same principle to AI systems.
We learned that self-healing should not mean unattended code changes. It should mean fast detection, evidence-backed diagnosis, narrow repair scope, isolated validation, and human-controlled deployment. This approach can reduce the time required to investigate and safely respond to agent failures caused by drift, changing policies, or code regressions.
What's next for AgentHeal
- Add production telemetry adapters for enterprise agent systems.
- Support data-drift and policy-drift rules alongside code-level repair.
- Integrate with more orchestration frameworks and multi-agent runtimes.
- Add persistent observability, alerting, and organization-specific repair policies.
- Build evaluation scenarios inspired by real operational settings: policy changes, changing data distributions, tool failures, and routing breakdowns.
- Develop the original AethM research track into a paper on safe, code-level self-adaptation for agentic systems.
Built With
- aws-bedrock
- codex
- fastapi
- git
- github-api
- langgraph
- ollama
- openai
- python
- react
- sarvam-ai
- server-sent-events-(sse)
- sqlite
- typescript
- vite
Log in or sign up for Devpost to join the conversation.