Each trigger object has a type and a type-specific config. At most one trigger of each type may be attached to a function (enforced by a unique index).
Type
Config
Notes
http
{ method?, path?, auth? }
auth defaults to required — anonymous callers get 401 at the edge. Set none only for intentionally public endpoints.
cron
{ schedule, timezone? }
schedule is a cron expression (e.g. */5 * * * *). timezone defaults to UTC.
s3_upload
{ bucket, prefix?, contentTypes? }
Fires when an object lands in the bucket matching prefix and (optionally) the listed MIME types.
webhook
{ secret_required?, allowed_sources? }
Generates a signed webhook URL. allowed_sources is a comma-separated list of provider tags.
websocket
{}
Invoked on each incoming WebSocket frame from the realtime channel.
When agent_tool: true, this function becomes callable from any agent in the same app whose graph spec lists its name under tools.functions[]. See the Agents API for how agents reference function tools.
{
"name": "lookup_account",
"code": "...",
"agent_tool": true,
"agent_tool_description": "Look up a customer by email. Returns id, plan, status.",
"agent_tool_mode": "read_only",
"agent_tool_exposed_to": "developer_only"
}
The 4 agent_tool* fields are returned on GET /functions and GET /functions/{name} so clients can render UI state.