Web chat · The agent’s website bot
Web chat · The agent’s website bot
The bot this agent publishes to the web. An agent has at most one, so this is a single resource rather than a list and the agent identifies it.
An unpublished agent gives 404 — which arrives as a tool error reading
“This agent has no website bot”, meaning publish, not something is wrong.
There is usually no need to ask first: publishing is idempotent, so a
caller that just wants a bot can publish and read the result. Use this to
read an existing bot’s snippet and settings.
Read embed_snippet from here: it is the exact tag the customer pastes,
assembled server-side from the host that serves the widget. A snippet built
by hand names the wrong host and then fails silently on the customer’s own
page rather than in ours. demo_url is a page of ours carrying the same
snippet, for sign-off before it goes near the real site; it needs status
to be active.
lead_form_policy and lead_form_fields are what the widget will actually
ask. They are resolved, and differ from the stored lead_form when it names
a policy but no fields — read these, not lead_form.
resource: agent://build-guide covers publishing an agent to a website.
Authentication
Header authentication of the form Api-Key <token>
Bearer authentication of the form Bearer <token>, where token is your auth token.
Path parameters
Agent UUID or slug — both are accepted. From agents_listAgents.
