Event sources define external triggers that can start agent tasks or workflows. They allow agents to respond to file changes, webhooks, scheduled events, and connection events.
-type:filepaths:# Paths or patterns to watch for changes.-/home/user/documents-/var/logextensions:null# File extensions to monitor (e.g. ['.py', '.md']).ignore_paths:null# Paths or patterns to ignore.recursive:true# Whether to watch subdirectories.debounce:1600# Minimum time (ms) between trigger events.name:file_watcher# Unique identifier for this event source.enabled:true# Whether this event source is active.template:'#Jinja2templateforformattingevents.{%-ifinclude_timestamp%}at{{timestamp}}{%endif%}Eventfrom{{source}}:{%-ifinclude_metadata%}Metadata:{%forkey,valueinmetadata.items()%}{{key}}:{{value}}{%endfor%}{%endif%}{{content}}'include_metadata:true# Control metadata visibility in template.include_timestamp:true# Control timestamp visibility in template.
-type:webhookport:8080# Port to listen on.path:/webhook# URL path to handle requests.secret:null# Optional secret for request validation.name:file_watcher# Unique identifier for this event source.enabled:true# Whether this event source is active.template:'#Jinja2templateforformattingevents.{%-ifinclude_timestamp%}at{{timestamp}}{%endif%}Eventfrom{{source}}:{%-ifinclude_metadata%}Metadata:{%forkey,valueinmetadata.items()%}{{key}}:{{value}}{%endfor%}{%endif%}{{content}}'include_metadata:true# Control metadata visibility in template.include_timestamp:true# Control timestamp visibility in template.
-type:emailhost:imap.gmail.com# IMAP server hostname (e.g. 'imap.gmail.com')port:993# Server port (defaults to 993 for IMAP SSL)username:user@gmail.com# Email account username/addresspassword:'!ENVENV_VAR_NAME'# Account password or app-specific passwordfolder:INBOX# Folder/mailbox to monitorssl:true# Whether to use SSL/TLS connectioncheck_interval:60# How often to check for new emails (in seconds)mark_seen:true# Whether to mark processed emails as seenfilters:{}# Filtering rules for emails (subject, from, etc)max_size:null# Size limit for processed emails in bytesname:file_watcher# Unique identifier for this event source.enabled:true# Whether this event source is active.template:'#Jinja2templateforformattingevents.{%-ifinclude_timestamp%}at{{timestamp}}{%endif%}Eventfrom{{source}}:{%-ifinclude_metadata%}Metadata:{%forkey,valueinmetadata.items()%}{{key}}:{{value}}{%endfor%}{%endif%}{{content}}'include_metadata:true# Control metadata visibility in template.include_timestamp:true# Control timestamp visibility in template.
-type:timeschedule:0 9 * * 1-5# Cron expression for scheduling (e.g. '0 9 * * 1-5' for weekdays at 9am)prompt:Generate daily report# Prompt to send to the agent when the schedule triggers.timezone:null# Timezone for schedule (defaults to system timezone)skip_missed:false# Whether to skip executions missed while agent was inactivename:file_watcher# Unique identifier for this event source.enabled:true# Whether this event source is active.template:'#Jinja2templateforformattingevents.{%-ifinclude_timestamp%}at{{timestamp}}{%endif%}Eventfrom{{source}}:{%-ifinclude_metadata%}Metadata:{%forkey,valueinmetadata.items()%}{{key}}:{{value}}{%endfor%}{%endif%}{{content}}'include_metadata:true# Control metadata visibility in template.include_timestamp:true# Control timestamp visibility in template.
-type:connectionsource:null# Connection source name.target:null# Connection to trigger.event:message_received# Event type to trigger on.condition:null# Condition-based filter for the event.name:file_watcher# Unique identifier for this event source.enabled:true# Whether this event source is active.template:'#Jinja2templateforformattingevents.{%-ifinclude_timestamp%}at{{timestamp}}{%endif%}Eventfrom{{source}}:{%-ifinclude_metadata%}Metadata:{%forkey,valueinmetadata.items()%}{{key}}:{{value}}{%endfor%}{%endif%}{{content}}'include_metadata:true# Control metadata visibility in template.include_timestamp:true# Control timestamp visibility in template.
Event sources are configured with tasks to create reactive workflows:
tasks:monitor_logs:agent:log_analyzerevent_source:type:file_watchpaths:["logs/*.log"]recursive:falseparameters:analysis_level:"detailed"scheduled_backup:agent:backup_agentevent_source:type:timeschedule:"02***"# 2 AM daily