Case study · AI Engineering

AI agent infrastructure, tested first on our own company

Before offering it to clients, we put the AI agent infrastructure to work on our own company's accounting, in SAGA. The agents prepared D406 and the balance sheet, ran the ANAF validations and tracked the filing receipts. D406 for the first and second quarters of 2026 went through with no errors, and the 2025 annual accounts are filed; the digital certificate and the approval stayed with a person.

2quarters of D406 filed, with receipts showing no validation errors
0errors in the final validation of the 2025 annual accounts
4pillars for every agent: own model, memory, connectors, human approval
DUKIntegrator and the Declarații ANAF app: error-free validation for the annual accounts and the list of filed returns; identifiers are blurred.
The Niche Society · pilot intern
01

Why we started with our own company

We set ourselves a simple rule: we don't propose to a client any agent infrastructure we haven't used ourselves. So the first “client” was the company we invoice through, with its accounting kept in SAGA C, a desktop program with no API.

Tax returns have fixed deadlines and don't forgive mistakes, and D406 (SAF-T) is the most demanding of them. If the agents hold up here, they hold up in other processes too.

02

Where a D406 gets stuck in practice

The first attempts produced exactly the errors every accountant knows. The D406 can't be generated until the month is closed, and SAF-T rejects first-degree synthetic accounts where analytical accounts exist: in our case, account 455 had to be replaced with 4551 on three entries.

Then came the environment blockers: ANAF's validation app requires 32-bit Java, and the database server behind SAGA doesn't tolerate being shut down abruptly. We documented them all, so a client won't have to pay for them a second time.

30 minutes, free. We'll tell you honestly if it makes sense.

03

Four pillars, the same for every agent

  • 01Own model open-source models on EU servers; the route to an external model is switched off by default.
  • 02Company memory the chart of accounts, the rules and the filing history, available to every agent.
  • 03Connectors direct reads from SAGA, with no writes to the database, plus ANAF's official validation apps.
  • 04Human approval every action with an effect goes through a person, and every step stays in the log.
SAGA C: Declaration 406 (SAF-T) is generated from the reports menu, after the month-end close.
SAGA C: Declaration 406 (SAF-T) is generated from the reports menu, after the month-end close.
The balance sheet form: validation finished successfully and the XML file is attached for signing.
The balance sheet form: validation finished successfully and the XML file is attached for signing.
Declarații ANAF: the signed PDF is created from the validated balance sheet; a person enters the certificate and the PIN.
Declarații ANAF: the signed PDF is created from the validated balance sheet; a person enters the certificate and the PIN.
D406 filed, with the agent tracking the filing receipt until it's confirmed. Identifiers are blurred.
D406 filed, with the agent tracking the filing receipt until it's confirmed. Identifiers are blurred.
04

From ledger to filing receipt, with a person signing off

  • 01The agent reads the journal and the trial balance from SAGA and checks the month-end close
  • 02Flags the accounts that will block SAF-T, and the accountant decides on the correction
  • 03Generates the D406 return from SAGA and runs the official validation
  • 04A person signs with the digital certificate and approves the filing
  • 05The agent tracks the filing receipt until it's confirmed
  • 06For the annual balance sheet, it fills in the form from the trial balance, runs the validation and prepares the PDF for signature
05

Returns filed, with no validation errors

D406 for the first and second quarters of 2026 was filed, and the filing receipts came back with no validation errors. The 2025 balance sheet passed final validation with no errors and was filed on 1 September 2026.

People's work has shifted from searching and filling in to checking and approving. That's the setup we propose to clients as well.

06

The same infrastructure, at other companies

On the same foundation we are building the AI assistant for RSM Romania, iar la FOX we ran discovery for digitalizing production, alongside SAP. The connectors change from one company to the next: on SAP we work through the official interfaces, on SAGA we read the database directly, without writing to it.

Want to see whether it fits your company? In the free 30-minute session we look at your situation and tell you honestly what makes sense. You can also call us directly: +40 733 045 833. The technical details are on the page about private AI infrastructure.

07

Technical stack.

SAGA C, direct reading, DUKIntegrator, Declarații ANAF, open-source models in the EU, API and MCP connectors, audit log

30 minutes, free. We'll tell you honestly if it makes sense.

FAQ

Frequently asked questions

Do the agents file the returns on their own?

No. They prepare the return, run the validations and track the filing receipt, but the digital certificate and the approval to file stay with a person.

Why did you test on your own company and not at a client?

Because real errors only show up on real data. Testing on our own company let us run into them, document them and fix them without putting a client's deadlines at risk.

Where do the models run?

On servers in the EU or on the company's own server. The route to an external model is off by default and opens only for content declared non-sensitive.

Does it work with software other than SAGA?

Yes. What changes are the connectors: with SAP we work through the official interfaces, and with programs that have no API we read the data directly, without writing to the database.

The Niche Society
The Niche Society TeamAI and software engineers from Bucharest · LinkedIn
delivered 2026

Let's see what can be automated in your business.

A free 30-minute session: we'll tell you what can be automated, how long it takes and what it costs, with a fixed price after discovery.

+40 733 045 833
Call: +40 733 045 833Free session