Event-Driven Triggers: Run Agents on GitHub Pushes, Webhooks & More
Set up triggers that automatically fire agents when events happen — a push to main, a Slack message, an incoming webhook, or a new email.
Agents That React to the World
Schedules are great for recurring work, but sometimes you need agents that respond to events as they happen. A push to main, a customer email, a Slack message, an incoming webhook — triggers let your agents react in real time.
What Is a Trigger?
A trigger connects an event source to an agent action. When the event fires, Computer Agents automatically creates a thread and sends the configured message to your agent.
Supported sources:
- GitHub — push, pull_request, issue, release
- Slack — message, reaction, mention
- Email — incoming email to your agent's address
- Webhook — any HTTP POST to a unique endpoint
- Cron — time-based (like schedules, but via the triggers API)
- Custom — define your own event sources
Creating Your First Trigger
From the SDK
TypeScript
Python
When someone pushes to main, your agent automatically spins up, runs the tests, and reports back.
Event Filtering
Not every event needs a response. Use filters to narrow down which events actually fire the trigger:
TypeScript
Python
Webhook Triggers
For custom integrations, create a webhook trigger. You get a unique URL that accepts POST requests:
TypeScript
Python
Notice the template field — you can use {{event.*}} variables to inject event data directly into the agent's prompt.
Managing Triggers
List all triggers
TypeScript
Python
Enable / disable
TypeScript
Python
Delete
TypeScript
Python
Testing Triggers
Before going live, test-fire a trigger with a sample payload:
TypeScript
Python
This creates a real thread and runs the agent — just like a live event would — so you can verify the behavior before connecting the actual source.
Execution History
Every trigger firing is logged. Review past executions to debug issues or audit activity:
TypeScript
Python
Each execution links to the thread it created, so you can inspect the full agent conversation.
Real-World Examples
Auto-review every PR
Triage incoming support emails
Slack alert responder
Webhook data pipeline
What's Next?
- Agent Orchestration — Chain multiple agents together in workflows
- Scheduling Tasks — Run agents on a recurring cron schedule
- API Quickstart — Full SDK setup and authentication
Ready to get started?
Try Computer Agents today and experience the future of AI-powered automation.
Get Started