Ballmac UI home

Agent 18: knowledge base

A knowledge base admin: the sources an assistant reads with their health, document counts and a switch for each, live sync with Retry, and a box to test a question and see which sources the answer comes from.

State

The normal view. Pick a state to see what the block shows while it loads, is empty or fails.

Open in v0 (opens in a new tab)

Installation

$ pnpm dlx shadcn@latest add @ballmac/agent-18

Usage

Example: agent-18-demo.tsx
"use client"

import { Agent18 } from "@/components/ballmac/blocks/agent-18/agent-18"

export default function Agent18Demo() {
  return <Agent18 />
}

States

Pass state and the block does the rest: skeletons that match its layout, a clear empty message, an error you can retry, and announcements for screen readers.

  • Loading

    Skeleton sources and test box under the real heading, announced as loading.

    state="loading"
  • No sources yet

    Says there are no sources yet; emptyState sets the copy.

    state="empty"
  • Could not load

    An alert saying nothing was changed, with Try again (onRetry). A sync, switch or remove that fails says why and changes nothing.

    state="error"

Dependencies

Use with AI

Knowledge base. <Agent18 title description sources={KnowledgeSource[]} onAdd onSync onToggle onRemove onTest={(q) => Promise<{ paragraphs, sources }>} />. The test box asks a question and shows the answer with its sources, so a person can turn a source off and ask again to see what it contributed. A rejected onTest shows the reason. With the shadcn MCP server set up (guide), ask your agent:

Add the Ballmac UI Agent 18: knowledge base (@ballmac/agent-18) to this project with the shadcn MCP, then use it where it fits.

Use it for

  • The settings page of an AI product that answers from customer data
  • Checking which sources an answer comes from before launch

Not for

  • A chat for end users; use agent-16
  • Browsing documents; use a file table

Registry JSON: https://ui.ballmac.com/r/agent-18.json

Free to use in personal and commercial projects.

Ballmac UI Pro

Need the whole screen, not one piece?

150 premium blocks (dashboards, settings, calendars, mail, shops, onboarding), a private shadcn registry and Figma tokens. Blocks that show data come with loading, empty and error states built in.

Not ready? Try three Pro blocks free

Leave your email and the blocks appear right here, ready to copy. Yours to use in any project.