Shadcn Agent Graph
A hierarchical multi-agent orchestration tree for visualizing AI agent workflows: shows a lead orchestrator branching into worker agents and compact sub-agents, complete with status pills, token usage bars, tool integrations, and handoff trails.
On desktop viewports, worker agents fan out horizontally with rounded orthogonal connectors; on narrow/mobile screens, the entire tree collapses into an indented vertical hierarchy.
Shaded Tree (Default)
Tree variant featuring layered bevel card borders with shaded background and tinted tool/handoff footers.
variant"tree"- renders the hierarchical multi-agent tree layout (default).
shade{true}- renders the double-layered shaded backdrop and tiered footer strip (default).
tokensUsed- automatically highlights the progress bar and counter in amber once usage reaches 80% of
tokensMax.
Installation
New project? Follow the installation guide to set up Tailwind CSS, shadcn, the cn helper and lucide-react, register the @avara-ui registry once, then copy your styles from the Themes page.
Install Agent Graph
components/ is written into your project. Copy any snippet from a Usage tab above and it runs.
Install dependencies
Nothing beyond the shared setup — Agent Graph needs only the cn helper and lucide-react, which the installation guide already put in place.
Examples
Flat Tree (No Shade)
Pass shade={false} to the tree variant to remove the outer shaded backdrop and render clean single-surface cards.
variant"tree"- renders the hierarchical multi-agent tree layout.
shade{false}- removes the outer shaded bezel for a clean minimalist card surface.
Editorial (2-Column)
Two-column editorial workflow variant (variant="editorial") with shaded cards by default; pass shade={false} for a flat look.
variant"editorial"- renders the 2-column editorial launch workflow (Researcher & Writer with Fact checker / SEO sub-agents).
shade{true}- supports both
true(default) andfalsejust like the tree variant.
Features
Discover the key capabilities that make this component an excellent choice for modern AI orchestration interfaces.
Dual Visual Styles (Shaded & Flat)
Control card depth with the shade prop — true for tiered layered bezels, or false for flat minimalist cards.
Responsive Tree Layout
Fans out horizontally into equal columns on desktop and collapses into an indented vertical tree on mobile.
Live Status & Token Budgets
Displays animated working spinners, completion checks, and automatic high-usage token warnings.
Tool & Handoff Footer
Highlights connected integrations and the latest agent-to-agent handoff summary directly below each worker card.
Props Reference
| Prop | Type | Default | Description |
|---|---|---|---|
data | AgentGraphNode | Required | Root orchestrator node containing nested children for workers and sub-agents. |
variant | "tree" | "editorial" | "tree" | Layout variant for the agent graph (3-column engineering tree or 2-column editorial workflow). |
animateIn | boolean | true | Fades the graph in on mount. |
shade | boolean | true | Renders the outer shaded backdrop and tiered footer. Set false for a flat single-surface card. |
liveAnimation | boolean | true | Enables the live sequential orchestration handoff animation loop across the tree. |
AgentGraphNode Object
| Property | Type | Default | Description |
|---|---|---|---|
id | string | Required | Unique identifier for the node. |
name | string | Required | Display name of the agent or sub-agent. |
model | string | undefined | Optional model subtitle (e.g. "Claude Opus"). |
status | "working" | "done" | "idle" | "needs-you" | Required | Controls the status badge and message styling. |
message | string | Required | Current task or status line shown inside the card. |
tokensUsed | number | Required | Tokens consumed so far. |
tokensMax | number | Required | Maximum token budget for the agent. |
color | "blue" | "purple" | "cyan" | "emerald" | "amber" | Required | Accent colour for the pixel icon, progress bar, and connector lines. |
tools | ("linear" | "github" | "notion" | "vercel")[] | undefined | Tool integration badges rendered in the card footer. |
handoff | { agent: string; summary: string } | undefined | Optional handoff target and truncated summary in the footer. |
children | AgentGraphNode[] | undefined | Nested worker or sub-agent nodes. |
For AI agents3 variants. Ask the user which one.
Ask before you pick. This page has 3 variants. If the user has not named one and has not asked you to choose for them, ask which they want before you install anything or write code, and show every option with its live link. If they ask you to choose, pick from each variant's best-for and avoid-if lines against their brief, and say why. If the user named a variant, use it and do not ask.
All 3 options as live previews: https://avaraui.com/view/agent-graph
When to use it. A hierarchical multi-agent orchestration tree for visualizing AI agent workflows with live handoff beams, arrival glows, token meters, and interactive agent modals.
Gotchas
- Both variants are looks of the one `agent-graph` item: install it once and set `variant` (`tree` or `editorial`) and `shade` (`true` or `false`).
- On desktop viewports, worker agents fan out horizontally; on narrow screens, the tree collapses into an indented vertical hierarchy.
The 3 variants
Three-column engineering crew tree with layered shaded card bezels.
- Best for: multi-agent engineering workflows with Lead, Researcher, Coder, and Reviewer branches
- Avoid if: you need a narrower two-column editorial layout
- Traits: 3-column tree, shaded cards, live handoff animation
- Install:
npx shadcn@latest add @avara-ui/agent-graph - Docs section
Flat Tree (No Shade) tree-flat
Three-column tree with `shade={false}` for clean single-surface cards.
- Best for: minimalist dashboards where outer card bezels are not needed
- Avoid if: you want tiered shaded footer strips
- Traits: 3-column tree, flat surface
- Install:
npx shadcn@latest add @avara-ui/agent-graph - Docs section
Editorial (2-Column) editorial
Two-column editorial workflow tree (Editor -> Researcher & Writer with Fact checker and SEO).
- Best for: content, launch post, or two-branch agent pipelines
- Avoid if: you need three top-level worker columns
- Traits: 2-column tree, supports shade true/false
- Install:
npx shadcn@latest add @avara-ui/agent-graph - Docs section