# Agent chat — Detent

> A real AI SDK conversation: the answer thinks, reads and streams, the run draws itself beside it, and anything that needs a person waits for a yes where you were typing.

Canonical: https://detentui.com/blocks/agent-chat
Last updated: 2026-11-10

## About

A real AI SDK conversation: the answer thinks, reads and streams, the run draws itself beside it, and anything that needs a person waits for a yes where you were typing.

## Details

- It runs on the AI SDK’s own useChat. Point it at any route that returns toUIMessageStreamResponse() and every part lands where it belongs.
- Reasoning becomes the live thought, tool calls become the steps under it, sources become the citations, and the reply streams without re-wrapping.
- The run beside the thread is a live waterfall of every model call and tool, with real durations the hook measures as parts arrive.
- Tools that need approval stop the run on a dashed line. The prompt box steps aside for the approval card, and money takes a second press that names the amount.
- A no is an answer too: the denial goes back to the model, and it says what it did instead.
- The tools list shows what each one is doing right now, and how long its last call took.
- Below 1024px the run folds into a sheet; on a phone the thread, the composer and the card all fit the width.

## Keyboard shortcuts

| Keys | Action |
| --- | --- |
| Tab | Take the suggestion |
| Enter | Send, or approve |
| Esc | Deny |

## Install (Pro required)

```bash
npx shadcn add @detent-pro/agent-chat
```

## Related
- [All blocks](https://detentui.com/blocks)
- [Pro](https://detentui.com/pro)
