Create Trigger
Create a new agent trigger.
Returns: Created trigger with server-populated fields.
Raises: HTTPException: 403 if non-platform caller attempts cross-org trigger.
Documentation Index
Fetch the complete documentation index at: https://docs.pragmatiks.io/llms.txt
Use this file to discover all available pages before exploring further.
Body
Request body for creating an agent trigger.
Attributes: agent_resource_id: SurrealDB ID of the agno agent resource. runner_resource_id: SurrealDB ID of the agno runner resource. trigger_type: How this trigger fires. target_organization_id: Organization whose events this trigger watches. When set, the trigger fires on events from this org but the agent resource lives in the authenticated org. When None, watches own org. event_filters: Filters for matching lifecycle events (event triggers only). cron_expression: Cron schedule expression (schedule triggers only). is_main_agent: Whether this is the org's main conversation agent. enabled: Whether the trigger starts active.
Types of agent triggers.
event, schedule, conversation Response
Successful Response
Configuration for triggering an agent via events, schedules, or conversations.
Triggers live inside their owner organization's SurrealDB namespace —
the namespace is the organization boundary, so no per-record
organization_id field is carried on the row. The trigger and the
agent resource it invokes always live in the same tenant.
Attributes: id: SurrealDB record ID (populated by database). target_organization_id: Organization whose events this trigger watches. When set, the trigger fires on events from this org but the agent resource lives in the owner tenant. When None, the trigger watches its owner tenant. Only platform agents may set this. agent_resource_id: SurrealDB ID of the agno agent resource. runner_resource_id: SurrealDB ID of the agno runner resource. trigger_type: How this trigger fires. event_filters: Filters for matching lifecycle events (event triggers only). cron_expression: Cron schedule expression (schedule triggers only). is_main_agent: Whether this is the org's main conversation agent. enabled: Whether the trigger is active. created_at: When the trigger was created. updated_at: When the trigger was last modified.
Types of agent triggers.
event, schedule, conversation