> For AI agents: the complete documentation index is available at https://wallarm.github.io/design-system/llms.txt, the full documentation bundle is available at https://wallarm.github.io/design-system/llms-full.txt.

# AgentGlyph

The flat 16–32 px mark of an AI agent for text, chips and table rows: the same silhouette, color and eyes as `AgentAvatar`, with no canvas and no motion. From 40 px up reach for `AgentAvatar`. It is always decorative, so it sits next to the agent’s visible name: 20 px beside `text-sm` and in table rows, 16 px beside `text-xs`.

[Source](https://github.com/wallarm/design-system/tree/main/packages/design-system/src/components/AgentGlyph) · [Storybook](https://wallarm.github.io/design-system/storybook/?path=/docs/ai-characters-agentglyph--overview)

```tsx
import { AgentGlyph } from '@wallarm-org/design-system/AgentGlyph';

export const Basic = () => (
  <AgentGlyph data-testid='agent-glyph' />
);
```

## Usage

```tsx
import { AgentGlyph } from '@wallarm-org/design-system/AgentGlyph';
```

## Examples

### Cast

The cast in every state frame, at 20 px. Colour and eyes carry the state; red and crosses never appear.

```tsx
import { AgentGlyph } from '@wallarm-org/design-system/AgentGlyph';
import { HStack, VStack } from '@wallarm-org/design-system/Stack';
import { Text } from '@wallarm-org/design-system/Text';
import { CAST } from '../../lib/agent-characters/data.gen';

export const Cast = () => (
  <VStack gap={12}>
    <HStack gap={16}>
      {CAST.map(p => (
        <span key={p.id} className='sb-annotation w-64'>
          {p.name.toLowerCase()}
        </span>
      ))}
    </HStack>
    {STATES.map(state => (
      <HStack key={state} gap={16} align='center'>
        <span className='w-120'>
          <Text size='sm'>{STATE_LABELS[state]}</Text>
        </span>
        {CAST.map(p => (
          <span key={p.id} className='w-64'>
            <AgentGlyph
              data-testid={`agent-glyph-${p.id}-${state}`}
              agent={p.id}
              size={20}
              state={state}
              align='box'
            />
          </span>
        ))}
      </HStack>
    ))}
  </VStack>
);
```

### Sizes

The four glyph sizes for the cast. 16 px is the floor; above 32 px the 3D AgentAvatar takes over.

```tsx
import { AgentGlyph } from '@wallarm-org/design-system/AgentGlyph';
import { HStack, VStack } from '@wallarm-org/design-system/Stack';
import { CAST } from '../../lib/agent-characters/data.gen';

export const Sizes = () => (
  <HStack gap={24} align='end'>
    {([16, 20, 24, 32] as const).map(size => (
      <VStack key={size} gap={8} align='center'>
        {CAST.map(p => (
          <AgentGlyph
            key={p.id}
            data-testid={`agent-glyph-${size}-${p.id}`}
            agent={p.id}
            size={size}
            align='box'
          />
        ))}
      </VStack>
    ))}
  </HStack>
);
```

### Inline with text

Beside a name: 20 px with text-sm, 16 px with text-xs. `optical` sits every shape on the text line; `box` centers the box, so short shapes look low.

```tsx
import { AgentGlyph } from '@wallarm-org/design-system/AgentGlyph';
import { HStack, VStack } from '@wallarm-org/design-system/Stack';
import { Text } from '@wallarm-org/design-system/Text';
import { CAST } from '../../lib/agent-characters/data.gen';

export const InlineWithText = () => (
  <HStack gap={48} align='start'>
    {(['optical', 'box'] as const).map(align => (
      <VStack key={align} gap={8}>
        {CAST.map(p => (
          <HStack key={p.id} gap={8} align='center'>
            <AgentGlyph
              data-testid={`agent-glyph-inline-${align}-${p.id}`}
              agent={p.id}
              size={20}
              align={align}
            />
            <Text size='sm'>{p.name}</Text>
            <AgentGlyph
              data-testid={`agent-glyph-inline-xs-${align}-${p.id}`}
              agent={p.id}
              size={16}
              align={align}
            />
            <Text size='xs' color='secondary'>
              {p.role}
            </Text>
          </HStack>
        ))}
      </VStack>
    ))}
  </HStack>
);
```

### Partial coverage

Partial coverage: an agent whose template has applications, covering only some of them, shows a gray crown while on duty.

```tsx
import { AgentGlyph } from '@wallarm-org/design-system/AgentGlyph';
import { HStack, VStack } from '@wallarm-org/design-system/Stack';
import { Text } from '@wallarm-org/design-system/Text';
import { CAST } from '../../lib/agent-characters/data.gen';

export const PartialCoverage = () => (
  <HStack gap={24} wrap='wrap'>
    {CAST.map(p => (
      <VStack key={p.id} gap={8} align='center'>
        <AgentGlyph
          data-testid={`agent-glyph-partial-${p.id}`}
          agent={p.id}
          size={32}
          hasApplications
          coverage='partial'
          align='box'
        />
        <Text size='sm'>{p.name}</Text>
      </VStack>
    ))}
  </HStack>
);
```

### Custom agent

Agents without a preset get a deterministic look from their uid: never coral, never a look-alike of another agent.

```tsx
import { AgentGlyph } from '@wallarm-org/design-system/AgentGlyph';
import { HStack, VStack } from '@wallarm-org/design-system/Stack';
import { Text } from '@wallarm-org/design-system/Text';
import { defaultLook } from '../../lib/agent-characters/look';

export const CustomAgent = () => (
  <HStack gap={24}>
    {CUSTOM_AGENTS.map(uid => (
      <VStack key={uid} gap={8} align='center'>
        <AgentGlyph
          data-testid={`agent-glyph-custom-${uid.slice(0, 8)}`}
          look={defaultLook(uid)}
          size={32}
          align='box'
        />
        <Text size='xs' color='secondary'>
          {uid.slice(0, 8)}
        </Text>
      </VStack>
    ))}
  </HStack>
);
```

## Props

| Prop            | Type                                          | Default   | Description                                                                                               |
| --------------- | --------------------------------------------- | --------- | --------------------------------------------------------------------------------------------------------- |
| id              | `string \| undefined`                         |           |                                                                                                           |
| onChange        | `ChangeEventHandler<T, Element> \| undefined` |           |                                                                                                           |
| type            | `string \| undefined`                         |           |                                                                                                           |
| name            | `string \| undefined`                         |           |                                                                                                           |
| height          | `string \| number \| undefined`               |           |                                                                                                           |
| max             | `string \| number \| undefined`               |           |                                                                                                           |
| min             | `string \| number \| undefined`               |           |                                                                                                           |
| target          | `string \| undefined`                         |           |                                                                                                           |
| width           | `string \| number \| undefined`               |           |                                                                                                           |
| href            | `string \| undefined`                         |           |                                                                                                           |
| agent           | `AgentCharacterId`                            |           |                                                                                                           |
| look            | `undefined`                                   |           |                                                                                                           |
| size \*         | `AgentGlyphSize`                              |           | 16 beside text-xs, 20 beside text-sm or larger and in table rows (D3); 24 and 32 for other compact slots. |
| state           | `AgentGlyphState \| undefined`                | `idle`    |                                                                                                           |
| hasApplications | `boolean \| undefined`                        | `false`   | The agent's template has applications (`applications_scoped`): only then can it show Partial coverage.    |
| coverage        | `"full" \| "partial" \| undefined`            | `full`    | `partial` draws the grey crown of Partial coverage, on duty only.                                         |
| align           | `"box" \| "optical" \| undefined`             | `optical` | `optical` lifts the body onto the text line (inline places); `box` keeps the box (ladders, stacks).       |
