> ## Documentation Index
> Fetch the complete documentation index at: https://cofounder.appeeky.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Why-agent (Root-Cause Analysis)

> Ask "why did this metric move?" and get ranked candidate causes with evidence for and against.

When a metric moves and you want to know *why*, the Why-agent runs a focused investigation: it digs through your releases, metadata changes, reviews, keyword movements, competitor moves, and past experiments, then returns **ranked candidate causes with evidence** — not a hand-wavy paragraph.

## Where to use it

* **Dashboard → Co-founder → Why** — pick the metric (revenue / downloads), a window, optionally sharpen the question ("why did US revenue drop after v2.4?"), and hit Run.
* **Chat** — asking "why did revenue drop?" in Slack/Telegram/dashboard chat can route into the same analysis.
* **Signals** — an anomaly signal can seed an RCA with its metric context attached.
* **API** — see below.

## What a report looks like

Every analysis produces a structured report:

* **Observation** — what actually happened, quantified ("US revenue fell 34% between Jun 2–9")
* **Candidate causes** — each with a likelihood (`very_likely` / `likely` / `possible` / `unlikely`), evidence *for*, and evidence *against*. The agent argues both sides.
* **Top pick** — the most likely cause with a confidence score and a concrete next step
* **Analyst notes** — caveats and data gaps

If the agent can't decide between two causes, it may register an **open hypothesis** — a signal that re-checks the question when more data lands.

## API

Trigger an analysis (runs async, typically 30–90 seconds):

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl -X POST https://api.appeeky.com/v1/cofounder/why \
  -H "X-API-Key: $KEY" -H "Content-Type: application/json" \
  -d '{
    "appId": "6479581124",
    "metricPath": "asc.revenue",
    "timeRange": { "from": "2026-06-01T00:00:00Z", "to": "2026-07-01T00:00:00Z" },
    "userQuestion": "Why did US revenue drop after v2.4?"
  }'
```

Then list / fetch reports:

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
GET /v1/cofounder/why/reports?appId=6479581124
GET /v1/cofounder/why/reports/:id
```

Full request/response shapes: [Why API reference](../api/why).

## Why it's better than asking chat

Chat answers from the latest briefing plus a handful of tool calls. The Why-agent runs a dedicated pipeline with a bigger evidence budget, structured output, and hypothesis tracking — use it when the answer matters enough to want receipts.
