Agent card

One agent shown where people find and run it: a card in their agents grid, a row in a list, a listing in a shared directory, and the header at the top of its chat.

Loading preview…

Install

  1. 1

    Run this command in your Tailwind CSS project. It adds components/ai/agent-card-card.tsx and installs its dependencies.

    $ npx shadcn@latest add https://gradientdeck.com/ai-components/r/agent-card-card.json

Usage & API

Example

agent-card-card.tsx
import { AppMark } from "@/components/ai/agent-card-card"

<AppMark
  app={app}
/>

Props AppMark

PropType & descriptionRequired
appAppIdRequired
sizenumberOptional

Dependencies

  • React
  • Tailwind CSS
  • motion
  • lucide-react
Implementation notes

Card renders one article. Compact is the default. Large raises the icon, prints the schedule under the name, the purpose as its own paragraph, tool chips with names, and a history of up to 14 runs as thin bars, with a count of failures. Both sizes share the menu: Edit turns the name into a field that commits on Enter or blur and cancels on Escape, Duplicate and Archive call the matching callbacks, and Archive is styled as the danger item. The status line is polite live text. Run is disabled while running is true, the label switches to Running, and a bar travels along the bottom edge. Hover lifts the card slightly.

Choosing a layout

Use the card on a home grid of agents one person owns. The large size fits a featured agent: schedule line, full purpose, labelled tool chips, and a strip of recent runs. Compact cards are the rest of the grid, with the purpose clamped and tools as marks only. Use the row when an admin needs to scan many agents, see who owns each one, and turn a batch off. The preview page around the rows adds All, On and Off counts, a search field, and a bulk bar with Run now, Turn off or Turn on, and Archive once any row is selected.

Use the directory when people browse agents shared by a team or published more widely, and they should read the permissions before adding one. Use the chat header once they are inside a thread with that agent, not on the index. The header is the wrong place for temperature or tool allow-lists. Those belong on model settings and the tool picker. The card is also the wrong place for a workflow. It can show a schedule string, but it does not edit one.

Does Run or Add actually start or install the agent?

No. Run calls onRun, and the card shows Running now only while you pass running. Add calls onToggleAdd and flips its label from the added boolean you pass. Rename, duplicate, archive, enable, reconnect, save and clear work the same way. The components draw the control and leave the effect to you.

Which variant should list a whole team of agents?

Use the list row, not the card. The row already has selection, an owner, a trigger, a seven-day sparkline and an enable switch, and the surrounding page filters All, On and Off and acts on the selection. The card is a tile for a personal grid. The directory is for browsing a catalog before an agent is added.