# AgentPlan

> A self-updating plan with progress and failures.

## Install

```bash
npx shadcn@latest add https://crate.onerollstudios.com/r/agent-plan.json
```

## Import

```tsx
import { AgentPlan } from "@/components/agent-wait-states/agent-plan";
```

## Props

| Prop | Type | Required | Default | Notes |
| --- | --- | --- | --- | --- |
| `className` | `string` | no |  |  |
| `accent` | `boolean` | no | `false` |  |
| `labels` | `Partial<CrateLabels>` | no |  | Replace any of this component's labels. Overrides CrateProvider. |
| `steps` | `PlanStep[]` | yes |  |  |

## Labels

Override with the `labels` prop or a `CrateProvider`.

| Label | English default |
| --- | --- |
| `plan` | `"Plan"` |
| `planProgress` | `` (current, total, f) => `${f.number(current)} of ${f.number(total)}` `` |

## Types

```ts
export type PlanStep = { id?: string; label: string; state: "pending" | "active" | "complete" | "failed" };
```

## Example

```tsx
<AgentPlan steps={planSteps} accent />
```
