Public automation API
Trigger approved automations from Lovable, v0, Next, Vercel, and other external apps with scoped API keys or hosted webhook URLs.
Use the public automation API when an external app needs to start an approved AKOS automation without exposing the internal JSON-RPC surface. Create scoped keys in Connections › External apps. For workspace-internal webhook triggers (sidecar paths, not hosted automation URLs), see Triggers.
Choose a path
| Path | Use it when | Secret handling |
|---|---|---|
| API key run | Your app has a server route, server action, edge function, or backend job. | Keep the API key in server-side environment variables only. |
| Hosted webhook | You want a stable automation URL generated from Triggers. | Current hosted ingress uses the same server-side API key auth. |
Never put AGENTSKIT_API_KEY in browser code, public .env files, client components, or generated frontend snippets.
Create an API key
- Open Connections.
- Select External apps.
- Create a scoped key with the automations it may run.
- Copy the raw key once and store it in your server environment as
AGENTSKIT_API_KEY.
Keys are stored by hash. AKOS shows the raw secret only when the key is created.
Server-side run
Use this from Lovable, v0, Next, Vercel, or any app builder by calling your own server endpoint. The app builder should never receive the AKOS key.
Hosted webhook
Create or edit a webhook trigger in Automations > Triggers. The form shows the hosted endpoint:
Example:
The request body becomes the automation input.
Read run status
Status reads are scoped to runs created by the calling key.
Security notes
- Keys are org-scoped and may be limited to specific automation ids.
- Revoked keys stop before reaching the runner.
/rpcremains internal-only; external apps only use/v1/automations/*.- Use
Idempotency-Keyfor form submissions and retries. - Hosted webhook HMAC secrets are not part of this first version. Use API key auth until a dedicated webhook signing secret is available.
Related screens
| Need | Go to |
|---|---|
| Create / revoke API keys | Connections › External apps |
| Workspace webhook paths | Automations |
| Target workflows | Workflows |
| Run history | Activity |