> ## Documentation Index
> Fetch the complete documentation index at: https://botpress-charmenta-pr-719.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Debug with logs and traces

> Inspect traces, spans, and logs to understand what your agent is doing.

The ADK provides two observability views in the dev console and a CLI command for reading logs.

## Traces

The **Traces** view in the dev console shows a timeline of every span in your agent's execution. Each conversation turn, workflow step, tool call, and LLM request is captured as a span with timing and metadata.

<Frame>
  <img alt="Traces view in dev console" className="block dark:hidden" src="https://mintcdn.com/botpress-charmenta-pr-719/1Xsl03aPxpti4bSd/adk/assets/traces-view.png?fit=max&auto=format&n=1Xsl03aPxpti4bSd&q=85&s=0b474e0e1430549dc4509dff71ddcefa" width="3830" height="2052" data-path="adk/assets/traces-view.png" />

  <img alt="Traces view in dev console" className="hidden dark:block" src="https://mintcdn.com/botpress-charmenta-pr-719/1Xsl03aPxpti4bSd/adk/assets/traces-view-dark.png?fit=max&auto=format&n=1Xsl03aPxpti4bSd&q=85&s=142e532a3a07f3c7f32a0b9d98b9f1b5" width="3836" height="2050" data-path="adk/assets/traces-view-dark.png" />
</Frame>

### What you can see

* **Handler spans** showing conversation and workflow handler execution
* **Autonomous execution** spans for each `execute()` call, including iteration count and model used
* **Tool call spans** with input, output, and duration
* **LLM call spans** with model, token usage, and latency
* **Knowledge search spans** with queries and result counts
* **Error spans** with stack traces

### Filtering

Filter traces by time range, span type, or search for specific content. Click any span to expand its details and see its child spans.

## Logs

The **Logs** view in the dev console shows structured log output from your agent. Any `console.log`, `console.warn`, or `console.error` from your handlers, tools, and actions appears here.

<Frame>
  <img alt="Logs view in dev console" className="block dark:hidden" src="https://mintcdn.com/botpress-charmenta-pr-719/1Xsl03aPxpti4bSd/adk/assets/logs-view.png?fit=max&auto=format&n=1Xsl03aPxpti4bSd&q=85&s=562d10880d20a282d49acc7abf047176" width="3836" height="2044" data-path="adk/assets/logs-view.png" />

  <img alt="Logs view in dev console" className="hidden dark:block" src="https://mintcdn.com/botpress-charmenta-pr-719/1Xsl03aPxpti4bSd/adk/assets/logs-view-dark.png?fit=max&auto=format&n=1Xsl03aPxpti4bSd&q=85&s=5ce81f4ef158929b3178f8589c9d9905" width="3830" height="2044" data-path="adk/assets/logs-view-dark.png" />
</Frame>

### CLI

You can also read logs from the command line:

```bash theme={null}
adk logs                         # Show recent logs
adk logs --follow                # Stream logs in real time
adk logs error                   # Errors only
adk logs warning since=1h        # Warnings and errors from the last hour
adk logs limit=100               # Last 100 entries
```

The positional filter tokens are `error` / `warning` / `info` (cumulative level), `since=<duration>`, and `limit=<n>`. See the [CLI reference](/adk/cli-reference#adk-logs) for all flags.

Logs are stored in `.adk/logs/` while the dev server is running.
