# Integrations & Examples

Copy-ready starter examples, framework wrappers, and an AI coding agent skill for AIsh.li in our official [`aish-li/aish.li-integrations`](https://github.com/aish-li/aish.li-integrations) repository under the [`aish-li` GitHub organization](https://github.com/aish-li).

## Starter Examples

Browse and copy complete working starters directly from [`aish-li/aish.li-integrations`](https://github.com/aish-li/aish.li-integrations):

| Example                        | Use Case                                                                         | Source File                                                                                                                            |
| :----------------------------- | :------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------- |
| **Static HTML Embed**          | Minimal HTML5 page embedding `<ai-chat>`                                         | [`examples/html/index.html`](https://github.com/aish-li/aish.li-integrations/blob/main/examples/html/index.html)                       |
| **React TypeScript Component** | Reusable `<AiChatWidget>` wrapper with JSX types and idempotent script loading   | [`examples/react/AiChatWidget.tsx`](https://github.com/aish-li/aish.li-integrations/blob/main/examples/react/AiChatWidget.tsx)         |
| **Node.js SSE Streaming**      | Zero-dependency Node.js 20+ ESM script streaming `POST /v1/responses`            | [`examples/api/stream-response.mjs`](https://github.com/aish-li/aish.li-integrations/blob/main/examples/api/stream-response.mjs)       |
| **Conversational Form CLI**    | Interactive `curl` + `jq` walkthrough for progressive `POST /v1/form` validation | [`examples/api/conversational-form.sh`](https://github.com/aish-li/aish.li-integrations/blob/main/examples/api/conversational-form.sh) |

## Framework Notes

Before deploying an embedded widget to production, whitelist every origin under [Widget Sites](/keys/widgets) and mark the target agent as **Public** on the [Agents](/agents) page (see the [Chat Widgets Guide](widget.md) for all `<ai-chat>` attributes):

- **Static HTML & CMS (WordPress, Webflow, Shopify)**: Paste `<script type="module" src="https://widget.aish.li/widget.js" async></script>` and `<ai-chat agent="your-account/your-agent"></ai-chat>` right before `</body>` (see [`examples/html/index.html`](https://github.com/aish-li/aish.li-integrations/blob/main/examples/html/index.html)).
- **React & Next.js**: Copy [`examples/react/AiChatWidget.tsx`](https://github.com/aish-li/aish.li-integrations/blob/main/examples/react/AiChatWidget.tsx) to load `widget.js` once inside `useEffect` and declare `'ai-chat'` in TypeScript JSX `IntrinsicElements`.
- **Vue**: Register `ai-chat` in your Vite/Vue config under `compilerOptions.isCustomElement: (tag) => tag === 'ai-chat'` so Vue treats `<ai-chat>` as a native custom element.
- **Astro**: Place the module `<script>` and `<ai-chat ... />` tags directly inside your `.astro` layout or page component.

For backend integrations with `POST /v1/responses` or `POST /v1/form`, generate a server-side secret on [API Keys](/keys/api) and follow the [API Reference](/docs/api) and [Forms API Guide](form-api.md).

## AI Coding Agent Skill (SKILL.md)

The [`skills/aish-li/SKILL.md`](https://github.com/aish-li/aish.li-integrations/blob/main/skills/aish-li/SKILL.md) skill teaches AI coding assistants (GitHub Copilot, Claude Code, Cursor, Antigravity) how to wire up `<ai-chat>` embeds, OpenResponses SSE streaming, and JSON Schema conversational forms accurately.

Install it into your project's agent skills directory:

- **GitHub Copilot**: `.github/skills/aish-li/SKILL.md`
- **Claude Code**: `.claude/skills/aish-li/SKILL.md`
- **Antigravity / Open Agents**: `.agents/skills/aish-li/SKILL.md`

```bash
mkdir -p .agents/skills/aish-li
curl -fsSL https://raw.githubusercontent.com/aish-li/aish.li-integrations/main/skills/aish-li/SKILL.md \
  -o .agents/skills/aish-li/SKILL.md
```

AI tools and crawlers can also read our live [`llms.txt`](https://aish.li/llms.txt) index, [`llms-full.txt`](https://aish.li/llms-full.txt), and [OpenAPI 3.1 specification](https://aish.li/openapi/api.yaml).

## Contributing & Support

Pull requests and [GitHub Issues](https://github.com/aish-li/aish.li-integrations/issues) are welcome on [`aish-li/aish.li-integrations`](https://github.com/aish-li/aish.li-integrations) for new starter examples, framework wrappers, and improvements to `SKILL.md`.

For account, billing, or platform support questions, please reach out via our [Contact page](/contact).
