Skip to content

Factories > API & SDKs

Demo: Sentry monitoring with SDK

Open in ChatGPT ↗
Ask ChatGPT about this page
Open in Claude ↗
Ask Claude about this page
Copied!

Build a Sentry webhook handler that triggers agents to investigate errors and create draft PRs.

A small TypeScript “Sentry monitor” service turns specific Sentry alerts, such as a Go nil pointer dereference, into draft pull requests by triggering a Warp cloud agent to investigate.

The service validates the webhook, extracts the stack trace, and injects it into an agent run inside a cloud environment so the agent can inspect the repo and propose a fix. The full source is in the Sentry monitor example repository.

To route the alert through a factory’s agents and workflow instead, dispatch it with factory endpoints or a custom webhook. This demo covers standalone cloud agent intake.

  • Using the TypeScript SDK to trigger agent runs and retrieve run details.
  • Handling run lifecycle states (queued → running) to fetch a session link for debugging.
  • Running agents inside a cloud environment so they can investigate real code, run tests, and validate fixes.
  • Building a lightweight Sentry webhook server that filters, validates, and routes only the right errors to an agent.
  • Ending the workflow in a draft GitHub pull request for a maintainer to review, instead of silent autonomous changes.