Acreum Docs
Plan mode for agents

Read the report

What a preview did, row by row, plus the scheduled jobs and events a commit would set off.

The preview answers 200 with the report under data. Read it top-down: the summary comes first so you can stop early.

KeyWhat it tells you
plan_idThe stored preview. Commit it with { "plan_id": … }. Kept 7 days.
mode, committedpreview / false for a preview.
fingerprintsha256: of the plan body.
summaryok / error / skipped counts, tables_touched, journal_total_debit, first_error.
diff_summaryOne line per step, written for the person supervising the agent.
steps[]Per step: status, http_status, resource { table, id }, response (or error), blocked_by, duration_ms.
writes[]Every row written, grouped by step, table and operation, with ids when the count is 20 or less. Includes rows no step returned (periods, search entries, schedules). job_queue entries carry job_types.
journal_entries[]Each entry the plan posted, with its lines (money as strings) and totals.
scheduled_effects[]Which scheduled jobs will act on the plan's rows, and when they next run.
would_firePreview only: the jobs and events a commit would trigger.
warnings[]What the preview could not do (an email it would send, post-commit work that failed).
truncatedtrue when a cap cut something: a step response over 4 KB, more than 200 writes entries, or more than 500 journal lines.

A preview is ready to commit when

  • summary.error and summary.skipped are 0, and
  • diff_summary, writes, journal_entries, scheduled_effects and would_fire show what you meant.

Errors in the report

summary.first_error and each step's error carry code, detail, pointer and next_action. pointer is a JSON Pointer into the plan you submitted, by index (/steps/3/body/maturity_date), never by ref.

A step's own route errors (VALIDATION_FAILED, CONTRACT_VERSION_MISMATCH, …) appear in that step's error with the route's status. The plan request itself still answers 200.

Resources and writes

steps[].resource is the first row the step inserted or updated, taken from what was actually written, not from the response. For an action step that is the first row the action wrote: for a loan activation, the drawdown document, not the loan.

writes and tables_touched include every row, audit_log and idempotency_keys too. In a preview they roll back with the rest; a commit keeps them.

scheduled_effects: what happens after the commit

Acreum runs scheduled jobs: loan accruals, rate resets, billing windows, late fees, the Work Center sweep. A row an agent creates today is picked up by one of them minutes later. scheduled_effects tells you which, before you commit.

{ "handler": "loan_accrual_generation", "next_run_at": "2026-11-06T19:48:34.060Z",
  "acts_on": { "table": "loans", "ids": ["464a666a-…"], "count": 1 } }
  • One entry per (scheduled job, table): every enabled job that reads a table the plan inserted or updated rows in. Sorted by job, then table.
  • acts_on.ids lists at most 20 ids; count is the full number.
  • next_run_at is the job's stored next run. A time in the past means "on the next tick" (the scheduler ticks every minute).
  • A disabled job is not listed. Rows the plan only deleted are not listed.

Use it to decide what to check. If a job will act on a row you are not sure of, fix it before you commit, or read it back right after: undo works only until something outside the run depends on the row, and a scheduled job is one of those things.

would_fire: the events and jobs a commit would start

A preview cannot deliver the work that runs after a commit, because nothing commits. It runs each step's post-commit work inside the plan's transaction (it rolls back with the rest), records the events that work publishes instead of delivering them, and lists them:

"would_fire": {
  "jobs":   [ { "step": "a1", "job_type": "loan_accrual", "count": 1 } ],
  "events": [ { "step": "a1", "event": "LoanActivatedEvent" } ]
}
  • jobs: the background job types the commit would queue, per step, with counts.
  • events: the domain events each step would publish. Their handlers do not run in a preview, so what they would write is not in writes.
  • What the post-commit work itself writes (a queued job's row, for one) is in the preview's writes, under the step that registered it.
  • If post-commit work fails during the preview, the preview still answers and adds a warning "<ref>: post-commit work failed in preview: <message>". If the time budget runs out first, the warning is "post-commit work not previewed: time budget spent".
  • On a commit, would_fire is null: the work really ran.

Reading runs later

  • GET /v1/plans: your org's runs, newest first (cursor paged). Filter by status, mode, session_id; search matches the description.
  • GET /v1/plans/{id}: one run with its plan and stored report.
  • GET /v1/plans/{id}/report?full=true: the report; for a committed run, writes rebuilt without the 200-entry cap. A step response replaced for being over 4 KB is not kept.

On this page