Skip to main content

Properties

TrueForgeServerConfig
required
Where the chat gets its data. Either a built-in config object or a ready AgentUIServer.See Server contract.
LayoutProp
required
A built-in layout name or your own component.See Layouts.
AgentConfig
default:"{ mode: \"AgentLibraryWithComposer\" }"
Which agent-selection surfaces the shell exposes.defaultAgentSpec seeds a new draft and is picked up on new chat, not on clear chat. See Agent modes.
ThemeConfig
Preset, color mode, tokens, branding, and content class names.See Theming.
SlotOverrides
Replace any built-in component. Partial<AtomSlots>, derived from the SDK’s default slot table — so editor autocomplete lists the overridable names. See Slot overrides.
string
Passed to the layout component, and to the loading and error states. Typically "h-full min-h-0". To style the theme wrapper instead, use theme.className.
string
Open an existing session on mount instead of starting fresh.
RuntimeAdapters
Runtime adapter overrides. Attachments default to trueForgeAttachmentAdapter.
(error: unknown) => void
Called when the server fails to resolve or the runtime raises an error.

Behavior notes

The component mounts every provider it needs, so you do not have to wrap it in anything. Switching agents, starting a new draft, or clearing the chat resets the conversation — the current transcript is cleared so that one agent’s messages do not carry into another’s context. Persisted sessions remain available through the thread list.
If window.location.search contains screenType=mcp-auth, the component renders only the OAuth completion screen and no layout. See MCP OAuth.

Example