# Component showcase

> Tables, code, images, video, asides, steps and other common docs components.

Common docs components in one page. Copy the markup you need.

## Asides

:::note[Note]
Extra information.
:::

:::tip[Tip]
Verify tool calls in dev before deploying a version.
:::

:::caution[Caution]
Production changes need an owner or admin.
:::

:::danger[Danger]
Deleting an agent deletes all its versions and cannot be undone.
:::

## Steps

1. **Create an agent**

   Click "New agent" in the console, pick a model and write the system prompt.

2. **Add a tool**

   Create a webhook tool and enable it on the agent.

   ```bash
   curl -X POST https://api.example.com/hook
   ```

3. **Deploy**

   Create a version and deploy it to dev.

## Tables

| Parameter     | Type                        | Required | Description                           |
| ------------- | --------------------------- | -------- | ------------------------------------- |
| `agent_id`    | `string`                    | Yes      | Agent ID                              |
| `environment` | `"dev" \| "test" \| "prod"` | No       | Deployment environment, default `dev` |
| `timeout_ms`  | `number`                    | No       | Tool timeout in milliseconds          |

## Code

Inline code such as `bun run dev:docs`。A block with a title and line highlights:

```ts title="src/agent.ts" {3-4}
const agent = await createAgent({
  name: "support",
  model: "gpt-4o",
})
```

Language tabs:

    ```bash
    curl https://api.example.com/v1/agents \
      -H "Authorization: Bearer $MODEAIX_KEY"
    ```
    ```ts
    const res = await fetch("/v1/agents", {
      headers: { Authorization: `Bearer ${key}` },
    });
    ```
    ```python
    import requests
    requests.get("/v1/agents", headers={"Authorization": f"Bearer {key}"})
    ```

Diff:

```diff lang="ts"
- const model = "gpt-4o-mini";
+ const model = "gpt-4o";
```

## Images

![System architecture](../../../assets/architecture.svg)

## Video

  <iframe
    src="https://www.youtube.com/embed/dQw4w9WgXcQ"
    title="Sample video"
    allow="accelerometer; autoplay; clipboard-write; encrypted-media; picture-in-picture"
    allowfullscreen
    loading="lazy"
  ></iframe>

For a local file use `<video controls src="/demo.mp4"></video>`, placed under `public/`.

## Badges and file tree

<Badge text="New" variant="success" /> <Badge text="Beta" variant="caution" />
<Badge text="Deprecated" variant="danger" /> <Badge text="Default" />

- apps
  - api
  - docs
    - src
      - content
        - docs **components.mdx**
    - astro.config.mjs
- packages
  - shared

## Collapsible

<summary>Why versions?</summary>

Versions are immutable snapshots, so deployed behavior is reproducible and easy to roll back.

## Cards and links

    Create your first agent in five minutes.
    Secret encryption and outbound protection.

<LinkCard
  title="Web widget"
  description="Embed an agent in your website"
  href={withBase("/en/channels/widget/")}
/>

## Quotes

> Good docs save the reader one question.

Footnote example[^1]。

[^1]: Footnote text appears at the bottom of the page.
