Skip to content
Browse docs and components

Agent Composer

agent-composer

The compact composer of an agent app: a rounded field with round controls flush inside, send that becomes stop in place, a light that runs round the edge while the agent works, and a status row beneath.

Responsive

Install

$npxshadcnadd@forme/agent-composer

Adds the component, its registry dependencies, and the token stylesheet you import once.

API reference

Read from the source, so it is the API of the file you install. A prop marked * is required.

AgentComposer

The composer of an agent app: one rounded field with round controls flush inside it, and a status row beneath.

PropTypeDefaultDescription
onSubmit*(message: { text: string; files: File[] }) => void—Called with the text and any attached files. The field clears itself.
busybooleanfalseWhile true, send becomes stop and a light runs round the edge.
onStop() => void—
placeholderstring"Ask me anything"
labelstring"Message"Accessible name for the field.
attachmentsbooleantrueShows the paperclip.
controlsReactNode—Beside the send button: a model name, a model picker, a toggle.
statusReactNode—The quiet row under the composer: the model, the provider, a message count.
disabledboolean—
classNamestring—