Skip to content
GitHub (opens in a new tab)

AgentInbox

A queue of what agents need from you: approvals, questions, failed runs and finished recaps. Filter, mark read, and select a row to open its detail.

stableOrganismcontracts/agentinbox.json

Preview

AgentInbox

What agents need from you. Not Toast. Not Chat.

Master

Filter by type, select a row to open its detail, mark everything read.

Agent inbox

2 unread

Migrate DB needs your OK

High risk

Drops column invoices.legacy_total on staging. Reversible from the 0041 snapshot.

Exact commandstaging
psql $STAGING_URL -f migrations/0042_drop_legacy.sql

Usage

AgentInbox collects agent requests. Approvals reuse ApprovalCard and questions reuse DecisionCard, so their keyboard rules carry over. Product notifications are not agent requests.

Do's

  • collect every agent request in one place
  • act on approvals and questions without leaving the list
  • review failed runs and recaps

Don'ts

  • product notifications — Toast or a notification list
  • one approval inline — ApprovalCard
  • a chat thread — Chat
<AgentInbox
  items={items}
  selectedId={selected}
  onSelect={setSelected}
  filter={filter}
  onFilterChange={setFilter}
  onMarkAllRead={markAll}
  onApprove={approve}
  onDeny={deny}
  onAnswer={answer}
/>

When to use

  • collect every agent request in one place
  • act on approvals and questions without leaving the list
  • review failed runs and recaps

When not to use

  • product notifications — Toast or a notification list
  • one approval inline — ApprovalCard
  • a chat thread — Chat

What an agent reads

import { AgentInbox } from "agentic-ds-kit";
must
  • section aria-labelledby the h3 title
  • rows are buttons with aria-expanded (true on the selected row) and aria-controls on the detail region; the selected row also has aria-current
  • unread is said in text, not only the bold agent name
  • the filter is a kit SegmentedControl (radio group)
  • the detail region is aria-live polite
  • load error is a kit LoadError (role=alert) with Retry
  • row and detail motion is opacity and transform, off under prefers-reduced-motion
defaults
  • title Agent inbox
  • filter all
  • loading false
stops if
  • Do not invent a local AgentInbox, RequestQueue, or Notification Stack for agent requests
  • Do not rebuild approval or question UI; items reuse ApprovalCard and DecisionCard
  • Do not use raw hex

From contracts/agentinbox.json: must is the a11y requirements, defaults the prop defaults, stops if the doNot rules where the agent asks instead of inventing a cousin.

Props

NameTypeRequiredDefaultNotes
itemsarrayYes—{ id, agentName, type: "approval" | "question" | "failure" | "recap", preview, time?, read?, approval?, question?, detail? }[]. approval renders a kit ApprovalCard, question a kit DecisionCard.
titlestringNoAgent inbox—
selectedIdstringNo——
onSelectfunctionNo—(id) => void
filterenumNoallall | approval | question | failure | recap
onFilterChangefunctionNo—(filter) => void. Shows the SegmentedControl with type labels; the unread Badge carries the count.
onMarkAllReadfunctionNo——
onApprovefunctionNo—(id) => void
onDenyfunctionNo—(id) => void
onAnswerfunctionNo—(id, value) => void
onRetryItemfunctionNo—(id) => void. Failure detail: Retry run.
onViewDifffunctionNo—(id) => void. Recap detail.
onOpenTrailfunctionNo—(id) => void
renderDetailfunctionNo—(item) => ReactNode replaces the default detail.
loadingbooleanNofalse—
errorstringNo——
onRetryfunctionNo—Retry on the kit LoadError.
  • Component
    →

    Toast

    A short note that floats in after an action, like Saved successfully, and goes away on its own after a few seconds, with an optional Undo.

  • Component
    →

    ApprovalCard

    The agent asks before it acts: risk, what will happen in words, an exact preview of the command or diff, and Approve (⌘/Ctrl+Enter) / Deny (Escape) with an optional auto-deny countdown.

  • Component
    →

    Chat

    Assistant panel with a header, a thread, and a composer.

  • Component
    →

    DecisionCard

    An agent presents a choice mid-run and waits: options with a recommended one, or a free-text answer.