# Agent wake

A scheduled agent waking up: its eyes open, the light comes up and a clock starts.

Also called: scheduled agent animation.

> chatcn Pro: needs a Pro license (https://chatcn.dev/pro). Install from the `@chatcn-pro` registry with your license token; setup at https://chatcn.dev/docs/chatcn-pro.

Example: An agent that wakes up. When its time comes the clock hands spin to the hour, a band of morning light crosses the card, its eyes open and blink, and it says what it is doing. Preview: https://chatcn.dev/preview/agent-wake-demo

Asleep, its card rests in muted colour with closed eyes and the time it will next run. When its time comes the clock hands spin round to the hour, a band of morning light crosses the card, the eyes open and blink once, and the hour turns into a clock of how long it has been at it, beside what it is doing.

## Installation

```bash
npx shadcn@latest add @chatcn-pro/agent-wake
```

## Usage

```tsx
import { AgentWake } from "@/components/ui/chatcn/pro/agent-wake"

<AgentWake name="Morning digest" schedule="Weekdays at 7:00" wakeAt="7:00" awake={running} activity={step} />
```

## Props

| Prop | Type | Notes |
| --- | --- | --- |
| `name` / `schedule` | `string` |  |
| `awake` | `boolean` | Turning it on wakes it |
| `activity` | `string` | What it is doing, once awake |
| `nextRun` / `wakeAt` | `string` | Shown while asleep |

## Accessibility

- Running or asleep, and what it is doing, are announced in words.

## Motion

- Hands spin 700 ms, the light crosses 1.1 s, the eyes open then blink once. Reduced motion: colours change.

Source: https://chatcn.dev/docs/components/agent-wake