Package:
@hexos/react-uiComponent for displaying and optionally switching between available agents.
Provides three display variants:
- Compact: Single AgentBadge with “+N more” counter
- Expanded: Grid of agent buttons with circular avatars and names
- Dropdown: Single large badge (dropdown functionality to be implemented)
When allowManualSwitch is true and onAgentSelect is provided, users can click agent buttons
to manually trigger agent switching. Manual switching is disabled during streaming.
The expanded variant highlights the active agent with brand colors and shows a pulsing indicator during streaming. Inactive agents are dimmed when streaming is active.
Related components: AgentBadge
Example
<AgentSwitcher
agents={[
{ id: 'main', name: 'Main Assistant' },
{ id: 'code', name: 'Code Helper' }
]}
activeAgentId="main"
variant="expanded"
isStreaming={isStreaming}
/>function AgentSwitcher(props: AgentSwitcherProps): React.ReactElementParameters