Skip to content
Eskais UI

Agent tasks

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

Installation

npx shadcn@latest add @eskais/agent-badge
npm packageslucide-react

Usage

Import
import { AgentBadge, agentBadgeLabels, agentBadgeLabelsEs, agentSummary } from "@/components/ui/agent-badge"import {  AgentAvatar,  UnassignedAvatar,  agentAvatarTint,  agentInitials,  colorIndex,  providerName,} from "@/components/ui/agent-avatar"

API reference

AgentBadge

PropTypeDefault
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–
labelsPartial<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.booleantrue

Also takes <span> attributes and render except children.

AgentAvatar

PropTypeDefault
agentrequiredAgentRef–
avatarsAgentAvatars–
labelNames the avatar when it stands alone; without it, it is decorative beside visible text.string–

Also takes Avatar except children.

UnassignedAvatar

PropTypeDefault
classNamestring–

Other exports

agentBadgeLabelsagentBadgeLabelsEsagentSummaryagentAvatarTintagentInitialscolorIndexproviderNametype AgentBadgeLabelstype AgentBadgePropstype AgentAvatarPropstype AgentAvatars

Accessibility

  • 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.