# AI analyst

A shadcn/ui AI analyst block: a product window where an agent streams its reasoning, runs SQL queries and fills an answer card with a chart, on a loop.

> For the complete documentation index, see [llms.txt](/llms.txt). Markdown variants are available for the docs, pricing and about pages: append `.md` to the URL or send an `Accept: text/markdown` header (the home page answers the header too). An agent skill is available at [/.well-known/agent-skills/site-skill.md](/.well-known/agent-skills/site-skill.md).

## At a glance

- **Good for:** Landing pages for AI analytics products; Feature sections that demo an AI agent; BI and SQL tools for business teams; Showing an agent's reasoning and queries
- **Category:** AI, Dashboard & analytics · **Type:** Charts, Cards · **Style:** Motion, Minimal, Dark mode
- **See it:** [Live preview](https://www.craftui.space/docs/blocks/ai-analyst) · [Screenshot](https://www.craftui.space/llms.md/preview/ai-analyst.1710c111.jpg)

![AI analyst](https://www.craftui.space/llms.md/preview/ai-analyst.1710c111.jpg)

## Install

```bash
pnpm dlx shadcn@latest add https://www.craftui.space/r/ai-analyst.json
```

This is a paid item (BLK-ANPQN7): the install needs a craftUI plan or a purchase of it. Signed in, the docs page gives your personal install command. Plans: https://www.craftui.space/pricing

## Usage

```tsx
import AiAnalyst from "@/components/blocks/ai-analyst/ai-analyst";

export default function Page() {
  return <AiAnalyst />;
}
```

With no props it renders with demo content; pass your own through the props below.

## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `brand` | `string` | `"Sightline"` | Product name in the sidebar and the window's label, e.g. "Sightline". |
| `user` | `AiAnalystUser` | `built-in demo value` | The signed-in person at the foot of the sidebar. |
| `loop` | `boolean` | `true` | Play again after 14.5s; with `false` it plays once and stays finished. |
| `fade` | `boolean` | `true` | Fade the window's bottom out (an eased mask). |
| `className` | `string` | — | Classes for the outer wrapper; set the height here, e.g. "h-[40rem]". |

### `AiAnalystUser`

| Field | Type | Description |
| --- | --- | --- |
| `name` (required) | `string` | Full name; the avatar shows its initials, e.g. "Maya Chen". |
| `email` (required) | `string` | Shown under the name, e.g. "maya@northwind.co". |

## Files

The install adds:

- `components/blocks/ai-analyst/ai-analyst.tsx`
- `components/blocks/ai-analyst/revenue-chart.tsx`
- `components/blocks/ai-analyst/DESIGN.md`

npm dependencies (installed for you): `@hugeicons/core-free-icons`, `@hugeicons/react`, `motion`.