Docs/Observe/AI triage

AI triage

4 min read
On this page

Dokwe's AI agents read your app's errors, logs and metrics. When they find a problem, they explain what went wrong, how serious it is, and how to fix it. The models run on an API key you provide.

Connect a model provider#

AI triage uses your own key. Add it in Settings, under AI & Integrations.

ProviderKey settingExample models
AnthropicCLAUDE_API_KEYClaude Sonnet 5.5, Claude Opus 5.5, Claude Haiku 5.5, and the 4 models
OpenAIOPENAI_API_KEYGPT-4.1, GPT-4o, o3, o4-mini
GoogleGEMINI_API_KEYGemini 2.5 Pro, Gemini 2.0 Flash

Choose your model with the AI_MODEL setting. The default is Claude Sonnet 5.5. Keys are stored encrypted, and guest members can't change them.

If the key for the model you chose is missing, AI features stop with a message asking you to add it in Settings → AI & Integrations.

What the agents analyze#

There are three agents. Each runs on its own schedule:

AgentLooks atRuns
Error triageErrors caught in your logsAs each error is found, plus a batch every 5 minutes
SecurityYour logsEvery 15 minutes
OptimisationMetrics, slow queries and latencyEvery hour

Errors come from two places. Dokwe scans your container output (see metrics and alerts), and your code can report errors directly through error ingest.

To run a scan right away, use the project's Intelligence tab. To pause or resume every agent in your workspace, go to AI Agents.

What triage produces#

Each error triage finding includes:

  • Classification: database, network, runtime, config, memory, dependency, auth or unknown
  • Severity: critical, high, medium or low
  • Root cause: what went wrong
  • Fix: what to change
  • Explanation and prevention: why it happened and how to avoid it next time
  • Estimated impact
  • Auto-fix: whether the fix can be applied for you, and of what type

If the same problem shows up again within an hour, Dokwe doesn't create another finding for it. New findings appear live in the project's Intelligence tab. Each finding is open, in_review, resolved or dismissed.

Fix actions#

A finding can carry one of five fix types:

Fix typeWhat happens when applied
env_varSets the environment variable and redeploys. Admins get an email.
restartRestarts the container.
code_changeOpens a GitHub pull request for you to review before merging.
dockerfileProposes a change only. You review and apply it yourself.
config_fileProposes a change only. You review and apply it yourself.

In the Intelligence tab, dockerfile and config_file fixes show a Review & Apply button that asks you to confirm. The other types show Apply Fix. If a finding is a false alarm, click Dismiss.

Approval or automatic#

Each project has an Auto-Fix Mode in its Intelligence settings. Only workspace admins can change these settings or pause and resume agents:

ModeWhat happens
Approval (default)Nothing is applied until someone clicks Apply Fix. Pending fixes stay open on the finding.
Autoenv_var and restart fixes are applied as soon as they're found.
OffFixes are never applied automatically.

Code changes always go through a pull request, and dockerfile and config_file fixes always need you to apply them, whatever the mode. Each applied fix records who applied it: the agent, or the person who approved it.

Checking that a fix worked#

After an env_var or restart fix, the finding moves to in_review and Dokwe checks the app's logs for the same error:

  • It counts the error in the 30 minutes before the fix, then in the 10 minutes after (leaving out the first minute, while the app restarts).
  • Fixed: the error happened before and not after. The finding is resolved.
  • Still happening: the error came back. The finding is open again, with both counts.
  • Not measured: the error didn't appear in the logs before or after, so Dokwe can't tell. The finding is resolved, and says so.

Code changes, dockerfile and config_file fixes aren't checked this way, because they only take effect once you merge or apply them.

Ask AI about an error#

Each caught error also has an AI fix action. It returns a cause, severity, fix, explanation and prevention for that one error. The answer streams into the dashboard when it's ready.

You can also paste raw log output and get a diagnosis back in three parts: problem, cause and fix.

Error ingest#

To report errors from your own code, send them to Dokwe with a project-scoped token. There are SDKs for JavaScript, Python and PHP. Reported errors are grouped into issues, and the AI agents can triage them. See error ingest for setup, limits and retention.

MCP server#

Dokwe runs an MCP server. It lets AI assistants such as Claude Code list your projects and errors, inspect occurrences, and acknowledge, assign, ignore or resolve issues. It uses a workspace token. See MCP server for setup.

bash
claude mcp add --transport sse dokwe https://dokwe.com/api/mcp/sse \
  --header "Authorization: Bearer <your-mcp-token>"

Resolving an issue through MCP needs an explicit confirmation, so an assistant can't close issues without you saying so.