Agent panel

Understory
AskPill, DockedAgentPanel, AgentChat, UserQuestion: the whole agent surface.

Usage

The app shell mounts it. Its pieces live in @/components/agent.

When to use

Use it for

  • The whole agent surface: AskPill to start, DockedAgentPanel to work beside the page, AgentChat for the conversation, UserQuestion when the agent needs a choice.
  • The agent asks with UserQuestion and concrete options, not in prose.
  • Replies cite the files they touched, and edits show a diff before they apply.

Avoid

  • A chat surface of its own for one feature. Extend the panel.
  • Spinners or sparkles while the agent works: the mark and a present-tense line say it.

Accessibility

Checks

  • ⌘J opens it, and everything in it works from the keyboard, UserQuestion options included.

API

Read from each component's stories, the same source as COMPONENTS.md, and kept in step by check:design-system.

AskPill

Its stories don't declare argTypes, so no props are listed. The variants show its states.
Also exportsAgentAskPillAskPillComposerAskPillFade
VariantsCollapsedExpanded

DockedAgentPanel

Its stories don't declare argTypes, so no props are listed. The variants show its states.
Also exportsDASHBOARD_AGENT_CARD_CLASS
VariantsDefaultEditorPanelSurface

AgentChat

Its stories don't declare argTypes, so no props are listed. The variants show its states.
Also exportsAGENT_DISCLAIMERAssistantMessageCOMPOSER_PLACEHOLDERSLOADING_PLACEHOLDERSPillInput
VariantsDefaultAdminWithoutSlackSharedWithATeammateLongTranscriptWithToolStepsWithAFailedToolStep

UserQuestion

The questionnaire the agent surfaces instead of asking in prose, rendered in the transcript under the reply that asked. Every option is a row that is clickable end to end. A lone single-select question submits on pick, with no confirm step; anything richer collects first and sends on Send answers. Skip defers to the judgment of the agent (an MCP-style decline). The selections become the next user message (see formatUserQuestionResponse), and the card is shown only while the agent is still waiting on it — including after a reload, so a pending question is never stranded.

Its stories don't declare argTypes, so no props are listed. The variants show its states.
VariantsDefaultMultipleQuestionsFreeTextBesideAChoicePanelDisabled

Keep going

Design language
The macro guidelines that define design at Fern.
Agent mark
The Fern Agent's mark, calm at rest and moving while it works.