---
url: https://chartbuddy.io/embed/docs/connect-ai/opencode.md
---
# Connect OpenCode

Use **[OpenCode](https://opencode.ai)** agents to build Embed pages and artifacts with `@chartbuddy.io/embed`.

## Three steps

### 1. Seed context

In a new session, point the agent at:

* [`llms.txt`](https://unpkg.com/@chartbuddy.io/embed/llms.txt) (index → follow linked `.md` pages)
* [Quick start](/getting-started/quick-start)
* [Canvas & sizing](/concepts/canvas)

```text
ChartBuddy Embed – new Insight(), @chartbuddy.io/embed from unpkg or npm.
1) https://unpkg.com/@chartbuddy.io/embed/llms.txt
2) Fetch linked docs .md pages as needed
Host must have definite size (aspect-ratio or fixed px).
```

### 2. Build

Same patterns as [Connect Cursor](/connect-ai/cursor): HTML artifact or project files, `chartData` + host CSS.

### 3. Verify

[Visual QA](/quality-assurance/visual-qa) loop – confirm the chart fills the host.

## Optional: Hub MCP

OpenCode can also run Chartbuddy Hub MCP – see [Hub – Connect OpenCode](https://chartbuddy.io/hub/docs/connect-mcp/opencode). Embed and Hub MCP are separate integrations.
