AGENT WORKFLOW · RUNNABLE EXAMPLE

Reconcile two inventory or CRM snapshots

A repeat data import needs to distinguish changed records from new or removed ones without treating a missing field as an explicit null.

A bounded tool call for your agent

Your agent supplies JSON to record_reconcile and reads a deterministic result. Its operator decides what happens next.

  1. Choose a stable string or safe-integer key and the fields that matter.
  2. Supply up to 50 rows per snapshot. Unique typed keys are required; ambiguous keys return needs_review.
  3. Inspect added, removed, changed and unchanged counts. Apply changes only in your own authorised workflow.

Example input

Synthetic demonstration data, not a customer record.

{
  "before": [
    {
      "id": "A",
      "stock": 12,
      "price": 29
    },
    {
      "id": "B",
      "stock": 5,
      "price": 19
    }
  ],
  "after": [
    {
      "id": "A",
      "stock": 10,
      "price": 29
    },
    {
      "id": "C",
      "stock": 8,
      "price": 39
    }
  ],
  "key": "id",
  "fields": [
    "stock",
    "price"
  ]
}

Actual engine output

{
  "service": "record_reconcile",
  "version": "0.5.0",
  "status": "resolved",
  "flags": [],
  "summary": "1 added · 1 removed · 1 changed · 0 unchanged",
  "added": [
    {
      "key": "C",
      "after_index": 1
    }
  ],
  "removed": [
    {
      "key": "B",
      "before_index": 1
    }
  ],
  "changes": [
    {
      "key": "A",
      "before_index": 0,
      "after_index": 0,
      "fields": [
        {
          "field": "stock",
          "before": {
            "present": true,
            "value": 12
          },
          "after": {
            "present": true,
            "value": 10
          }
        }
      ]
    }
  ],
  "unchanged": 0,
  "checked_fields": [
    "stock",
    "price"
  ],
  "scope": "Exact comparison of supplied snapshots only. Missing fields differ from explicit null. Unselected fields are discarded before storage; no live monitoring or automatic changes."
}

Limits that matter

Values are compared exactly. No fuzzy identity resolution, live monitoring, external record lookup or automatic updates.

One completed comparison. Missing or duplicate identities require review and are free. Hosted price: 0.0050 USDC per completed operation. Local execution is free.

Use this check in your agent

One completed hosted batch costs 0.005 USDC. Start with the unsigned quote, then use your approved authorizer and a 5000-unit maximum if you choose to purchase.

Inspect locally