Put a trigger on an Agent
Creates or replaces the Agent's trigger triggerId of origin api: a Trigger exactly as a definition's runtime.triggers entry holds it (one of schedule with timezone, at or webhook; session; prompt), and an optional title. A new one is active with its next time; a replaced one gets its next time again and keeps its status, so a paused one stays paused. The same body again changes nothing and records no event. The checks and limits are a definition's; runtime.limits.triggers.count covers the triggers the Agent's agents made and those put here. Upgrades never touch it; DELETE removes it. Records agent.trigger_created or agent.trigger_updated (with changed) on the Agent's events. Host feature api-triggers.
AuthorizationBearer <token>An application key of the Tenant (PUT /v1/tenant/keys/{keyId}), or Studio's key, derived from the admin key. With Nylorun-Subject and Nylorun-Scopes, it acts for that person, narrowed to those scopes. Never accepted from a browser (Origin).
agentId*stringThe Agent id, percent-encoded
triggerId*stringThe trigger's id: in the manifest's runtime.triggers, or the one its agent gave it
Nylorun-Protocol*stringThe protocol version, 18
Nylorun-Subject?stringThe person an application key acts for
Nylorun-Scopes?stringThe subject's space-separated scopes; required with a subject
application/json- body
schedule?string^\S+(\s+\S+){4}$timezone?string1 <= lengthat?stringdate-timewebhook?"standard-webhooks""standard-webhooks"session*string1 <= length <= 200prompt*string1 <= lengthtitle?string1 <= length <= 80The trigger, as the list shows it
application/json- response
id*stringkind*string"schedule""at""webhook""wake"origin*string"manifest""agent""api""wake"title*string|nullcreatedSessionId*string|nullprincipal?string|nullstatus*string"active""paused""completed"pausedReason*string|nullschedule?stringtimezone?stringat?stringsession*stringnextRunAt*string|nulllastRunAt*string|nullwebhookUrl?stringsecretSet?booleanprompt?stringcurl -X PUT "https://example.com/v1/agents/string/triggers/string" \ -H "Nylorun-Protocol: string" \ -H "Content-Type: application/json" \ -d '{ "session": "string", "prompt": "string" }'{ "id": "string", "kind": "schedule", "origin": "manifest", "title": "string", "createdSessionId": "string", "principal": "string", "status": "active", "pausedReason": "string", "schedule": "string", "timezone": "string", "at": "string", "session": "string", "nextRunAt": "string", "lastRunAt": "string", "webhookUrl": "string", "secretSet": true, "prompt": "string"}List an Agent's triggers GET
Each trigger its manifest declares, each its agents made with the `triggers` tool (`origin: agent`, with the title and the session that made it), and each a client put over the API (`origin: api`, with the title and the `principal` that put it), with what the Agent holds of it: its status (`active`, `paused` with a reason, `completed` for an `at` that ran), its prompt, when it runs next and last ran. A session's booked wake is not listed.
Delete a trigger an agent made or a client put DELETE
Deletes a trigger one of the Agent's agents made with the `triggers` tool (`origin: agent`) or a client put (`origin: api`), with `agent.trigger_deleted` on the Agent's events; its runs stay. A trigger its manifest declares is refused (`trigger_from_manifest`): save a version without it, or pause it.