{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "ai-agent",
  "title": "AI: Agent",
  "description": "Composable agent identity, instructions, tool and output descriptions for an agent overview.",
  "dependencies": [
    "@untitledui/icons@^0.0.23"
  ],
  "registryDependencies": [
    "@nx-ui/utils",
    "@nx-ui/accordion",
    "@nx-ui/badge",
    "@nx-ui/ai-code-block"
  ],
  "files": [
    {
      "path": "components/ai/agent.tsx",
      "content": "// Ported from vercel/ai-elements@6a9d5b1822ffb10bba4bd97175f01edd7d8651cd.\n\"use client\";\n\nimport {\n  Accordion,\n  AccordionContent,\n  AccordionItem,\n  AccordionTrigger,\n} from \"@/components/ui/accordion\";\nimport { Badge } from \"@/components/ui/badge\";\nimport { cn } from \"@/lib/utils\";\ntype Tool = { description?: string; inputSchema?: unknown; jsonSchema?: unknown };\nimport { CpuChip01 as BotIcon } from \"@untitledui/icons\";\nimport type { ComponentProps } from \"react\";\nimport { memo } from \"react\";\n\nimport { CodeBlock } from \"./code-block\";\n\nexport type AgentProps = ComponentProps<\"div\">;\n\nexport const Agent = memo(({ className, ...props }: AgentProps) => (\n  <div\n    className={cn(\"not-prose w-full rounded-md border\", className)}\n    {...props}\n  />\n));\n\nexport type AgentHeaderProps = ComponentProps<\"div\"> & {\n  name: string;\n  model?: string;\n};\n\nexport const AgentHeader = memo(\n  ({ className, name, model, ...props }: AgentHeaderProps) => (\n    <div\n      className={cn(\n        \"flex w-full items-center justify-between gap-4 p-3\",\n        className\n      )}\n      {...props}\n    >\n      <div className=\"flex items-center gap-2\">\n        <BotIcon className=\"size-4 text-muted-foreground\" />\n        <span className=\"font-medium text-sm\">{name}</span>\n        {model && (\n          <Badge className=\"font-mono text-xs\" variant=\"secondary\">\n            {model}\n          </Badge>\n        )}\n      </div>\n    </div>\n  )\n);\n\nexport type AgentContentProps = ComponentProps<\"div\">;\n\nexport const AgentContent = memo(\n  ({ className, ...props }: AgentContentProps) => (\n    <div className={cn(\"space-y-4 p-4 pt-0\", className)} {...props} />\n  )\n);\n\nexport type AgentInstructionsProps = ComponentProps<\"div\"> & {\n  children: string;\n};\n\nexport const AgentInstructions = memo(\n  ({ className, children, ...props }: AgentInstructionsProps) => (\n    <div className={cn(\"space-y-2\", className)} {...props}>\n      <span className=\"font-medium text-muted-foreground text-sm\">\n        Instructions\n      </span>\n      <div className=\"rounded-md bg-muted/50 p-3 text-muted-foreground text-sm\">\n        <p>{children}</p>\n      </div>\n    </div>\n  )\n);\n\nexport type AgentToolsProps = ComponentProps<typeof Accordion>;\n\nexport const AgentTools = memo(({ className, ...props }: AgentToolsProps) => (\n  <div className={cn(\"space-y-2\", className)}>\n    <span className=\"font-medium text-muted-foreground text-sm\">Tools</span>\n    <Accordion className=\"rounded-md border\" {...props} />\n  </div>\n));\n\nexport type AgentToolProps = ComponentProps<typeof AccordionItem> & {\n  tool: Tool;\n};\n\nexport const AgentTool = memo(\n  ({ className, tool, value, ...props }: AgentToolProps) => {\n    const schema =\n      \"jsonSchema\" in tool && tool.jsonSchema\n        ? tool.jsonSchema\n        : tool.inputSchema;\n\n    return (\n      <AccordionItem\n        className={cn(\"border-b last:border-b-0\", className)}\n        value={value}\n        {...props}\n      >\n        <AccordionTrigger className=\"px-3 py-2 text-sm hover:no-underline\">\n          {tool.description ?? \"No description\"}\n        </AccordionTrigger>\n        <AccordionContent className=\"px-3 pb-3\">\n          <div className=\"rounded-md bg-muted/50\">\n            <CodeBlock code={JSON.stringify(schema, null, 2)} language=\"json\" />\n          </div>\n        </AccordionContent>\n      </AccordionItem>\n    );\n  }\n);\n\nexport type AgentOutputProps = ComponentProps<\"div\"> & {\n  schema: string;\n};\n\nexport const AgentOutput = memo(\n  ({ className, schema, ...props }: AgentOutputProps) => (\n    <div className={cn(\"space-y-2\", className)} {...props}>\n      <span className=\"font-medium text-muted-foreground text-sm\">\n        Output Schema\n      </span>\n      <div className=\"rounded-md bg-muted/50\">\n        <CodeBlock code={schema} language=\"typescript\" />\n      </div>\n    </div>\n  )\n);\n\nAgent.displayName = \"Agent\";\nAgentHeader.displayName = \"AgentHeader\";\nAgentContent.displayName = \"AgentContent\";\nAgentInstructions.displayName = \"AgentInstructions\";\nAgentTools.displayName = \"AgentTools\";\nAgentTool.displayName = \"AgentTool\";\nAgentOutput.displayName = \"AgentOutput\";\n",
      "type": "registry:ui",
      "target": "components/ai/agent.tsx"
    }
  ],
  "type": "registry:ui"
}