4 ready-to-build workflows

AI agent workflows for Web form filling & back-office data entry

The agent reads the source, drafts every field and fills the form through a browser-automation MCP — then stops. A human clicks submit, and no agent ever types a password, card or ID.

Each recipe below is expressed only in VegaDūta's real workflow building blocks — Trigger, Agent, Knowledge, Condition, Approval, Output, Tool (MCP), Voice, Device, Loop, Code and Parallel — so it maps 1:1 to something you can assemble in the Workflow designer. Consequential actions always pass a human Approval step.

1. Invoice lines → supplier portal draft, human submits

A VA opens a PDF invoice on one screen and the customer's supplier portal on the other, and retypes 400 line items — code, description, quantity, unit price, tax code — over two days. Transposed digits surface a month later as a rejected payment, and the same invoice format arrives again next month.

Trigger: Email (invoice received) / Webhook (document dropped)

How the workflow runs

  1. Trigger

    Invoice arrives. An Email trigger on the AP inbox, or a Webhook from your document drop, starts the run with the invoice file.

  2. Knowledge

    Load the field map. A Knowledge node supplies the portal's field map and this customer's coding rules — which portal field each invoice column feeds, and which tax codes are valid.

  3. Loop

    For each invoice line. A Loop node iterates the line items. 400 lines is 400 small, isolated, individually-checkable passes rather than one enormous prompt that quietly drops row 287.

  4. Agent

    Economy extractor per line. A cheap extractor turns one line into strict JSON {code, description, qty, unitPrice, taxCode, confidence}. Running once per line, its tier sets the cost of the whole job.

  5. Code

    Validate and total. A Code node re-computes line totals and the invoice total arithmetically — never trusting the model's arithmetic — and a user-defined SpEL tool flags rows outside tolerance or below the confidence floor.

  6. Condition

    Ambiguous line?. A Condition node routes flagged rows to the premium arbiter and lets clean rows through — so the expensive model sees the handful of genuinely unclear lines, not all 400.

  7. Agent

    Premium arbiter on the unclear rows. A stronger model resolves the ambiguous minority: a merged description cell, a missing tax code, a credit line that reads like a charge.

  8. Tool (MCP)

    Fill the portal form (browser-automation MCP). A Tool (MCP) node drives a browser-automation MCP server — a Playwright-style server registered in the platform's MCP registry — to enter the validated rows into the portal form. VegaDūta ships no built-in browser; this connector IS the mechanism. It fills, and it stops short of submit.

  9. Approval

    A human clicks submit. An Approval node holds the completed draft with a field-by-field diff against the source invoice. Submission is the irreversible act, so a person performs it. The portal login itself is done by that person or via a secrets-managed integration — never typed by an agent.

  10. Output

    File the evidence. An Output node records the submitted reference, the approver and the timestamp back to your AP system via a Tool (MCP) node, and notifies the requester on Email or Slack.

Channels & connectors

  • Email
  • Webhook
  • Slack
  • Knowledge base
  • Approval / HITL
  • Tool (MCP → browser-automation server)
  • Tool (MCP → AP / accounting system)

Outcome

The portal form arrives pre-filled and arithmetically reconciled with a per-field diff against the source invoice, and a human spends their time checking and submitting rather than typing.

Why it helps

The mechanism is per-line isolation plus deterministic arithmetic: each line is extracted in its own small pass so a long invoice cannot silently lose a row, and totals are computed in code rather than by a model, so a transposed digit surfaces as a tolerance flag before submission instead of as a rejected payment a month later.

Build spec

2 agents1 economy line extractor (once per line, via the Loop node) + 1 premium arbiter (only on flagged lines). The form-filling itself is a Tool (MCP) node against a browser-automation server, not an agent capability. · Pattern: Loop (per line) → economy extract → Code validates arithmetic → Condition escalates only flagged rows → premium arbiter → MCP browser fills the draft → human submits

System prompt (paste-ready)

You extract ONE invoice line into strict JSON: {code, description, qty (number), unitPrice (number), lineTotal (number), taxCode, confidence (0-1), issue|null}. Use ONLY this line and the field map from Knowledge. Never infer a missing tax code from what is typical — leave it null and set a low confidence. Never round, never re-compute a total to make it agree, and never carry a value down from the line above. If the line is a credit, a discount or a header row rather than a chargeable item, say so in `issue` and do not force it into the item schema. You prepare a draft only: you never submit anything, and you never enter a password, card number or government ID into any field.

Agent roles & model tiers

  • Line extractor (per line) Economy tier — 400 lines means 400 invocations; this single tier choice dominates the cost of the entire job

    One line → schema-valid JSON against the Knowledge field map. Nulls plus low confidence instead of plausible guesses. No arithmetic reconciliation, no value carried over from the previous line.
  • Ambiguity arbiter (flagged lines only) Premium tier — affordable precisely because it sees the handful of unclear rows rather than the full invoice

    Resolve one flagged line using the full invoice context and the coding rules. If it remains genuinely unclear, return NEEDS_HUMAN with the specific question — an honest escalation is cheaper than a wrong line in a submitted invoice.

MCP connectors

  • Browser-automation MCP (Playwright-style server registered in the MCP registry) — the ONLY way this platform drives a real portal form: navigate, fill, screenshot. There is no built-in browser. It is scoped to fill fields and is not permitted to click the submit control
  • AP / accounting system (invoice record, submitted reference) — via a Tool (MCP) node; no first-party connector
  • Email / Slack — intake and notification channel

Built-in tools

  • knowledge_search (built-in) — the portal field map and this customer's coding rules
  • http_request (built-in) — where the portal exposes a documented API, prefer it over browser automation; an API is more reliable and better behaved than driving a UI
  • User-defined tool `line_tolerance` (SpEL): input.lineTotal > input.qty * input.unitPrice * 1.01 || input.lineTotal < input.qty * input.unitPrice * 0.99 ? 'MISMATCH' : 'OK' — the AP lead sets their own tolerance band, and can tighten it, without a developer
  • User-defined tool `field_ready_flag` (SpEL): input.confidence < 0.85 || input.taxCode == null ? 'REVIEW' : 'READY' — the confidence floor is the team's own number, expressed as data

Guardrails

  • No agent ever types a password, card number, bank detail or government ID into a form. The portal login is performed by the human approver, or by a secrets-managed integration under your own account — credentials are never placed in a prompt, a field map, or an agent's reach
  • Every submission goes through the Approval node. The browser-automation MCP is scoped to fill fields only; the irreversible submit control is clicked by a person looking at a field-by-field diff against the source invoice
  • This portal is your own customer relationship, accessed under access you legitimately hold and within its Terms of Service — automation is used where the portal permits it, and where it does not, the workflow stops at the prepared draft for manual keying
  • Rate-limited and honestly identified: the browser session paces its interactions, backs off on errors, and does not retry in a tight loop against a live portal
  • No bot-detection bypass and CAPTCHAs are NEVER solved — a challenge hands the session to the human approver, who completes it themselves; the workflow waits rather than working around it
  • No personal data harvesting: only the invoice fields the portal requires are processed, nothing about individuals is retained beyond the record, and the extracted payload is not reused for any other purpose
  • Arithmetic is computed in the Code node, never accepted from a model, and the invoice total must reconcile before the draft can reach the Approval node at all
  • Idempotent per invoice id — a resent email or a retried run never produces a second draft, and the submitted reference is written back once
  • The SpEL user-defined tools are data-transform expressions over the tool's JSON input — no method calls, no constructors, no bean/type references, no loops in the grammar — so an AP lead encoding their own tolerance band writes a formula, not code, and it cannot become an execution risk

Cost strategy

This is the volume case that makes cost tiering obvious: 400 lines on a premium model is an absurd bill for what is fundamentally field-lifting off a structured document. Economy tier on the per-line extractor, deterministic arithmetic in the Code node (free), and the premium model reserved for the dozen rows the tolerance and confidence flags actually raise. Cap the extractor's output tokens — the per-line schema is tiny — and set a per-invoice budget so a scanned document that OCRs into noise fails loudly instead of burning through 400 expensive calls.

Output & delivery

The Loop extracts every line with the economy model → the Code node reconciles totals and the SpEL flags fire → the Condition node sends only flagged rows to the premium arbiter → a Tool (MCP) node drives the browser-automation server to fill the portal form and stops before submit → the human approver checks the field-by-field diff and clicks submit themselves → an Output node writes the reference, approver and timestamp back to the AP system and notifies on Email or Slack.

2. One customer record, three systems — re-keyed once, checked everywhere

A new customer is typed into the CRM by sales, then into the billing system by finance, then into the support desk by ops. Three people type the same address three times, one of them types it differently, and six weeks later nobody can say which spelling is correct.

Trigger: Webhook (record created in the system of record)

How the workflow runs

  1. Trigger

    Record created upstream. A Webhook trigger fires from your system of record with the new or updated customer payload.

  2. Code

    Normalise once, centrally. A Code node canonicalises the payload — casing, address shape, phone format — so all three downstream systems receive the identical normalised record rather than three human interpretations of it.

  3. Knowledge

    Per-system field maps. A Knowledge node supplies each target system's required fields, allowed values and validation rules, so a record is checked against the target's rules before anything is entered.

  4. Parallel

    Prepare all three drafts at once. A Parallel node prepares the three target payloads concurrently — they are independent, so there is no reason to do them in sequence.

  5. Agent

    Economy mapper per target. A cheap mapper agent produces one target's payload from the canonical record and that system's field map, returning strict JSON plus any fields it could not confidently map.

  6. Condition

    Anything unmappable?. A Condition node holds any target whose required field could not be filled confidently — an incomplete record is queued for a human, never submitted half-empty.

  7. Tool (MCP)

    API first, browser-automation MCP only if needed. Where a target exposes an API, an `http_request` writes to it directly. Where it only has a web UI, a Tool (MCP) node drives a browser-automation MCP server registered in the MCP registry to fill the form — the platform has no built-in browser — and it fills only, never submits.

  8. Approval

    One approval, three writes. An Approval node shows all three prepared records side by side against the canonical source. A human approves once, and only then does each write or submit proceed.

  9. Output

    Reconcile and report. An Output node posts the confirmation to Slack with the three target ids, and any target that rejected the record is reported as an open item rather than silently skipped.

Channels & connectors

  • Webhook
  • Slack
  • Email
  • Knowledge base
  • Approval / HITL
  • Tool (MCP → browser-automation server)
  • Tool (MCP → CRM / billing / support systems)

Outcome

One canonical record produces three consistent target records from a single human approval, with any rejection surfaced as an open item instead of a silent gap.

Why it helps

The mechanism is normalise-once: the divergence comes from three humans independently interpreting the same source, so canonicalising in a Code node before any target sees it removes the cause rather than reconciling the symptom afterwards. The human reviews one side-by-side diff instead of typing the same address three times.

Build spec

2 agents1 economy mapper, invoked once per target system by the Parallel node, + 1 premium escalation reviewer that runs only when a required field could not be mapped. Normalisation is a Code node, validation is Knowledge plus Condition, and the writes are http_request or a browser-automation MCP tool call — none of that is an agent. · Pattern: Code normalise → Parallel per target → economy mapper per target → Condition holds unmappable records → single Approval → API or MCP-browser writes

System prompt (paste-ready)

Map ONE canonical customer record into ONE target system's payload, using only that system's field map and allowed values from Knowledge. Return {payload, unmapped[] (required target fields you could NOT fill with certainty), notes}. Never invent a value to satisfy a required field, never pick an allowed value because it looks close, and never reformat a value in a way the field map does not specify — normalisation already happened upstream. You prepare a payload only: you do not write it, you do not submit it, and you never enter a password, card number or government ID into any field.

Agent roles & model tiers

  • Target mapper (once per target system) Economy tier — mapping a normalised record onto a documented field map is mechanical; volume here is per-record × per-system, so cheap matters

    One canonical record + one field map → one target payload plus an explicit unmapped[] list. No invented values, no near-enough enum matches, no re-normalising.
  • Escalation reviewer (only when unmapped[] is non-empty) Premium tier — invoked only for the genuinely ambiguous record, e.g. a legal entity type with no clean equivalent in the target's enum

    Given the canonical record and the target's allowed values, propose the correct mapping with a one-line justification, or return NEEDS_HUMAN. Never widen an enum or invent a category.

MCP connectors

  • CRM / billing / support systems — via Tool (MCP) nodes or documented APIs; no first-party connector for any of them
  • Browser-automation MCP (Playwright-style, registered in the MCP registry) — used ONLY for a target with no API. This platform has no built-in browser; driving a real form is always this connector, and it is scoped to fill, not submit
  • Slack / Email — the confirmation and exception channel

Built-in tools

  • knowledge_search (built-in) — per-system field maps, required fields and allowed values
  • http_request (built-in) — the preferred write path wherever a target has an API; more reliable and better behaved than driving a UI
  • User-defined tool `record_completeness` (SpEL): input.unmappedCount == 0 ? 'READY' : 'HOLD' — a normaliser that turns the mapper's own output into a routing decision the ops lead controls
  • User-defined tool `phone_country_band` (SpEL): input.phoneDigits == 10 ? 'IN_LOCAL' : (input.phoneDigits > 10 ? 'INTERNATIONAL' : 'INVALID') — the team encodes its own field-shape rule as a formula; anything needing real string surgery belongs in the Code node, because the SpEL grammar deliberately has no method calls

Guardrails

  • No agent ever types a password, card number, bank detail or government ID into a form. Each target system is reached with access you legitimately hold — a documented API using secrets-managed credentials, or a session a human opened — and credentials never appear in a prompt or a field map
  • Every submission goes through the Approval node. The browser-automation MCP is scoped to fill fields; the irreversible submit or save is a human action taken against a side-by-side diff of all three prepared records
  • These are your own systems, used within their Terms of Service and under legitimate access; where a vendor's terms prohibit UI automation, the API path is used or the record is prepared for manual entry
  • Rate-limited and honestly identified against every target — batched syncs pace their writes and back off on errors rather than retrying in a loop
  • No bot-detection bypass and CAPTCHAs are NEVER solved — a challenge on a target's UI hands the session to the human approver rather than being worked around
  • Minimum necessary personal data: only the fields each target actually requires are mapped into it, the canonical payload is not retained beyond the run, and no profile is assembled across systems
  • No invented values — an unfillable required field puts the whole target on hold at the Condition node instead of being satisfied with a plausible placeholder
  • Idempotent per source record id and version, so a replayed Webhook updates rather than duplicating, and a partial failure is reported as an open item rather than leaving a silent gap
  • The SpEL user-defined tools are data-transform expressions over the tool's JSON input — no method calls, no constructors, no bean/type refs, no loops in the grammar — so an ops lead writing their own completeness or field-shape rule produces a value, never behaviour

Cost strategy

Per-record cost is (number of targets) × economy mapper, with the premium tier reserved for the record that genuinely does not map — an unusual entity type, a country the target's enum does not carry. At three targets per record and a steady onboarding flow, putting a premium model on the mapping step multiplies the bill for work that is deterministic lookup against a documented field map. The Parallel node cuts wall-clock without changing per-target cost, and the Code-node normalisation is free — doing it there rather than asking a model to normalise is itself a cost decision.

Output & delivery

A Code node canonicalises the incoming record → the Parallel node prepares all three target payloads with the economy mapper → the Condition node holds any target with unmapped required fields → one Approval shows all three side by side against the canonical source → on approval, `http_request` writes to API-backed targets while a Tool (MCP) node drives the browser-automation server for UI-only ones, stopping short of submit for the human → an Output node reports the three target ids and any rejection to Slack.

3. Scanned application forms → structured draft → portal draft, human submits

A back-office team receives scanned or emailed application forms and retypes them into an internal portal. Handwriting is guessed at, one field gets skipped, and the correction cycle starts a week later when the applicant is asked to confirm a detail that was misread rather than missing.

Trigger: Email (scanned form received) / Webhook (upload from your intake portal)

How the workflow runs

  1. Trigger

    Form arrives. An Email trigger on the intake inbox, or a Webhook from your upload portal, starts the run with the scanned document.

  2. Loop

    For each page / each form. A Loop node handles a multi-page batch page by page, so one unreadable scan is one flagged page rather than a failed batch.

  3. Agent

    Economy extractor per page. A cheap extractor returns strict JSON per field with a per-field confidence score. Per-page volume is where the cost sits, so this is the economy-tier step.

  4. Knowledge

    Validate against the form spec. A Knowledge node supplies the form's field spec — mandatory fields, allowed values, formats — so an extraction is checked against what the form actually permits.

  5. Condition

    Below the confidence floor?. A Condition node splits confident fields from doubtful ones using the team's own SpEL threshold; only the doubtful fields go further, and no doubtful field is ever entered silently.

  6. Agent

    Premium reader on the doubtful fields. A stronger model re-reads just the unclear fields with full page context — a smudged digit, an ambiguous tick-box — and returns NEEDS_HUMAN when it genuinely cannot tell.

  7. Tool (MCP)

    Fill the portal draft (browser-automation MCP). A Tool (MCP) node drives a browser-automation MCP server from the platform's MCP registry to enter the confident fields into the portal, leaving flagged fields visibly empty. There is no built-in browser; this connector is how a real form gets filled — and it does not submit.

  8. Approval

    Operator completes and submits. An Approval node presents the draft next to the scan, with every low-confidence field highlighted and blank. Identity numbers, bank details and any signature field are left for the human by policy — the agent never types them — and the human clicks submit.

  9. Output

    Acknowledge and file. An Output node acknowledges receipt to the applicant on Email or WhatsApp with the reference, and a Tool (MCP) node files the record and the scan together.

Channels & connectors

  • Email
  • Webhook
  • WhatsApp
  • Knowledge base
  • Approval / HITL
  • Tool (MCP → browser-automation server)
  • Tool (MCP → records system)

Outcome

Each form arrives as a portal draft with the confident fields filled and the doubtful ones visibly blank, so the operator's attention lands exactly where the scan was actually unclear.

Why it helps

The mechanism is per-field confidence made visible: a misread field is worse than a missing one because nobody checks it, so the flow leaves low-confidence fields empty and highlighted rather than filling them plausibly. The operator verifies a short list instead of retyping a whole form, and sensitive identifiers stay human-entered by design.

Build spec

2 agents1 economy per-page extractor (via the Loop node) + 1 premium re-reader (only on fields below the confidence floor). Form filling is a Tool (MCP) node against a browser-automation server, not an agent capability. · Pattern: Loop (per page) → economy extract with per-field confidence → Knowledge validation → Condition splits on the team's SpEL threshold → premium re-read of doubtful fields only → MCP browser fills confident fields → human completes and submits

System prompt (paste-ready)

Extract ONE page of a scanned form into strict JSON: one entry per field as {field, value|null, confidence (0-1), issue|null}, using only the field spec from Knowledge. If a value is unclear, smudged, ambiguously ticked or handwritten in a way you cannot read with certainty, set value=null with a low confidence and describe the problem — a blank flagged field is CORRECT and a plausible guess is a defect. Never normalise a value the spec does not define, never complete a partially-visible number, and never infer a field from another field. Do NOT extract or transcribe passwords, full card numbers, or government ID numbers into the draft payload: mark those fields HUMAN_ENTRY_REQUIRED so a person enters them directly. You prepare a draft only and never submit.

Agent roles & model tiers

  • Page extractor (per page) Economy tier — the per-page volume step; on a daily intake backlog this tier choice is the difference between viable and absurd

    One page → per-field JSON with honest per-field confidence. Null plus a reason beats a guess. Sensitive identifiers are marked HUMAN_ENTRY_REQUIRED, never transcribed.
  • Doubtful-field re-reader Premium tier — runs on a few fields per form, not every field of every page, which is exactly what makes premium affordable here

    Re-read only the flagged fields with full page context. Return a value only at high confidence; otherwise return NEEDS_HUMAN with the specific difficulty. Never resolve ambiguity by choosing the more common option.

MCP connectors

  • Browser-automation MCP (Playwright-style, registered in the MCP registry) — the mechanism for entering data into the portal's real form. VegaDūta has no built-in browser. Scoped to fill fields; it never clicks submit
  • Records / case system (file the record and the scan together) — via a Tool (MCP) node; no first-party connector
  • Email / WhatsApp — intake and applicant acknowledgement

Built-in tools

  • knowledge_search (built-in) — the form field spec: mandatory fields, allowed values, formats
  • http_request (built-in) — where the portal exposes an API, use it in preference to driving the UI
  • User-defined tool `field_ready_flag` (SpEL): input.confidence < 0.9 || input.value == null ? 'HUMAN_CHECK' : 'AUTOFILL' — the operations lead sets the confidence floor for THEIR form and can raise it for a harder document class, without a developer
  • User-defined tool `age_band` (SpEL): input.ageYears < 18 ? 'MINOR_ROUTE' : 'STANDARD_ROUTE' — a normaliser turning an extracted field into the routing category this team already uses, expressed as a formula rather than code

Guardrails

  • No agent ever types — or even transcribes into the draft — a password, card number, bank detail or government ID. Those fields are marked HUMAN_ENTRY_REQUIRED and entered by the operator directly, or supplied by a secrets-managed integration; they never pass through a prompt
  • Every submission goes through the Approval node. The browser-automation MCP fills fields only; the irreversible submit is clicked by the operator with the scan open beside the draft
  • Access is legitimate and within Terms of Service: this is your own internal portal and your own applicants' forms, entered under access you hold. Where UI automation is not permitted, the flow stops at the structured draft for manual keying
  • Rate-limited, paced and honestly identified against the portal; failures back off instead of retrying in a tight loop
  • No bot-detection bypass and CAPTCHAs are NEVER solved — a challenge is handed to the operator, who completes it in their own session
  • Personal data is handled on a minimum-necessary basis: fields are used for this application only, the scan and payload are retained under your existing retention policy, and nothing is compiled into a profile or reused for another purpose
  • Low-confidence fields are left BLANK and highlighted, never auto-filled — the flow's core rule is that a missing field is safe and a confidently-wrong field is not
  • Idempotent per document id, so a re-sent scan updates the existing draft instead of creating a duplicate application
  • The SpEL user-defined tools are data-transform expressions over the tool's JSON input, with no method calls, constructors, bean/type references or loops in the grammar — the ops lead's own confidence floor is a formula that computes a value and can never become executable behaviour

Cost strategy

Pages are the volume unit, so the per-page extractor sits on the economy tier and everything else follows from that. The premium model is scoped to the fields that failed the confidence floor — typically a few per form — which means the expensive tier scales with document difficulty rather than with intake volume. Cap output tokens per page (the field schema is fixed) and set a per-document budget so a badly-scanned batch fails visibly rather than quietly re-reading every field at premium tier.

Output & delivery

The Loop extracts each page with the economy model → Knowledge validates against the form spec → the Condition node applies the team's SpEL confidence floor → the premium re-reader takes only the doubtful fields → a Tool (MCP) node drives the browser-automation server to fill the confident fields and leave flagged ones blank → the operator completes the highlighted fields, enters any sensitive identifiers themselves, and submits at the Approval node → an Output node acknowledges to the applicant with the reference while a Tool (MCP) node files the record with the scan.

4. Recurring statutory / compliance return — draft prepared, filed by the authorised person

Every period an accounts executive exports the same figures, reconciles them in a spreadsheet, and keys them into a statutory portal field by field. The reconciliation is redone from scratch each cycle, the working papers live in someone's downloads folder, and if the filer is on leave the deadline is at risk.

Trigger: Webhook (period close / scheduled ahead of the filing deadline)

How the workflow runs

  1. Trigger

    Period close triggers the prep. A scheduled Webhook fires ahead of the deadline with the period reference; the ledger data is pulled from your accounting system via a Tool (MCP) node — no first-party connector exists for it.

  2. Code

    Compute the figures deterministically. A Code node performs every calculation and cross-total. Statutory figures are arithmetic, not inference, and no model computes a number that goes on a return.

  3. Knowledge

    Ground it in the current return spec. A Knowledge node supplies the current form's schedule structure, field definitions and validation rules, so the draft matches the version actually in force.

  4. Agent

    Standard-tier agent assembles the draft. An agent maps the computed figures onto the return's fields, produces the working-paper narrative, and lists every assumption it relied on — it explains and arranges; it never computes a filing figure.

  5. Condition

    Reconciliation gate. A Condition node blocks the draft unless the computed control totals tie back to the ledger within the team's own tolerance — an unreconciled return never reaches a human as if it were ready.

  6. Tool (MCP)

    Fill the portal draft (browser-automation MCP). A Tool (MCP) node drives a browser-automation MCP server from the MCP registry to enter the reconciled figures into the portal's draft form. The platform ships no browser; this is the mechanism — and it fills only.

  7. Approval

    The authorised signatory files. An Approval node holds the completed draft with the working papers and the figure-by-figure tie-back. Filing is a legal act by a named authorised person: they log in themselves, they enter any credential or signing token, and they click submit. The agent does neither.

  8. Output

    Archive the filing pack. An Output node emails the acknowledgement and archives the working papers, the draft, the approver and the timestamp via a Tool (MCP) node — the pack that an audit will ask for.

Channels & connectors

  • Webhook
  • Email
  • Slack
  • Knowledge base
  • Approval / HITL
  • Tool (MCP → browser-automation server)
  • Tool (MCP → accounting / ledger system)

Outcome

Each period produces a reconciled draft return with its working papers attached, ready for the authorised signatory to review and file — the same way every cycle, whoever is on leave.

Why it helps

The mechanism is deterministic computation plus a hard reconciliation gate: figures come from code and are proven to tie back to the ledger before any human sees them, so the review is a check rather than a recomputation, and the working-paper pack is produced as a by-product instead of reconstructed at audit.

Build spec

2 agents1 draft-assembly agent (once per period) + 1 premium anomaly reviewer that runs only on a flagged item. Neither ever computes a filing figure — all arithmetic is a Code node. The reconciliation gate, the form filling and the filing approval are workflow nodes and MCP tool calls. · Pattern: Code computes → Knowledge grounds the current form spec → agent assembles the draft and working papers → hard reconciliation gate → MCP browser fills the portal draft → authorised signatory files

System prompt (paste-ready)

You assemble a statutory return DRAFT from figures that have ALREADY been computed. You must never calculate, adjust, round or reconcile a figure yourself — use the supplied values exactly, and if a required value is absent, report it as missing rather than deriving it. Map figures onto the return's schedules using ONLY the current form specification from Knowledge, write a plain-language working-paper note per schedule, and list every assumption relied upon. Flag any figure that looks inconsistent with the prior period rather than adjusting it. You never file, never enter credentials or a signing token, and never present the draft as submitted. Output {schedules[], workingNotes[], assumptions[], missing[], anomalies[]}.

Agent roles & model tiers

  • Draft assembler Standard tier — one careful pass per period over pre-computed figures; the reasoning is in the mapping and the narrative, not in the arithmetic

    Map computed figures onto the current schedules, write working notes, list assumptions, flag prior-period inconsistencies. Never compute, never adjust, never file.
  • Anomaly reviewer (only when the gate or the agent flags something) Premium tier — invoked only for the genuinely ambiguous case, such as a movement with no obvious ledger explanation

    Given the flagged item, the ledger extract and the prior period, explain the most likely cause and what evidence would confirm it. Never propose a figure change — the outcome is a question for the preparer, not an adjustment.

MCP connectors

  • Accounting / ledger system (period extract, control totals) — via a Tool (MCP) node; no first-party connector
  • Browser-automation MCP (Playwright-style, registered in the MCP registry) — the only way the platform enters figures into the portal's draft form. No built-in browser exists. Scoped to fill; it never logs in and never submits
  • Document archive (working papers, filing pack) — via a Tool (MCP) node
  • Email / Slack — approval routing and acknowledgement

Built-in tools

  • knowledge_search (built-in) — the current return specification, schedule structure and validation rules
  • http_request (built-in) — pull the ledger extract; and use the portal's API where one is published, in preference to driving the UI
  • User-defined tool `reconciliation_gate` (SpEL): input.variance > input.tolerance ? 'BLOCK' : 'PROCEED' — the finance controller owns the tolerance figure and can tighten it per return type without a developer
  • User-defined tool `period_movement_flag` (SpEL): input.thisPeriod > input.priorPeriod * 1.25 || input.thisPeriod < input.priorPeriod * 0.75 ? 'EXPLAIN' : 'NORMAL' — a normaliser encoding the team's own materiality band for period-on-period movement

Guardrails

  • No agent ever types a password, digital-signature token, card number or government ID. The authorised signatory logs into the portal themselves in their own session; where credentials are needed for a read-only ledger pull, they come from a secrets-managed integration and never enter a prompt
  • Every submission goes through the Approval node — and here the submit is a legal act, so it is performed by the named authorised person against the figure-by-figure tie-back, never by the workflow. The browser-automation MCP fills the draft and stops
  • Legitimate access and Terms of Service: this is your own filing under your own credentials, and where the portal's terms do not permit automated interaction the workflow delivers the reconciled draft for manual keying instead
  • Rate-limited, paced and honestly identified; no tight retry loops against a government or regulator portal, ever
  • No bot-detection bypass and CAPTCHAs are NEVER solved — a challenge is completed by the signatory in their own session, which is also the correct control for a filing
  • No personal data harvesting: only the return's required fields are processed, retained under your statutory retention policy, and never reused for another purpose
  • No model-computed figures. Every number on the return comes from the Code node, the reconciliation gate must pass before a human is shown a draft, and a flagged anomaly is raised as a question rather than adjusted away
  • Idempotent per period and return type — a re-run regenerates the draft rather than creating a second filing, and the archived pack records the approver and timestamp for audit
  • The SpEL user-defined tools are data-transform expressions over the tool's JSON input — no method calls, no constructors, no bean/type references, no loops in the grammar — so a controller setting their own tolerance or materiality band writes a formula that computes a value and cannot become an execution risk

Cost strategy

Volume is low here — one return per period — so cost discipline is about not paying for the wrong thing rather than about per-row tiering: the arithmetic sits in a free Code node instead of a model, which is both cheaper and the only defensible way to produce a filing figure. One standard-tier assembly pass per period is sufficient, and the premium tier appears only when a flagged anomaly genuinely needs reasoning. Contrast with the per-row recipes in this pack: there the economy tier is the lever; here the lever is refusing to spend model tokens on work that is deterministic.

Output & delivery

A Code node computes every figure from the ledger extract → Knowledge supplies the in-force form spec → the agent assembles schedules, working notes and assumptions → the reconciliation gate blocks anything that does not tie back within tolerance → a Tool (MCP) node drives the browser-automation server to fill the portal draft without logging in or submitting → the authorised signatory reviews the tie-back, enters their own credentials and files → an Output node archives the working papers, draft, approver and timestamp as the audit pack and emails the acknowledgement.

Related industries

Build one of these in minutes

The sandbox gives you a live agent workspace — no account, no card. Or head back to the full catalogue and compare patterns across every industry.

See how VegaDūta compares to n8n, Dify and BotpressWhy VegaDūta's architectureEstimate your WhatsApp API costs