AgentStack Docs

Browser integration boundaries

Keep browser input, supported widget forms, and privileged server actions separate.

Use browser input to collect a visitor's intent. Send that intent to a backend that you control. Validate the input on the server, and authenticate the caller when needed. Call the AgentStack REST API with a server-held API key. This method keeps a clean boundary between an untrusted browser and privileged organization operations. For an AI-invoked widget form, use the supported Client-side forms contract instead of an improvised browser callback.

Design each backend action as a small, recoverable workflow. Give the visitor a pending state. If validation fails, show a useful error. Make retries safe where possible. A submission must not rely on a chat transcript being present. It must not assume that the widget can authorize administrative work. If an integration needs to create a contact, send a message, or update agent data, make the operation explicit in the backend. Use the documented REST response envelope.

Keep consent and privacy clear. Send only the fields that the requested outcome needs. Describe what happens after submission. The current browser custom-action registration surface does not have a complete widget execution bridge. Do not treat it as a supported workflow. For a verified contact flow, use the dedicated identity-verification endpoints instead of a browser-only proof mechanism.