Back to Tutorials
Automation·
February 14, 2026
·5 min read

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

example.ts
Loading...

Python

example.py
Loading...

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

example.ts
Loading...

Python

example.py
Loading...

Webhook Triggers

For custom integrations, create a webhook trigger. You get a unique URL that accepts POST requests:

TypeScript

example.ts
Loading...

Python

example.py
Loading...

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

example.ts
Loading...

Python

example.py
Loading...

Enable / disable

TypeScript

example.ts
Loading...

Python

example.py
Loading...

Delete

TypeScript

example.ts
Loading...

Python

example.py
Loading...

Testing Triggers

Before going live, test-fire a trigger with a sample payload:

TypeScript

example.ts
Loading...

Python

example.py
Loading...

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

example.ts
Loading...

Python

example.py
Loading...

Each execution links to the thread it created, so you can inspect the full agent conversation.


Real-World Examples

Auto-review every PR

output
Loading...

Triage incoming support emails

output
Loading...

Slack alert responder

output
Loading...

Webhook data pipeline

output
Loading...

What's Next?

Ready to get started?

Try Computer Agents today and experience the future of AI-powered automation.

Get Started