nextui.dev
Home
Docs
Saved
Pricing
Components37
  • Forms & inputs7
  • Cards13
  • Buttons, badges & avatars8
  • Feedback & display6
  • Effects3
Agents23
  • Chat inputNew
  • Task checklistNew
  • ReasoningNew
  • Tool callNew
  • Model pickerNew
  • Tool approvalNew
  • AttachmentsNew
  • SourcesNew
  • Agent timelineNew
  • Context meterNew
  • Artifact panelNew
  • Message actionsNew
  • Streaming messageNew
  • Sub-agentsNew
  • Conversation shellNew
  • Agent questionNew
  • Voice agentNew
  • Voice orbNew
  • Thinking ring
  • Thinking waveNew
  • Thinking sparkle
  • Thinking bot
  • Prompt deckNew
Blocks20
  • Agent chatNew
  • Pill heroNew
  • Grid hero
  • Moodboard generatorNew
  • Waitlist heroNew
  • Intro bannerNew
  • Creative home heroNew
  • Chat heroNew
  • App shelfNew
  • Usage card
  • Design resultsNew
  • Pricing tiers
  • Dashboard home
  • The shiftNew
  • Launch perksNew
  • Testimonials
  • Quote
  • Team
  • Leads tableNew
  • Sign in
Pages13
  • ASCII workspace$49
  • Research agent$49
  • Support agent$49
  • Coding agent$49
  • CRM overviewNew
  • Marketing dashboardNew
  • Developer portfolio$49
  • Particle landing$49
  • Particle story$49
  • Statement converter$49
  • AI photo studio$49
  • Group card launch$49
  • Month-end storyNew
Themes9
  • Default
  • Ember
  • Ocean
  • Forest
  • Grape
  • Rose
  • Amber
  • Clay
  • Brutal
Upgrade
nextui.dev

nextui components, blocks and themes you install with one command.

Product

  • Components
  • Blocks
  • Themes
  • Pricing

Resources

  • Docs
  • Roadmap
  • GitHub

Legal

  • License
  • Privacy
  • Terms
  • Refunds

nextUI

[ 200 OK ] · nextUI

© 2026 NEXTUI • All rights reserved.

Upgrade
ComponentsAI & agentsSub-agents
Copy promptCopy prompt

Customize

The parent task in the header

Loop a scripted parallel run, for demos

JSX · copied with Copy prompt

<SubAgents autoPlay />

Sub-agentsNew

Parallel sub-agents under one task: a lane per agent with its live step, status, run time and tool calls, opening into its result.

Installation

Set your access key from API keys as NEXTUI_TOKEN in .env.local and add the @nextui namespace below to components.json once. Then every item installs by name. Each install counts as a copy on a free account.

$pnpm dlx shadcn@latest add @nextui/sub-agents
1{
2 "registries": {
3 "@nextui": {
4 "url": "https://nextui.dev/r/{name}.json",
5 "headers": { "Authorization": "Bearer ${NEXTUI_TOKEN}" }
6 }
7 }
8}

Usage

1"use client";
2
3import { SubAgents, type SubAgent } from "@/components/nextui/sub-agents";
4
5// Render the parts your orchestrator streams. One way with AI SDK 7: a "delegate"
6// tool per sub-agent run, whose output is a stream of preliminary results
7// ({ status, step, toolCalls }) and a final one with the answer.
8export function Delegation({ parts }: { parts: { toolCallId: string; state: string; input: { name: string; task: string }; output?: { step?: string; toolCalls?: number; result?: string; durationMs?: number } }[] }) {
9 const agents: SubAgent[] = parts.map((p) => ({
10 id: p.toolCallId,
11 name: p.input.name,
12 task: p.input.task,
13 status: p.state === "output-error" ? "error" : p.state === "output-available" && p.output?.result ? "done" : p.output ? "running" : "queued",
14 step: p.output?.step,
15 toolCalls: p.output?.toolCalls,
16 duration: p.output?.durationMs,
17 result: p.output?.result,
18 }));
19
20 return <SubAgents title="Research Q3 competitors" agents={agents} />;
21}

API reference

Edit props live in the preview above, or see all 6 props
PropTypeDefaultDescription
agentsSubAgent[]–One lane per agent: id, name, task, status (queued, running, done, error), step, result, error, duration (ms), toolCalls
titlestring"Research Q3 competitors"The parent task in the header
summaryReactNode–Line shown under the lanes once every agent has finished
onStop(id: string) => void–Adds a stop button to running lanes
autoPlaybooleanfalseLoop a scripted parallel run, for demos
classNamestring–Extra classes on the wrapper

Related

All components

Chat inputNew

Task checklistNew

Free

ReasoningNew

Sign in to see the code

Preview it freely. A free account copies code and prompts a few times a day.

Sign in