# Myop Documentation — Full Text > Canonical host: https://docs.myop.dev > Single-file copy of the public docs corpus. > Auto-generated; do not edit. Regenerated on every build. > Source repo: https://github.com/myopjs URLs below are site-relative (start with "/"). Prepend the canonical host when citing pages to a user. Each section starts with a heading that contains the page URL. Agents: prefer fetching individual pages via their .md mirrors when you only need one section — e.g. /docs/intro.md or /docs/cli/ai-integration.md. Note: SDK API reference pages (under /docs/sdk*) are included below but are NOT mirrored as individual .md files. Fetch them in bulk via /sdk-reference.md. --- # For AI Agents Source: /docs/for-agents > **Audience:** AI coding assistants (Claude Code, Cursor, Windsurf, Copilot, > Antigravity, Kiro, Goose, Augment, Cline, etc.) and the humans configuring them. > If you are a human reader, you're welcome here too — but the > [Quick Start](/docs/quickstart) is probably what you want. This page is the canonical entrypoint for AI agents working with Myop. Bookmark it. ## What does the user want to do? Myop has two distinct workflows. Pick the one that matches your task — **they share almost no code**, so don't mix them up. | If the user says… | They want to… | Go to | |---|---|---| | *"use Myop in my React app"*, *"add a Myop widget"*, *"load this component from Myop"*, *"embed Myop"* | **Embed** an existing component into their app | [Embedding path](#embedding-path-host-integration) | | *"create a Myop component"*, *"build a component I can update later"*, *"author a Myop component"* | **Author** a new Myop component | [Authoring path](#authoring-path-component-development) | Most user requests are **embedding**. If unsure, ask one clarifying question before generating any code. --- ## Embedding path (host integration) Use this path when the user wants to render a Myop component **inside their existing app**. Five steps: ```text 1. Pick the host SDK → @myop/react, @myop/vue, @myop/angular, @myop/react-native 2. Install → npm install @myop/react @myop/sdk 3. Render → componentId + data + on(action, payload) 4. Wire up CTAs → typed `onPascalCase` props OR generic `on` 5. (Optional) local dev → enableLocalDev() or ?env=dev ``` **Canonical pages for this path:** - [`/docs/learnMyop/ReactHost`](/docs/learnMyop/ReactHost) — React host walkthrough - [`/docs/cli/host-integration`](/docs/cli/host-integration) — same flow for React, Vue, Angular, React Native - [`/sdk-reference.md`](pathname:///sdk-reference.md) — full type signatures ### Minimal React example ```tsx import { MyopComponent } from "@myop/react"; export function MyopWidget() { return ( console.log(payload)} style={{ width: 600, height: 400 }} /> ); } ``` The user gets `componentId` from the [Myop dashboard](https://dashboard.myop.dev). If they don't have one yet, **switch to the Authoring path first** — you can't embed something that doesn't exist. :::danger Never create iframes manually Always use ``. Never hand-roll an `