Agent Badge
Provider, model and effort of an AgentRef: compact for cards (one line, long model ids cut in the middle, full text in title) or detail for panels, with a marker when the agent that ran isn't the one requested.
Example
- T-014-A1glm-5.3high
- T-014-A2Not the requested agent.gpt-6.1-terra-preview-2026-11highrequested zai/glm-5.3
- T-015-A1Opus 5.5medium
agent-badge-demo.tsxCopy code
Installation
Copy code
npm packages
lucide-reactUsage
ImportCopy code
API reference
AgentBadge
| Prop | Type | Default |
|---|---|---|
agentrequiredThe agent that ran, or the configured one when nothing ran yet. | AgentRef | – |
requestedWhat was configured; a marker shows when it differs from `agent`. | AgentRef | – |
variant | "compact" | "detail" | "compact" |
showEffortNameShow the effort as "name: value". Defaults to true in the detail variant. | boolean | – |
labels | Partial<AgentBadgeLabels> | – |
avatarsImages, icons or names per provider; initials on a provider color otherwise. | AgentAvatars | – |
showAvatarShows the provider's avatar before the model. Defaults to true. | boolean | true |
Also takes <span> attributes and render except children.
AgentAvatar
| Prop | Type | Default |
|---|---|---|
agentrequired | AgentRef | – |
avatars | AgentAvatars | – |
labelNames the avatar when it stands alone; without it, it is decorative beside visible text. | string | – |
Also takes Avatar except children.
UnassignedAvatar
| Prop | Type | Default |
|---|---|---|
className | string | – |
Other exports
agentBadgeLabelsagentBadgeLabelsEsagentSummaryagentAvatarTintagentInitialscolorIndexproviderNametype AgentBadgeLabelstype AgentBadgePropstype AgentAvatarPropstype AgentAvatarsAccessibility
- Provider, model and effort as text; a fallback route says what was requested and what ran.
Agent actions
Runs agent.snapshot() from @ui-sdk/react/agent on the live preview above.