Developers
Developer guide to the Yedric widget: embed it, secure sessions with HMAC, use the JavaScript API, and connect webhooks, custom apps and MCP.
Widget
Section titled “Widget”The widget is a single script tag and a web component, no build step, no dependencies. Add it to your page and it just works. From there you can theme it, wire up JavaScript events, or lock sessions to individual users with HMAC signing.
- Embedding the Widget: quick start, attribute reference, common mistakes
- Secure Mode: HMAC signing to scope sessions per user; Node / PHP / SubtleCrypto examples
- Advanced Configuration: theming, layout, iframe/Shopify, client-side tool handling, programmatic open, debug
- JavaScript API:
window.Yedricmethods, events, TypeScript types - Client Events: report things that happen in your own UI to the assistant, and let it react
- MCP Server: manage assistants and read conversation data from Claude Desktop, Claude Code, and other MCP clients
- Webhooks: subscribe to events, verify the signature, and handle retries
- Custom Apps: render your own panel beside a conversation
In this section
Embedding the WidgetAdd the yedric-widget web component to any page with one script tag, using your agent ID, and review the attributes and common mistakes.
Secure ModeTurn on Yedric secure mode to sign chat users with HMAC-SHA256 so sessions and history follow a verified identity across visits and devices.
Advanced ConfigurationFind which Yedric widget settings live in the dashboard and which you set in code, plus advanced options for a working embed.
JavaScript APIReference for the window.Yedric global and the yedric-widget element, including how to open the chat, send prompts, and use setConfig and getConfig.
Client EventsReport events from your app, like a finished test run or a failed job, to the Yedric assistant with Yedric.event so it can react or note them.
MCP ServerConnect Claude Desktop, Claude Code, Cursor or ChatGPT to the hosted Yedric MCP server to manage assistants and read conversation data.
WebhooksSend Yedric events to your own URL with signed webhooks, check signatures, understand automatic retries, and read the delivery log.
Custom AppsBuild a Yedric custom app that shows your own HTML in a panel beside each conversation, using the visitor context Yedric posts to your URL.
