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

> ## Agent Instructions
> Agents: start with https://docs.pre.dev/agents.md, which has complete recipes, plan access, polling rules, errors and limits.
> Authenticate with the workspace API key (pdk_…) from Integrations → Built-in, sent as Authorization: Bearer <key>.
> REST API: https://api.pre.dev (OpenAPI: https://docs.pre.dev/api-reference/openapi.json). AI Gateway: https://api.pre.dev/v1, OpenAI-compatible (OpenAPI: https://docs.pre.dev/api-reference/ai-gateway.openapi.json).
> pre.dev MCP server: npx -y @predotdev/mcp setup adds it to every local coding agent with every pre.dev tool plus the user's own Chrome; the hosted server is https://api.pre.dev/mcp. Search these docs over MCP at https://docs.pre.dev/mcp.

# How the agent works

> How the agent decides whether to answer, plan, or build, and how sprints and effort shape the work.

There is no mode to pick before you send a request. The agent reads each message and decides whether to answer, ask for context, implement directly, or plan first. Two controls shape the work itself: **sprints** define a unit of work, and **effort** sets how deeply a sprint approaches it. [Model selection](https://predev.mintlify.site/coding-agent/building/pro-mode.md) chooses the models used for that work.

## How the agent decides

| Your message | What the agent does |
| - | - |
| A question | Answers without changing code |
| A focused change | Implements it directly in the current session |
| A larger product or feature | Can plan requirements, user flows, roadmap, and architecture before it builds |

To plan first, say so in your message, for example "plan the architecture before you build". Review the plan in **Plan**, then ask for implementation. Planning never starts a build on its own.

To keep working on the plan, turn on plan mode with `/plan`, in the CLI or the web workspace. Each message then changes the plan (flows, spec, roadmap, architecture) and no code runs; on the web, a **Plan updated** card lists what changed, and **Build it** starts building. Plan mode stays on until `/auto`, or until you turn off the plan chip in the web composer. It works on every plan, and each re-plan uses credits like any other message.

## Choose a unit of work

For a small change, describe it in chat. Use a dedicated sprint for a defined feature:

```text theme={null}
/sprint add CSV export to the reports page with a progress indicator
```

A sprint runs in a new session. In projects with a roadmap, the sprint controls can build the next planned task or continue through the roadmap on **Autopilot**.

Follow the session that owns the run. Parallel work, queuing, and admission limits depend on the client and account; sending another message does not guarantee that it starts immediately.

## Sprint effort

Set effort with `/effort` before launching the sprint.

| Setting | Approach |
| - | - |
| `auto` | Choose an approach for each sprint (recommended) |
| `low` | A fast direct loop for focused changes |
| `medium` | A direct loop organized around a task list |
| `high` | A full research, coding, and verification pipeline |

Higher effort can involve more model work and credits. Effort controls the workflow; it does not promise a particular duration or result.

## Review the outcome

Builds that change code end with an independent [verification](https://predev.mintlify.site/coding-agent/building/acceptance-criteria.md) of your acceptance criteria. State the checks you need in the request, for example type checking, a specific test suite, or a browser journey, and read the diff before shipping.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.