rutvej /
DAA
Self-hosted agent that investigates production errors and opens a fix pull request
- 53 stars
- 6 stars since 3 Oct
- Python
- Updated 5 days ago
- Some experience
- Coding agents & dev tools
When an error hits production, someone usually has to dig through logs, recent commits and code to find the cause. The same error can also page people again and again. DAA tries to take over that first investigation.
An error arrives through a webhook (Sentry, Datadog, Prometheus, CloudWatch) or through a small Python SDK. DAA fingerprints it with SHA-256, so an error it has already seen is suppressed. For a new pattern, a LangChain ReAct agent looks at recent git commits, app logs, traces and the source code, using AST navigation to find the relevant lines. It then pushes a branch and opens a pull request with a code fix, a root-cause explanation and a postmortem summary.
Plain alerting tells you that an error happened. DAA aims to hand you a proposed fix to review. The agent has a hard cap of 8 tool calls to limit LLM cost. It can run as one Docker container with no database, or as a fuller stack with Postgres, RabbitMQ and an admin UI. It can also run air-gapped with a local Ollama model.
What it does
Deduplicated alerts
Errors are fingerprinted with SHA-256, and sliding-window cooldowns keep repeats quiet. The agent only wakes up for new error patterns.
Four-way investigation
The agent reads git history, logs and traces, and navigates the source code through its AST to find the failing line.
Bounded agent with human review
A hard budget of 8 tool calls limits runaway cost. A human-in-the-loop option lets you approve a fix before the PR lands.
Choice of LLM and git host
It supports Gemini, GPT-4o, Claude, Vertex and Ollama. It works with GitHub, GitLab, Gitea and Bitbucket.
CLI and MCP support
A daa command handles setup, app registration, test errors and logs. DAA can also be used as a tool inside Claude Desktop or Cursor through MCP.
What you could build
- Forward Sentry or Prometheus alerts to DAA so each new error gets a draft fix PR.
- Run a single Docker container as a stateless webhook receiver on Cloud Run or Fargate.
- Add the Python SDK to a service so it reports exceptions straight to DAA.
- Run the agent against a local Ollama model in an air-gapped network.
- Fire a synthetic error with the daa test command to watch the whole pipeline work.
Get started
You need Docker, a free Gemini API key and a GitHub personal access token. Start the standalone container with your keys, then send it a test alert with curl. DAA should then clone the repo, ask the LLM and open a PR.
docker run -p 8000:8080 \
-e LLM_PROVIDER=google \
-e GEMINI_API_KEY="your_api_key_here" \
-e LLM_MODEL="gemini-2.5-flash" \
-e DAA_DB_PROVIDER=none \
-e DAA_GIT_TOKEN="github_pat_..." \
-e GIT_HOST="https://github.com" \
-e GIT_ORG="your-github-username" \
rutvej1/daa-standalone:latestcurl -X POST http://localhost:8000/ingest/prometheus \
-d '{"status": "firing", "alerts": [{"labels": {"alertname": "TestCrash"}}]}'Commands are copied from the project's README. Read it on GitHub for the full setup.
More in Coding agents & dev tools
rea
MCP server that lets AI agents reverse engineer apps, binaries and websites locally