Skip to content

feat(cli): add AgenticCheck construct#1268

Open
thebiglabasky wants to merge 5 commits intomainfrom
herve/AI-114/agentic-check-cli-construct
Open

feat(cli): add AgenticCheck construct#1268
thebiglabasky wants to merge 5 commits intomainfrom
herve/AI-114/agentic-check-cli-construct

Conversation

@thebiglabasky
Copy link
Copy Markdown
Contributor

@thebiglabasky thebiglabasky commented Mar 20, 2026

Summary

  • Adds AgenticCheck construct for defining AI-powered monitoring checks via checkly.config.ts
  • Extends Check (no runtime/bundling needed) with a prompt field (required, max 10,000 chars)
  • Validates frequency minimum of 30 minutes (agentic checks are expensive)
  • Adds AGENTIC to CheckTypes enum and analytics mappings

Usage

import { AgenticCheck } from 'checkly/constructs'

new AgenticCheck('homepage-health', {
  name: 'Homepage Health Check',
  prompt: 'Navigate to https://example.com and verify the page loads correctly.',
  frequency: 30,
  locations: ['eu-west-1'],
})

Backend dependency

Requires the companion backend PR to update the CLI deploy schema: https://github.com/checkly/monorepo/pull/1098

Test plan

  • 6 unit tests: basic synthesis, config defaults, group mapping, prompt validation (empty/too long), frequency validation
  • TypeScript compiles cleanly
  • Tested locally with checkly deploy --preview against local backend

🤖 Generated with Claude Code

@MichaelHogers
Copy link
Copy Markdown
Contributor

@thebiglabasky 🔥

thebiglabasky and others added 5 commits April 6, 2026 12:02
Adds the AgenticCheck construct that lets users define agentic checks
in their Checkly project via checkly.config.ts. Agentic checks use a
prompt string (no scripts/bundling) to define what the AI agent should
verify.

- Add AGENTIC to CheckTypes enum
- Create AgenticCheck extending Check (not RuntimeCheck)
- Validate prompt (required, max 10000 chars) and frequency (min 30)
- Add construct export and analytics mapping
- Add 6 tests covering synthesis, defaults, groups, and validation

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Agentic checks always run in parallel for better reporting UX.
The construct omits runParallel from props (users can't override it)
and hardcodes it to true in synthesize().

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Lock down AgenticCheckProps to only the subset of CheckProps the
Checkly platform currently honors for agentic checks. Omits locations,
privateLocations, runParallel, retryStrategy, shouldFail, doubleCheck,
triggerIncident and groupId at the type level, and restricts frequency
to the discrete set exposed in the webapp builder.

Defensive overrides in the constructor ensure project-level config
defaults for any of these fields are also ignored, so the construct
never claims to support what the platform won't honor.

These restrictions can be relaxed additively (without breaking changes)
once the platform supports the corresponding capabilities for agentic
checks.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…cess

Adds an `agentRuntime` prop to AgenticCheck that declares the runtime
context the agent has access to during execution: which skills it can
use and which environment variables it is permitted to read.

agentRuntime is the explicit security boundary for the agent. Anything
not declared here is unavailable at runtime, which keeps the blast
radius of any prompt injection as small as possible. Environment
variables accept either bare names or `{ name, description }` objects;
descriptions are passed to the agent so it can decide when to read each
variable, and are validated to stay within the runner's 200-char limit.

The construct always synthesizes a complete agentRuntime payload (with
empty arrays when unset), so the backend has unambiguous source-of-truth
semantics: omitted skills/env vars mean "the agent should not have
them", not "preserve whatever was there before". The backend translates
this clean shape into the existing agenticCheckData storage blob.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@thebiglabasky thebiglabasky force-pushed the herve/AI-114/agentic-check-cli-construct branch from 9e02521 to e24774d Compare April 6, 2026 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants