Production AI Agents for Accounting Automation: Engineering Process Daemons at Scale
digits · Finance · 2025 · source Agentic: yes · promotional bias: low · source-backed · extracted with prompt 0.5.6 (schema v2)
Generated from extraction.json — do not edit by hand. Every claim cites verbatim source evidence; stated means the quote directly asserts the claim, implied means it supports it indirectly.
Problem
Domain: Accounting automation agents in production
Digits needed to run LLM-based agents for accounting workflows in production without buying into agent hype, excessive framework dependencies, weak observability, duplicated security logic, or unbounded autonomy in financial workflows.
Constraints:
- Accounting workflows involve customer financial data and require transparency, permissions, and predictable oversight.
- Open-source agent frameworks introduced too many dependencies and abstractions for production readiness.
- Existing APIs already enforced access rights, so agent tools needed to reuse rather than bypass those controls.
- Agent failures are difficult to debug without decision traceability and prompt comparison.
- One model should not be trusted to police its own outputs.
Architecture
Digits reframes agents as process daemons: background processes with objectives, an LLM, tools, and a response, surrounded by production infrastructure. They run agents for vendor enrichment, client onboarding, and complex user questions; implement their own lightweight agent loop; generate curated tool schemas from existing Go handlers; reuse existing APIs and permissions; trace decisions with OpenTelemetry; expose memory as a tool; use a separate LLM for guardrail assessment; and feed user feedback into reward functions and future fine-tuning.
Diagram confidence: explicit (topology described by the source).
flowchart LR process-daemon-objective["Process daemon objective"] --> core-agent-loop["Core agent loop"] core-agent-loop["Core agent loop"] --> process-daemon-objective["Process daemon objective"] core-agent-loop["Core agent loop"] --> llm-reasoning-model["LLM reasoning model"] llm-reasoning-model["LLM reasoning model"] --> core-agent-loop["Core agent loop"] core-agent-loop["Core agent loop"] --> curated-api-tools["Curated API tools"] curated-api-tools["Curated API tools"] --> core-agent-loop["Core agent loop"] go-reflection-schema-generator["Go reflection schema generator"] --> curated-api-tools["Curated API tools"] curated-api-tools["Curated API tools"] --> go-reflection-schema-generator["Go reflection schema generator"] core-agent-loop["Core agent loop"] --> response-surface["Response surface"] response-surface["Response surface"] --> core-agent-loop["Core agent loop"] core-agent-loop["Core agent loop"] --> opentelemetry-tracing["OpenTelemetry tracing"] opentelemetry-tracing["OpenTelemetry tracing"] --> core-agent-loop["Core agent loop"] core-agent-loop["Core agent loop"] --> memory-tool["Memory tool"] memory-tool["Memory tool"] --> core-agent-loop["Core agent loop"] core-agent-loop["Core agent loop"] --> guardrail-evaluator["Guardrail evaluator"] guardrail-evaluator["Guardrail evaluator"] --> core-agent-loop["Core agent loop"] response-surface["Response surface"] --> feedback-loop["Feedback loop"] feedback-loop["Feedback loop"] --> response-surface["Response surface"]
Components
| Component | Role | Interacts with |
|---|---|---|
Process daemon objective |
Task definition for vendor enrichment, onboarding, or complex accounting questions. | Core agent loop |
Core agent loop |
Small custom loop combining objective, LLM, tools, and response. | Process daemon objective, LLM reasoning model, Curated API tools, Response surface, OpenTelemetry tracing, Memory tool, Guardrail evaluator |
LLM reasoning model |
Language model that plans, reasons, and decides tool use for the process daemon. | Core agent loop |
Go reflection schema generator |
Introspects function handlers and generates JSON schemas for tool inputs and outputs. | Curated API tools |
Curated API tools |
Existing Digits APIs exposed as selected agent tools while inheriting access rights. | Core agent loop, Go reflection schema generator |
OpenTelemetry tracing |
Decision traceability integrated into Digits' broader monitoring stack. | Core agent loop |
Memory tool |
Provider-agnostic memory capability combining semantic search with relational or graph context. | Core agent loop |
Guardrail evaluator |
Separate LLM or guardrail framework that evaluates outputs from the primary model. | Core agent loop |
Response surface |
Output delivered back to users or systems for the accounting workflow. | Core agent loop, Feedback loop |
Feedback loop |
User feedback, reward functions, and fine-tuning exploration for continuous improvement. | Response surface |
Data flow
A process daemon receives an objective from an accounting workflow, asks an LLM to reason about it, invokes curated tools generated from existing APIs, and returns a response to a user or system. Tool schemas are generated from Go function handlers while preserving existing access controls. Execution emits OpenTelemetry traces and prompt-comparison data. Memory is invoked as a tool when context across conversations is needed. A separate guardrail model evaluates responses, and user feedback is captured for reward functions and future agent-specific model improvement.
3 supporting quotes
Why this architecture
Digits chose custom lightweight infrastructure because the valuable part of production agents was not a framework abstraction but reliable control around existing APIs, permissions, traces, guardrails, and feedback. The process-daemon framing sets expectations that these are supervised background systems, not magical autonomous assistants.
3 supporting quotes
Models used: LLMs with native tool calling · reasoning models · separate LLM guardrail evaluators · agent-specific fine-tuned models
Scale
- Digits reports running AI agents in production for over two years.“At Digits, we've been running AI agents in production for over 2 years at this point”article, stated
- The core agent loop is described as about 100 lines of code.“At its core, it's about 100 lines of code that combines four elements:”article, stated
- Digits names three deployed production use cases: vendor enrichment, client onboarding, and complex user questions.“At Digits, we've deployed agents for three primary use cases:”article, stated
- The engineering team reports over a decade of collective ML deployment experience.“The Digits Engineering Team has over a decade of collective experience deploying machine learning systems across multiple industries.”article, stated
Alternatives considered (roads not taken)
Use dependency-heavy agent frameworks such as LangChain or CrewAI as-is
Rejected because: Digits found these frameworks too complex and dependency-heavy for production environments.
Manually define every agent tool
Rejected because: Manual tool definition was too time-consuming and hard to maintain.
Automatically expose all RPCs as tools
Rejected because: Exposing all RPCs creates too much noise for the LLM and risks uncontrolled tool surfaces.
Use provider-specific memory solutions
Rejected because: Digits implements memory as a tool to avoid vendor lock-in and keep flexibility as memory requirements evolve.
Trust the primary LLM to police itself
Rejected because: Digits uses a different LLM to evaluate responses and says never to trust a single model to police itself.
Patterns
tool-use-orchestration (agent-architecture)
Digits exposes curated existing APIs as agent tools, generating JSON schemas from Go handlers while preserving access controls.
observability-tracing (operations)
Digits integrates agent traces into its existing OpenTelemetry monitoring stack for lightweight decision traceability.
agent-memory (context-management)
Digits treats memory as a tool that combines semantic search with relational or graph databases for cross-conversation context.
llm-as-judge (quality)
The system uses a different LLM to evaluate responses from the primary model for guardrail checks.
safety-policy-enforcement (safety)
Digits layers guardrails, prompt-injection vigilance, permissions, and team notifications around agents used in financial workflows.
eval-driven-development (quality)
Digits compares prompts, captures user feedback, designs reward functions, and explores reinforcement learning for agent-specific improvement.
structured-output-contract (tooling)
Tool inputs and outputs are generated as JSON schemas from Go handlers, creating explicit contracts for agent tool invocation.
Tradeoffs
Build the core agent loop in-house.
Chose Custom lightweight core loop over Dependency-heavy frameworks.
Rationale: The custom loop required more upfront work but provided control, fewer dependencies, and production readiness.
Reuse existing APIs as agent tools.
Chose Curated tool generation from production APIs over Parallel agent-specific interfaces or exposing all RPCs.
Rationale: Existing APIs already encode business logic and access rights; curation avoids noisy tool surfaces.
Make memory provider-agnostic.
Chose Memory as an agent tool over Provider-specific memory solutions.
Rationale: This avoids vendor lock-in and keeps memory implementations swappable as the landscape changes.
Add a separate model for guardrails.
Chose Different LLM evaluating the primary model's responses over Single-model self-policing.
Rationale: Independent assessment reduces reliance on the same model that generated the response.
Let applications drive infrastructure.
Chose Infrastructure built from real deployed use cases over Abstract platform work ahead of application needs.
Rationale: Digits treats production application requirements as the guide for which infrastructure to build.
Gotchas (what bit them)
The term agent created unrealistic autonomy expectations.
Root cause: The word suggested autonomous assistants handling everything independently, while production systems need bounded background processes.
Resolution: Digits reframed agents as process daemons with oversight, observability, and specific tasks.
Framework convenience threatened production control.
Root cause: Agent frameworks carried complexity and dependency chains that could become reliability or security risks.
Resolution: Digits wrote the core loop themselves and scrutinized frameworks for production readiness.
Automatically exposing every RPC would overwhelm the model and increase risk.
Root cause: The full internal API surface is noisy and not all endpoints are appropriate agent tools.
Resolution: Use Go reflection for automated schema generation, but keep curation and existing API access controls.
Agent storage is often mistaken for memory.
Root cause: Simple persistence does not provide semantic/relational/graph context across conversations.
Resolution: Digits models memory as a tool combining semantic search with relational or graph databases.
Debugging nondeterministic agents is nearly impossible without traces.
Root cause: LLM responses cannot be replayed deterministically, so failures need forensic traceability.
Resolution: Use OpenTelemetry and prompt comparison as part of the broader monitoring stack.
Evaluation
Digits evaluates production agent systems through observability traces, prompt comparison, user feedback, reward functions, guardrail assessments, and real application outcomes across vendor enrichment, onboarding, and complex question-answering use cases.
Metrics: Over two years of production agent operation · Three primary deployed use cases · Prompt comparisons showing improved or degraded performance · User feedback about agent responses · Guardrail evaluations by a separate LLM
3 supporting quotes
Outcomes
- Digits has run production AI agents for more than two years in accounting workflows.
- The company deployed agents for vendor information hydration, client onboarding, and complex user questions.
- The production stack emphasizes custom control, curated existing APIs, OpenTelemetry, memory-as-tool, guardrails, and continuous improvement.
- The team rejects magical-agent framing in favor of well-engineered, permissioned process daemons.
Digits reports over two years of production operation, three primary accounting use cases, an approximately 100-line core loop, and an engineering team with over a decade of collective ML deployment experience.