Getting started
Install Blinq with an AI coding agent
This page is what your AI agent fetches when you paste the install prompt from the Blinq dashboard. It tells the agent exactly what to do and what not to do.
Inputs to parse from the user's message
Before making any changes, extract these exact values from the message that contained this URL:
widget public tokenAPI base URLwidget script URLnpm packageMCP endpoint- optional
Target domain - optional
Target site base URL
If any required install value is missing, stop and ask the user only for the missing value.
Required workflow
- Inspect the codebase first.
- Preserve existing repo patterns. Make minimal, safe changes.
- Choose the install path:
- React or Next.js → npm package
@blinq_ai/widget. - Anything else → script-tag embed using the provided widget script URL.
- React or Next.js → npm package
- Implement only the normal browser widget install for this app.
- Do not add API keys, OpenAPI specs, server-side MCP integrations, backend tool wiring, or unrelated AI agent setup.
- When you are done, report the files you changed, the exact mount point, and any env values the user must still set manually.
React / Next.js path
npm install @blinq_ai/widgetMount the widget from the app shell, root layout, or shared client-side wrapper. Pass the values from the user's message:
import { BlinqWidget } from "@blinq_ai/widget";
<BlinqWidget
publicToken={process.env.NEXT_PUBLIC_BLINQ_TOKEN!}
apiBaseUrl="https://app.blinq.kz"
mcpEndpoint="https://app.blinq.kz/mcp"
/>Script-tag path
<blinq-widget
data-public-token="<widget public token>"
data-api-base-url="<API base URL>"
></blinq-widget>
<script src="<widget script URL>" async></script>Add this to the shared HTML layout that wraps the user-facing app. Keep the integration additive — do not rewrite existing frontend logic.
Domain & runtime notes
If the user provided Target domain or Target site base URL, treat them as runtime guidance only. Do not invent extra server-side configuration.
Final output format
End with a concise summary that includes:
- changed files,
- where the widget was mounted,
- whether you used the npm path or the script-tag path,
- any follow-up manual verification step for the user.