API & Reference > API & SDK
Demo: Sentry monitoring with SDK
# Demo: Sentry monitoring with SDK Turn production errors into draft pull requests: this demo builds a small TypeScript "Sentry monitor" service that listens for specific Sentry alerts, such as a Go nil pointer dereference, and triggers 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](/platform/environments/) so the agent can inspect the repo and propose a fix. The full source is in the [Sentry monitor example repository](https://github.com/warpdotdev/warp-agents-sdk-demo-sentry-monitor). <VideoEmbed url="https://www.youtube.com/watch?feature=youtu.be&v=fHQXLg9ybi4" title="Monitoring Sentry with the TypeScript SDK demo video" /> ## What the demo covers * Using the [TypeScript SDK](https://github.com/warpdotdev/oz-sdk-typescript) to trigger agent runs and retrieve run details. * Handling run lifecycle states (queued → running) to reliably 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. ## Related pages * [Oz API & SDK](/reference/api-and-sdk/) - The API surface and SDKs the demo builds on. * [API & SDK quickstart](/reference/api-and-sdk/quickstart/) - Create and monitor your first run in about five minutes. * [Cloud agents quickstart](/platform/quickstart/) - Set up the environment an agent run executes in.Help me use this reference: https://docs.warp.dev/reference/api-and-sdk/demo-sentry-monitoring-with-sdk/Build a Sentry webhook handler that triggers agents to investigate errors and create draft PRs.
Turn production errors into draft pull requests: this demo builds a small TypeScript “Sentry monitor” service that listens for specific Sentry alerts, such as a Go nil pointer dereference, and triggers 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.
What the demo covers
Section titled “What the demo covers”- Using the TypeScript SDK to trigger agent runs and retrieve run details.
- Handling run lifecycle states (queued → running) to reliably 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.
Related pages
Section titled “Related pages”- Oz API & SDK - The API surface and SDKs the demo builds on.
- API & SDK quickstart - Create and monitor your first run in about five minutes.
- Cloud agents quickstart - Set up the environment an agent run executes in.