script.js when an agent submits a form or when a page view is detected from a known AI user-agent. Also callable directly from your own code.
Request
| Field | Type | Required | Description |
|---|---|---|---|
api_key | string | Yes | Your website’s API key |
event_type | string | Yes | view, completion, or error |
action_tool_name | string | No | The tool_name of the action being tracked |
agent_name | string | No | Name of the AI agent (from user-agent detection) |
page_url | string | No | URL of the page the event occurred on |
Event types
| Type | When it’s sent |
|---|---|
view | An AI agent is detected on a page |
completion | A form is successfully submitted |
error | A form submission fails |
Response
success_prompt (on completion) or failure_prompt (on error) so your code can forward it to the agent.
CORS
Accepts cross-origin requests (Access-Control-Allow-Origin: *).
