caliper uidocs

Agent builder

Pro

A form for configuring an agent: instructions, model, tools and knowledge, with a test chat.

Installs components/ui/agent-builder.tsxDepends on @radix-ui/react-popover, @radix-ui/react-slot, lucide-reactMotion none in component source
pnpm dlx shadcn@latest add @caliper/agent-builder
Model

0 characters

Tools it may use
Knowledge it can read

Before you publish

  • Give the agent a name, done
  • Write instructions of at least a couple of sentences, still to do
  • Give it a tool or some knowledge, done

Try it

Send a message to see how Billing helper answers with this setup.

When to use #

Use it for

  • Letting users create and test their own assistants.
  • Showing changes before they publish.

Skip it when

  • The settings are only a few toggles.

Installation #

terminal
pnpm dlx shadcn@latest add @caliper/agent-builder

Adds its 5 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.

Usage #

Import it from your copy of the source. The example behind the preview comes with the source.

example.tsx
import { AgentBuilder } from "@/components/ui/agent-builder"

The worked example comes with Pro

The 34-line example behind the preview opens here with a Pro or Team licence.

Checking your licence…

API reference #

AgentBuilder

component
PropTypeDefaultDescription
value *AgentConfig—
onChange *(value: AgentConfig) => void—
models *readonly AgentOption[]—
tools *readonly AgentOption[]—
knowledge *readonly AgentOption[]—
onTest *(message: string, config: AgentConfig) => Promise<string>—Run the agent on a message with the current setup.
onPublish *(config: AgentConfig) => void—
classNamestring—

Accessibility #

It exposes group, log and status semantics, with aria-label, aria-labelledby, aria-pressed, aria-valuetext, aria-hidden and aria-live kept in step with state. Changes that matter are announced through a live region.

Keyboard and focus handling comes from Radix popover: arrow keys move through items, Enter and Space select, and Escape closes and returns focus.

Motion #

It declares no animation in its component source. Any transition comes from its stylesheet, which uses the duration tokens that collapse to instant under prefers-reduced-motion.