Skip to content

AI Interaction Patterns

Patterns

101 patterns for interaction scenarios that did not exist before agents. These are not adaptations of existing patterns for AI use cases — they are new responses to new questions: How do you show an agent asking for permission? How do you make a tool call visible without overwhelming the user? How do you build a consent ceremony for an autonomous action?

Agency & Control10

Who acts, and how much latitude they have.

Tool Execution3

What agents do when they use tools — and how you show it.

Conversation8

The back-and-forth between agent and user.

Human-in-the-Loop20

The patterns for keeping humans in the chain.

ApprovalQueue

Queue of pending human approvals with priority ordering

ConsentFlow

Multi-step consent wizard with step indicator

CorrectionFlow

UI for correcting AI output with diff preview

EscalationBanner

High-priority alert banner for human escalation

GuardrailIndicator

Visual indicator of active guardrails and safety constraints

ErrorBoundaryCard

Containment unit for agent errors — severity-coded card with recovery actions

AgentRecoveryFlow

Recovery breadcrumb timeline showing every step an agent attempted after hitting a dead end

PartialSuccessPanel

Partial completion panel — agent did N of M steps, human needed on step K

StateBadge

Color-coded uppercase badge for the six canonical AI interaction states (loading, thinking, acting, confirming, error, recovery)

StateIndicator

Animated dot indicator for AI interaction states — CSS-only animations with prefers-reduced-motion support

ScenarioScript

Linear step sequence for documenting agent interaction flows — shows state badge, copy, and annotation per step

AgentPauseControl

Pause/resume control for in-flight agents with execution state preservation — shows step count and last completed action when paused

RedirectPanel

Mid-execution goal redirect — shows agent progress, struck-through original goal, and preview of new goal before confirming

OverrideConfirmation

High-stakes override with consequence preview and mandatory acknowledgment — no blind overrides, consequences always shown first

AgentCapabilityMatrix

Scannable grid of agents × capability dimensions — blue=granted, gold=conditional, red=denied — designed for treasury dashboards at 3am

CapabilityGrant

Single permission grant card with conditions (time-bounded, value-bounded, approval-gated), audit trail toggle, and revoke trigger

CapabilityRevokeFlow

Two-step revocation ceremony: Step 1 shows task impact preview (will-fail / may-degrade), Step 2 requires written reason — non-repudiable audit trail

OverrideJustification

Structured justification form for human overrides of agent decisions. Captures reason category, free-text rationale, and acknowledges accountability.

ReviewRequestCard

Card surface for human review requests from an agent. Shows the decision context, confidence, urgency level, and approve/reject actions.

HumanInputRequest

Canonical 'agent needs a human' surface unifying the AG-UI interrupt model and the A2A input-required TaskState behind a protocol adapter prop. Validation-gold frame (ReviewRequestCard treatment); response buttons meet the 44px touch-target floor.

Trust & Provenance16

Where did this content come from, and should you trust it?

AuditTrail

Immutable action log with integrity hash chain

ProvenanceChain

Linked chain of data sources showing transformation provenance

ProvenanceFrame

Wrapper for agent-rendered generative-UI output: provenance chip rail, agency-red left marker, validation warnings, and a streaming state

UnknownComponentFallback

Visible, honest fallback when a generative-UI action requests a component outside the approved catalog

VaultBoundary

Visual boundary between vault permission zones

PermissionMatrix

Grid of resource-permission grants for agent authorization

ConfidenceMeter

Labeled confidence gauge with low/moderate/high qualifier

TemporalScale

Time-based scale showing recency and freshness

ConfidenceSpectrum

Multi-dimensional certainty visualization. Shows uncertainty fingerprint across epistemic, aleatory, temporal, and consensus dimensions. Distinct from ConfidenceMeter (single-axis).

ActionProvenanceCard

Traceable action attribution receipt. Shows decision authority, executing agent, human approver, confidence at decision time, and evidence used. Mandatory for consequential agentic actions.

AgentSourceCitation

Inline citation block listing the evidence sources an agent used. Each entry has source name, type, confidence score, and retrieval timestamp.

DataLineageTag

Compact hop-chain tag showing data lineage from source to consumer. Each hop has a system name and optional transformation type.

TrustScoreDisplay

Composite trust score display with breakdown by factor (accuracy, recency, source quality, consensus). Score maps to outcome color tokens.

ValidationChain

Sequential validation pipeline display. Each step shows rule name, result (pass/fail/warning/pending/skipped), and optional message. Used for data quality and policy gates.

ReconciliationDiff

Side-by-side reconciliation diff — expected vs actual with match/break/tolerance/missing status per row and delta values

AuditSignature

Cryptographic audit attestation display — signer, subject, full hash, algorithm, verified/invalid/pending status, compact inline variant

Orchestration12

How multiple agents coordinate toward a shared goal.

A2UISurface

Agent-to-UI renderer — accepts declarative nodus:* component specs and renders the appropriate Nodus component

A2AHandoff

Agent-to-agent task handoff visualization with protocol steps

TaskQueue

Ordered task list with status tracking and priority

useAgentStream

SSE stream subscription hook — returns { chunks, status, latency, start, reset }. Simulates token-by-token delivery with configurable TTFT, chunkInterval, and chunkSize.

usePositionFeed

Live FX position tick hook — returns { positions, lastUpdate, delta, running, pause, resume }. Configurable volatility and tick interval.

useAgentHeartbeat

Agent status polling hook — returns { agents, lastPing, stale, ping }. Marks agents stale after configurable staleness window. Used in multi-agent orchestration views.

MultiAgentOrchestrationView

Pipeline view of a multi-agent workflow. Shows each agent step with status (queued/active/done/failed/blocked/skipped), duration, and dependency connectors.

TaskStateBadge

Badge for the nine A2A protocol TaskStates (submitted, working, input-required, auth-required, completed, failed, canceled, rejected, unknown). Extends the StateBadge anatomy with protocol-grouped semantic colors; exports a taskStateGroup helper for branching on active/interrupted/terminal.

RunLifecycleRail

Vertical rail rendering one AG-UI run as lifecycle phases: RunStarted, StepStarted/StepFinished segments, and a terminal cap (finished/interrupt/error). Supports one level of nested child runs (parentRunId concept). Composes the AgentTimeline track language with TaskStateBadge-consistent colors.

StateDeltaInspector

AG-UI shared-state inspector: renders a StateSnapshot as a collapsible tree with RFC 6902 JSON Patch ops (StateDelta) highlighted in place — temporal tint on patched values, agency accent on agent-written path labels, strikethrough ghost rows for removes. Optional before/after snapshot toggle and prev/next history stepper. Malformed patch entries render as warning rows, never crashes.

A2ATaskPanel

Single A2A Task detail surface mirroring the spec's Task object: identity header (task id + contextId + TaskStateBadge), role-turned message history in ChatMessage conventions, artifact list delegating each artifact to ArtifactViewer, and a mono key/value metadata block. Temporal spine — a task is a thing moving through time.

ArtifactViewer

Part-type-aware renderer for the A2A Artifact model ({artifactId, name?, parts}): text parts as a typographic block, data parts as DataList-convention key/value rows, file parts as a mediaType + uri chip (never fetched), unknown kinds as a warning row. Validation-gold accent — an artifact is enriched output. The appending prop shows a StreamingDot tail while artifact-update appends arrive.

Reasoning5

Making agent thought visible without overwhelming the interface.

Learning3

How systems improve from feedback and signal.

Visualization6

Rendering complex agent state as legible structure.