Agentic Journal Entry Preparation
An agent that drafts the entry. A human still signs it.
- 0Pipeline stages
- 0Human signature, non-negotiable
- 0Unattended ledger writes
The problem
Intake is solved. Preparation is not. Drafting a journal entry is still a person reading source material, deciding what it means in accounting terms, and typing the result — which is exactly the shape of work a capable model can now do a first pass on, and exactly the shape of work that will quietly destroy a control environment if you let it post unattended.
Why it mattered
This is the highest-volume manual process I have direct ownership of, which makes it the honest place to find out whether agentic AI survives contact with real accounting. Not a demo on invented data. The actual work, with the actual exceptions, judged by someone who knows what the right answer looks like.
The old process
- Preparer locates and reads source material
- Preparer determines accounting treatment
- Preparer drafts the entry by hand
- Preparer assembles support
- Reviewer re-derives most of the above to check it
The idea
Put the model where it is genuinely strong — reading unstructured source material and producing a structured first draft — and put hard deterministic validation on both sides of it. The agent proposes. The rules dispose. The human signs.
The system
A multi-step agent pipeline built on the Anthropic Claude API: retrieve source data, apply accounting logic, draft the entry, validate structure and supporting documentation, and route for human review. Prompt and system-instruction design, tool calling, and reasoning-chain iteration, with output validation before anything reaches a ledger.
How it works
- Retrieve — source data gathered through defined tools with least-privilege access
- Reason — accounting treatment determined, with the reasoning retained rather than discarded
- Draft — a structured entry proposed, never a free-text answer
- Validate — deterministic checks on structure, balance and required support, outside the model
- Assemble — draft, support and stated assumptions packaged together
- Review — routed to a human, who approves or rejects. Nothing posts without that.
Before and after
TODAY
Prepared by hand
- Read the source
- Decide the treatment
- Type the entry
- Assemble support
- Reviewer re-derives it
TARGET
Drafted, validated, signed
- Agent retrieves and reads
- Agent drafts a structured entry
- Rules validate outside the model
- Assumptions surfaced
- Human approves — always
Architecture
Agent pipeline
- 01Source data
Retrieved via least-privilege tools
- 02Reasoning
Accounting treatment determined
- 03Draft entry
Structured output, not prose
- 04Deterministic gate
Structure, balance, support — outside the model
- 05Support package
Draft, documentation, stated assumptions
- 06Human review
Approve or reject. Nothing posts unattended.
EXCEPTION PATH
Rejected to exception queue — With reasoning trail attached for diagnosis
Design decisions
- The model drafts. It does not decide.
- Every output passes a deterministic validation layer the model cannot talk its way past. Confidence is not evidence.
- Assumptions are an output
- If the agent had to assume something to produce the entry, the assumption is surfaced to the reviewer as part of the deliverable. Silent assumptions are how you fail an audit eighteen months later.
- Least-privilege tools
- The agent reaches source systems through narrow, explicit tools. It does not get general access because general access is convenient.
- Auditability over autonomy
- The reasoning chain and every tool call are retained. An agent whose work cannot be reconstructed is not usable in accounting, however good it is.
Controls
- Deterministic structural and balance validation outside the model
- Required supporting documentation enforced independently of the model's output
- Stated assumptions surfaced to the reviewer
- Full reasoning and tool-call trail retained
- Mandatory human approval — no unattended write to a ledger, by design
Testing
Evaluated against known-answer entries — work already prepared, reviewed and closed by people, where the correct output is established fact. The measure is not whether the draft looks plausible. It is whether it matches, and where it does not, whether the validation layer caught it.
Result
In development. The architecture, validation layer and evaluation approach are built; the honest status is that this is independent work in progress, on my own time and equipment, not a deployed employer system.
Impact
- A working answer to what agentic AI in accounting should actually look like
- Evaluation methodology grounded in known-answer testing rather than demo appeal
- A design where the control environment survives the automation
What I took from it
The interesting engineering is not the prompt. It is the boundary — deciding precisely which judgements a model is allowed to make, and building a wall the model cannot argue its way through. Most agent projects fail because nobody in the room knows the domain well enough to draw that line, so it gets drawn by whoever is most optimistic.
What I would build next
Broaden the exception taxonomy, and build the reviewer's interface properly — the queue is where the human's time is actually spent, and it deserves the same design attention as the agent.