Skip to main content
POST
/
verifier
curl -X POST http://localhost:3000/verifier \
  -H "Content-Type: application/json" \
  -d '{
    "sessionId": "test-session",
    "checks": [
      {
        "id": "check-event-created",
        "type": "state",
        "table": "events",
        "asserts": [
          {
            "comparator": "eq",
            "function": "object_contains",
            "function_args": ["_result[*]", {"title": "Team Meeting"}],
            "value": true
          }
        ]
      }
    ]
  }'
{
  "session_id": "test-session",
  "success": true,
  "verifiers": [
    {
      "id": "check-event-created",
      "operator": "state_comparison",
      "success": true,
      "asserts": [
        {
          "actual_value": true,
          "expected_value": true,
          "comparator": "eq",
          "success": true,
          "matching_results": [
            {
              "id": 1,
              "title": "Team Meeting",
              "startTime": "2024-11-20T14:00:00Z"
            }
          ]
        }
      ]
    }
  ]
}
Run verification checks to validate agent actions. The verifier checks both database state (what changed) and interaction logs (what was done) to provide comprehensive verification.

Request Body

sessionId
string
required
Session identifier for the test
checks
array
required
Array of verification checks to perform

Assertion Object

comparator
string
required
Comparison operator: eq, neq, gt, gte, lt, lte, in, contains, regex, deep_equal
function
string
Utility function to call (e.g., object_contains, count)
function_args
array
Arguments for the utility function. Use _result[*] to iterate through array results.
value
any
required
Expected value for comparison

Response

session_id
string
Session identifier
success
boolean | string
Overall result: true (all passed), false (at least one failed), or 'PENDING' (rubric checks pending)
verifiers
array
Array of individual check results
curl -X POST http://localhost:3000/verifier \
  -H "Content-Type: application/json" \
  -d '{
    "sessionId": "test-session",
    "checks": [
      {
        "id": "check-event-created",
        "type": "state",
        "table": "events",
        "asserts": [
          {
            "comparator": "eq",
            "function": "object_contains",
            "function_args": ["_result[*]", {"title": "Team Meeting"}],
            "value": true
          }
        ]
      }
    ]
  }'
{
  "session_id": "test-session",
  "success": true,
  "verifiers": [
    {
      "id": "check-event-created",
      "operator": "state_comparison",
      "success": true,
      "asserts": [
        {
          "actual_value": true,
          "expected_value": true,
          "comparator": "eq",
          "success": true,
          "matching_results": [
            {
              "id": 1,
              "title": "Team Meeting",
              "startTime": "2024-11-20T14:00:00Z"
            }
          ]
        }
      ]
    }
  ]
}