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

# DevTools

> Capture local Agent SDK runs for development and debugging.

Use Agent SDK DevTools capture during development when you need a local record of run inputs, steps, tools, outputs, timing, and gateway correlation IDs.

## Enable capture for one run

```typescript theme={null}
import { createAgentDevtools } from "@phaseo/agent-sdk";

const result = await agent.run({
  input,
  client,
  devtools: createAgentDevtools(),
});
```

By default, files are written under `.phaseo-devtools` in the current working directory.

## Configure the output directory

```typescript theme={null}
const devtools = createAgentDevtools({
  directory: ".local/agent-runs",
});

await agent.run({ input, client, devtools });
```

You can also set `PHASEO_DEVTOOLS=true` and optionally `PHASEO_DEVTOOLS_DIR` for local development processes.

## Captured information

Each `agent.run` or `agent.continue` entry includes:

* agent and run IDs
* run status and duration
* input and application context
* model and provider details when available
* gateway request and native response IDs
* step and tool counts
* completed run state, messages, steps, and output
* structured failure details when a run throws

<Warning>
  Agent inputs, messages, tool results, and application context may contain sensitive data. Keep the DevTools directory out of source control and apply the same access controls as other development logs.
</Warning>

## Related guides

* [Lifecycle hooks](./agent-sdk-lifecycle-hooks)
* [Errors and troubleshooting](./agent-sdk-events-and-errors)
* [State and approval](./agent-sdk-state-and-approval)
