Skip to main content

Overview

Assertions describe what database changes you expect after the agent runs. They’re written in a JSON DSL that gets evaluated against the computed diff.

Schema

Top-Level Fields

Assertion Fields


Diff Types

added - New Records

Check that new rows were inserted:

changed - Modified Records

Check that existing rows were updated:

removed - Deleted Records

Check that rows were deleted:

Predicate Operators

Equality Operators

Comparison Operators

String Operators

Null Operators

Set Operators

Array Operators


Combining Predicates

AND (implicit)

Multiple conditions in where are ANDed:

AND (explicit)

OR

Nested Logic


Expected Count

Exact Count

Bounded Count


Expected Changes

For diff_type: "changed", specify field transitions:

Check New Value Only

Check Both Old and New

Multiple Field Changes


Strict Mode

With strict: true, the evaluation fails if there are changes beyond what’s asserted:
If strict: true and the agent also changed priority, the assertion fails even if status was correctly changed.

Ignore Fields

Ignore fields let you exclude certain fields when comparing diffs. This is useful for:
  • Auto-generated fields (id, created_at, updated_at)
  • Timestamps that change on every run
  • Fields set by the system, not the agent

Using Ignore Fields

Common Ignore Fields by Service

Slack:
Linear:

Entity-Specific Ignore Fields

You can ignore fields for specific tables:
Without ignore_fields, auto-generated timestamps and IDs would cause assertion failures even when the agent performed the correct action.

Complete Examples

Slack: Post Message to Channel

Slack: Add Reaction

Linear: Create Issue with Label

Linear: Update Issue Priority


Table Names by Service

Slack

Linear


Next Steps

Example Benchmarks

See built-in Slack and Linear test suites

Creating Test Suites

Organize and manage your tests