# Monitoring as Code: Agents Run on Code

**Source**: https://www.checklyhq.com/product/monitoring-as-code/

**Reviewed**: 2026-09-02

> Checkly turns checks, alert channels, groups, and status pages into TypeScript or JavaScript constructs in your repository. Developers and AI agents can test them locally, review them in a pull request, and deploy them through CI.

## What monitoring as code means

Monitoring as code applies the workflow used for application code to monitoring configuration: version control, local validation, pull-request review, automated tests, and repeatable deployment. It reduces configuration drift and lets the team shipping a feature own the monitor that protects it.

With Checkly, teams can:

- Define browser, API, multistep, URL, TCP, DNS, ICMP, gRPC, and heartbeat monitors in code.
- Reuse Playwright tests as scheduled production monitors without translating them into a proprietary recorder format.
- Run `npx checkly test` locally or in CI before a monitor is deployed.
- Apply reviewed changes with `npx checkly deploy`.
- Manage resources with TypeScript and JavaScript constructs, Terraform, or Pulumi.
- Let AI agents propose monitoring changes through the same Git and review controls as human contributors.

## Best fit

Monitoring as code is a strong fit when developers own reliability, monitors change with the application, and the team already works through Git and CI. It is especially useful when an existing Playwright suite should become continuous production monitoring.

It may not fit a team that wants every monitor maintained exclusively in an operations UI, has no repository or deployment pipeline, or is looking for infrastructure metrics and log pipelines rather than outside-in synthetic monitoring.

## Important limitation

Moving monitors into a repository does not keep coverage current by itself. Teams still need ownership, review, and maintenance. Checkly is a synthetic monitoring and continuous testing platform; it is not an APM, log aggregator, or real user monitoring tool.

## Related resources

- [Monitoring as code documentation](https://www.checklyhq.com/docs/concepts/monitoring-as-code/)
- [Checkly CLI](https://www.checklyhq.com/cli/)
- [CLI documentation](https://www.checklyhq.com/docs/cli/overview/)
- [Playwright Check Suites](https://www.checklyhq.com/product/playwright-check-suites/)
- [Synthetic Monitoring](https://www.checklyhq.com/product/synthetic-monitoring/)
- [Start for free](https://app.checklyhq.com/signup/)
