aiellie

Search

Find a component, template or page

GitHub
Components

Agent Card

What an agent is: its mark, name and model, the instructions it follows, the tools it can call and the shape of what it returns.

Researcher

Claude Sonnet 5

Instructions

Find three recent sources on the question and summarise what they agree on.

Tools

  • web_search
  • fetch_page
  • run_code

Returns

{
  "summary": "string",
  "sources": "url[]"
}
Open full screen
fig. 01 · open it full screen from the corner

Installation

npx shadcn@latest add "@aiellie/agent-card"

shadcn needs the @aiellie registry in components.json first. npx aiellie add agent-card adds it on its first run, then installs the same way.

Agent Card says what an agent is: its mark, its name and the model it runs on, then the instructions it follows, the tools it can call and the shape of what it returns. Use it where agents are picked, set up, or handed work, like a list of subagents.

Getting started

  1. Describe the agent

    Each part is optional, so a card can be just the header, or the header and its tools.

    components/researcher.tsx
    import { Globe02Icon, RoboticIcon } from "@hugeicons/core-free-icons"
    import { HugeiconsIcon } from "@hugeicons/react"
    
    import {
      AgentCard,
      AgentCardContent,
      AgentCardHeader,
      AgentCardInstructions,
      AgentCardMark,
      AgentCardSection,
      AgentCardTitle,
      AgentCardTool,
      AgentCardTools,
    } from "@/components/aiellie/agent-card"
    
    export function Researcher() {
      return (
        <AgentCard>
          <AgentCardHeader>
            <AgentCardMark>
              <HugeiconsIcon icon={RoboticIcon} />
            </AgentCardMark>
            <AgentCardTitle model="Claude Sonnet 5">Researcher</AgentCardTitle>
          </AgentCardHeader>
          <AgentCardContent>
            <AgentCardSection title="Instructions">
              <AgentCardInstructions>Find three recent sources.</AgentCardInstructions>
            </AgentCardSection>
            <AgentCardSection title="Tools">
              <AgentCardTools>
                <AgentCardTool icon={Globe02Icon}>web_search</AgentCardTool>
              </AgentCardTools>
            </AgentCardSection>
          </AgentCardContent>
        </AgentCard>
      )
    }

Anatomy

<article data-slot="agent-card">
  <header data-slot="agent-card-header">
    <span data-slot="agent-card-mark" />
    <div data-slot="agent-card-title" />
    <div data-slot="agent-card-actions" />
  </header>
  <div data-slot="agent-card-content">
    <section data-slot="agent-card-section">
      <p data-slot="agent-card-instructions" />
      <ul data-slot="agent-card-tools">
        <li data-slot="agent-card-tool" />
      </ul>
      <pre data-slot="agent-card-code" />
    </section>
  </div>
</article>

The card is flat, with a hairline, like any container. Tools are set in mono, since they're the names the model calls. AgentCardCode shows a string as it is and anything else as JSON, for an output schema or a config.

Examples

Header only, with an action

For a compact row in a list, leave out the content and drop the header's rule. AgentCardActions sits at the header's end.

Triage

GPT-6 Sol

API reference

AgentCardTitle

PropTypeDefaultDescription
childrenReactNodeThe agent's name.
modelReactNodeThe model it runs on, under its name.

AgentCardSection

PropTypeDefaultDescription
titleReactNoderequiredLike "Instructions" or "Tools".

AgentCardTool

PropTypeDefaultDescription
iconIconSvgElementA mark before the tool's name.

AgentCardCode

PropTypeDefaultDescription
valueunknownrequiredA string shows as it is; anything else as JSON.

AgentCard, AgentCardHeader, AgentCardMark, AgentCardActions, AgentCardContent, AgentCardInstructions and AgentCardTools forward their element's props.