import { Check, CheckProps } from './check'; import { Frequency } from './frequency'; import { Diagnostics } from './diagnostics'; /** * Frequencies for agentic checks are accepted locally and enforced by the * backend according to the account's entitlements. */ export type AgenticCheckFrequency = number | Frequency; /** * Configures the runtime context the agent has access to during a check. * * `agentRuntime` lets you add extra skills on top of the defaults the runner * provides automatically. */ export interface AgentRuntime { /** * Additional skills to load into the agent's runtime, on top of the * defaults the runner provides automatically (currently the * `playwright-cli` skill is preloaded for browser automation). * * Each entry is passed verbatim to `npx skills add` on the runner, so * any third-party skill published to [skills.sh](https://skills.sh) * works — not just Checkly's own. Supported identifier forms: * * - A full skills.sh URL — e.g. `'https://skills.sh/microsoft/playwright-cli/playwright-cli'` * - A `/` shorthand — e.g. `'addyosmani/web-quality-skills'` * - A plain skill name registered on skills.sh — e.g. `'cost-optimization'` * * @example ['addyosmani/web-quality-skills'] */ skills?: string[]; } /** * Configuration properties for {@link AgenticCheck}. * * Agentic checks intentionally expose only the subset of options that the * Checkly platform currently supports for them. Properties such as * `privateLocations`, `runParallel`, `retryStrategy`, `shouldFail`, * `doubleCheck`, `triggerIncident` and `groupId` are omitted because the * platform does not yet honor them for agentic checks. They will be added back * as additive, non-breaking changes once support lands. */ export interface AgenticCheckProps extends Omit { /** * The prompt that defines what the agentic check should verify. * Maximum 10,000 characters. */ prompt: string; /** * How often the check should run. The backend enforces the fastest allowed * cadence according to the account's entitlements. Defaults to * {@link Frequency.EVERY_30M}. * * @example * ```typescript * frequency: Frequency.EVERY_5M * // or equivalently * frequency: 5 * ``` */ frequency?: AgenticCheckFrequency; /** * Configures additional skills the agent can use during execution. */ agentRuntime?: AgentRuntime; } /** * Creates an Agentic Check that uses AI to monitor websites and applications. * * Agentic checks use a prompt to define what should be verified, without * requiring traditional scripts. The AI agent interprets the prompt and * performs the checks. * * @example * ```typescript * new AgenticCheck('homepage-health', { * name: 'Homepage Health Check', * prompt: ` * Navigate to https://example.com and verify: * 1. The page loads with a 200 status * 2. The main heading is visible * 3. No console errors are present * `, * }) * ``` */ export declare class AgenticCheck extends Check { readonly prompt: string; readonly agentRuntime?: AgentRuntime; /** * Constructs the Agentic Check instance. * * @param logicalId unique project-scoped resource name identification * @param props check configuration properties */ constructor(logicalId: string, props: AgenticCheckProps); describe(): string; validate(diagnostics: Diagnostics): Promise; protected validateAgentRuntime(diagnostics: Diagnostics): Promise; synthesize(): { checkType: "AGENTIC"; prompt: string; agentRuntime: { skills: string[]; }; activated: boolean | undefined; muted: boolean | undefined; shouldFail: boolean | undefined; locations: (keyof import("..").Region)[] | undefined; privateLocations: undefined; tags: string[] | undefined; frequency: number | undefined; frequencyOffset: number | undefined; groupId: import("./ref").Ref | null; retryStrategy: import("./retry-strategy").LinearRetryStrategy | import("./retry-strategy").ExponentialRetryStrategy | import("./retry-strategy").FixedRetryStrategy | import("./retry-strategy").SingleRetryRetryStrategy | null | undefined; doubleCheck: boolean | undefined; alertSettings: import("./alert-escalation-policy").AlertEscalation | undefined; useGlobalAlertSettings: boolean | undefined; runParallel: boolean | undefined; triggerIncident: { serviceId: import("./ref").Ref; severity: "MINOR" | "MEDIUM" | "MAJOR" | "CRITICAL"; name: string; description: string; notifySubscribers: boolean; } | undefined; description?: string | undefined; name: string; }; }