Agent marks
The marks of the agent CLIs and the dot of an account's color.
import type { AgentKind, UsageProvider } from '@adecore/agent-contracts';
import { AccountDot, AgentIcon, ProviderLogo, CliMark, CliTile } from '@adecore/agents-react/providers';
import { DemoChatHost } from '../shared/agents.tsx';
const KINDS: AgentKind[] = ['claude', 'codex', 'grok', 'gemini', 'copilot', 'apple'];
const PROVIDERS: UsageProvider[] = ['claude', 'codex', 'nanogpt', 'grok', 'copilot', 'antigravity'];
export default function MarksDemo() {
return (
<DemoChatHost>
<div className="grid grid-cols-[auto_1fr] items-center gap-x-6 gap-y-3 text-xs text-text-muted">
<span>AgentIcon</span>
<span className="flex items-center gap-3 text-text">
{KINDS.map((kind) => (
<AgentIcon key={kind} kind={kind} size={20} />
))}
</span>
<span>CliMark</span>
<span className="flex items-center gap-3">
{KINDS.map((kind) => (
<CliMark key={kind} kind={kind} size={20} />
))}
</span>
<span>CliTile</span>
<span className="flex items-center gap-3">
<CliTile kind="claude" />
<CliTile kind="codex" />
</span>
<span>ProviderLogo</span>
<span className="flex items-center gap-3 text-text">
{PROVIDERS.map((provider) => (
<ProviderLogo key={provider} provider={provider} size={20} />
))}
</span>
<span>AccountDot</span>
<span className="flex items-center gap-3">
<AccountDot color="blue" />
<AccountDot color="amber" />
<AccountDot color="teal" />
<AccountDot color={undefined} />
</span>
</div>
</DemoChatHost>
);
}| Component | Import | |
|---|---|---|
AgentIcon({ kind, size?, className? }) | @adecore/agents-react/providers | The mark of an AgentKind in the current text color, with a label for screen readers. A kind without a mark gets a robot. |
CliMark({ kind, size?, className? }) | @adecore/agents-react/providers | The same mark in the CLI's chart color, so it matches the usage page. |
CliTile({ kind }) | @adecore/agents-react/providers | A 24 pixel mark as tall as a title's first line, for a list row. |
ProviderLogo({ provider, size?, className? }) | @adecore/agents-react/providers | The mark of a UsageProvider, decorative. |
AccountDot({ color, className? }) | @adecore/agents-react/providers | An account's color: one of the host's accents by id, or the app's accent for any other. |
size is in pixels, 14 by default.
hasProviderLogo(kind) says whether ProviderLogo draws a kind (claude, codex or anthropic-claude-api), and narrows it to a UsageProvider. It takes null and undefined as no. Draw ProviderLogo for those and AgentIcon for every other kind.
A mark for a kind the host adds
A kind of your own, such as one run through createAcpProvider, gets its mark in the agentMarks member of the host, which a ChatHostProvider hands to every view under it. Every view that draws an agent's mark uses it.
import type { ChatHost } from '@adecore/agents-react';
export const CHAT_HOST: Partial<ChatHost> = {
agentMarks: {
acme: { title: 'Acme', path: 'M12 2 2 22h20Z' },
orbit: { title: 'Orbit', path: 'M8 1a7 7 0 1 0 0 14A7 7 0 1 0 8 1Z', viewBox: '0 0 16 16' }
}
};An AgentMark is one SVG path in currentColor, with a title for screen readers, an optional viewBox (0 0 24 24 by default) and an optional fillRule: evenodd for a path whose holes are subpaths inside its shape, as the built-in mark of anthropic-claude-api is. A mark for a built-in kind replaces it. A provider inside another adds its marks to the ones above it.