---
title: "For agents"
description: "Machine-readable entry points: llms.txt, full corpus, API-only corpus, and JSON."
section: guides
slug: for-agents
url: /docs/for-agents
---

# For agents

Machine-readable entry points: llms.txt, full corpus, API-only corpus, and JSON.

Every page has a Markdown twin and every component has a JSON API document. Both are generated from the same registry as this page, so they cannot drift.

## Entry points

| URL | Contents |
| --- | --- |
| `/llms.txt` | Index, install rules, and links to every page as Markdown. |
| `/llms-full.txt` | The complete documentation in one file. |
| `/llms-api.txt` | Imports and API tables only — no examples. |
| `/api/index.json` | Every component with slug, category, summary, and URL. |
| `/api/<slug>.json` | Structured props, events, snippets, types, tokens, and examples. |
| `/<page>.md` | The Markdown twin of any page. |
| `/search.json` | The client search index, plain JSON. |

## Ground rules

- Svelte 5 runes only: `$props()`, `$state()`, `$derived()`, `$effect()`.
- Import from `@elluzion/iv-ui`; import `@elluzion/iv-ui/theme.css` once at the root.
- Never hardcode hex colors in app code — override `--iv_*` tokens.
- Mount `<Toast />` and `<AlertDialog />` once; use `showToast()` and `showAlertDialog()`.
- Prefer the library component over a hand-built control.
- Pass `aria-label` for icon-only buttons and `alt` for avatars.
- All components forward `class`, `id`, `style`, `aria-*`, and `data-*` through rest props.

## Fetch

```sh
curl https://iv-ui.vercel.app/llms-api.txt
curl https://iv-ui.vercel.app/api/button.json
curl https://iv-ui.vercel.app/components/button.md
```

## What the API JSON contains

```json
{
	"slug": "button",
	"name": "Button",
	"category": "Form & Input",
	"summary": "Triggers an action or submits a form.",
	"status": "stable",
	"since": "0.1.0",
	"import": "import { Button } from '@elluzion/iv-ui';",
	"usage": ["…"],
	"props": [{ "name": "variant", "type": "…", "default": "…", "description": "…", "required": false, "bindable": false }],
	"events": [{ "name": "click", "type": "(e: MouseEvent) => void", "default": null, "description": "…", "required": false, "bindable": false }],
	"snippets": [{ "name": "children", "type": "Snippet", "default": null, "description": "…", "required": true, "bindable": false }],
	"types": [],
	"manual": [],
	"tokens": ["--iv_radius-sm"],
	"cssHooks": [".iv-btn"],
	"accessibility": { "keyboard": [["Tab", "…"]], "notes": ["…"] },
	"related": [{ "title": "…", "summary": "…", "url": "/components/…", "kind": "Component" }],
	"examples": [{ "id": "variants", "title": "Variants", "description": "…", "code": "…" }],
	"markdown": "/components/button.md",
	"page": "/components/button"
}
```

> **Canonical URLs** — Links inside `llms.txt` are absolute. Set `PUBLIC_SITE_URL` at build time when the docs move to a custom domain.

## Related

- [Installation](/docs/installation.md)
- [Quickstart](/docs/quickstart.md)
- [Accessibility](/docs/accessibility.md)