Dev.to AI 🤖 Ai 👁 0 📖 14 min read

Your Grant Auditor Can Ask About Your AI Agent Years From Now. Can You Answer?

A how-to for compliance-heavy European organisations that run on public money: universities, research institutes, public hospitals, municipalities, agencies, NGOs and companies in EU-funded consortia. If your organisati

A how-to for compliance-heavy European organisations that run on public money: universities, research institutes, public hospitals, municipalities, agencies, NGOs and companies in EU-funded consortia.

If your organisation depends on government or EU funding, you already live with a particular kind of accountability. Every euro has conditions. Every claim needs evidence. Auditors can arrive long after the work is done, and what they find can be extended to other grants and recovered with money you may have already spent.

Now add AI agents. They draft cost statements, classify expenses, answer citizens, triage applications, prepare reports and pull data from systems of record. Each of those tasks touches an obligation. And a year or three later, an auditor, a funder, a regulator or a citizen asks the same simple question: how was this decided, and can you show us?

This guide explains why publicly funded organisations face that question earlier and harder than most, how to map agent work to the obligations it touches, and how to build the record that lets you answer. It closes with a 30 day plan.

A note on scope. This is general information, not legal or audit advice. Funding rules differ by programme and member state, so check your grant agreement, national rules and your own legal and audit advisers. The case is an illustrative composite with invented names. Parameter names in code are illustrative. ZizkaDB records events and shows whether the record has been altered. It does not decide eligibility, make a system compliant or replace your audit function.

Why funded organisations are different

Four features set publicly funded bodies apart.

  1. Your costs are conditional. Funding is paid against rules on what counts as an eligible cost. If a cost is later found ineligible, it can be recovered. Under the Horizon Europe model grant agreement, beneficiaries must keep records and supporting documents to confirm proper use of funds and the costs claimed, and a published guide summarising the rules says records must be kept for five years after the final payment for grants over 60,000 euros, or three years for grants of 60,000 euros or less. A national contact point for Horizon Europe adds that the period can be longer in case of ongoing audits or national requirements. Other EU programmes and national funders have their own conditions, so check yours.

  2. Many bodies can audit you, and findings can travel. The model grant agreement includes provisions for checks, reviews and audits, including by OLAF, the European Public Prosecutor's Office and the European Court of Auditors, and a clause on the consequences of audits that deals with extension of findings. In plain terms, a weakness found in one project can prompt questions about others that used the same process. An agent that applied the same classification rule across thirty grants is one finding multiplied by thirty.

  3. Public-law rules on AI apply to you directly. The EU AI Act asks deployers of certain high-risk AI systems that are bodies governed by public law, or private entities providing public services, to perform a fundamental rights impact assessment before use, and to notify the market surveillance authority of the results. Deployers of high-risk systems must also keep the logs the system generates, where under their control, for at least six months. The Digital Omnibus moved the application date for Annex III high-risk obligations to 2 December 2027, so check the final text and your timeline. Which of your systems count as high-risk depends on what they do, and that includes systems used to assess eligibility for public benefits and services.

  4. Cyber and incident rules are stricter for public bodies. Under NIS2, public administration entities of central governments are essential entities, regional ones are covered on a risk basis, and member states may extend coverage to local governments. A significant incident triggers an early warning within 24 hours, an incident notification within 72 hours and a final report within one month. If an agent is involved in an incident, you need to reconstruct what it did quickly.

Add to this the usual public-sector layer: data protection law, public procurement rules, freedom of information duties in many countries, and the expectation that public money is spent transparently. The result is an organisation that is asked to prove its decisions more often than almost any other.

The case: the research office and the cost classification agent

This is a composite, with invented names. A university research office, call it Northfield University, uses an AI agent to prepare the cost statements for dozens of EU and national grants. The agent reads time records, invoices and payroll extracts, classifies each item against the cost categories in each grant agreement, and drafts the periodic financial report. A research accountant reviews a sample before submission.

Year one. The agent classifies a recurring item, a shared equipment service contract, as a direct eligible cost for twelve projects. A prompt update in month five changes how it reads certain invoice descriptions. Staff turnover follows. The accountant who set up the review sample leaves.

Year three. After final payment, a funder audit selects one of the projects. The auditor asks about the service contract cost: why was it classified as direct eligible, which version of the grant rules was applied, what evidence supported it, who verified it, and was the same treatment applied elsewhere?

What Northfield has. The final report, the invoices and some application logs. The logs show the output, not the reasoning inputs. The prompt version in force that month is unclear. The reviewer has left. The agent's classification of the same item in other projects cannot be listed without re-running the whole year.

What the auditor does. Finds the cost ineligible in this project, and asks whether the treatment applies to other grants. The university spends weeks reconstructing, and the answers are partly guesses. Recovery is demanded on the one project, and the finding is extended to the others.

None of this requires fraud. It requires only that nobody could show how the decision was made.

What an auditor, funder or regulator will ask
What source documents did the agent use for this item?
Which version of the grant rules and which cost category definitions applied?
Why was it classified this way?
Who verified it, what did they see and when?
Which model, prompt and configuration were in force?
How many other items and projects were treated the same way?
Has the record been altered since?
Can you produce it for the full retention period?
Why ordinary logs fail the funded organisation
They rotate long before the retention period ends, which can be five years or more after final payment.
They record outputs, not the sources, rules and versions behind them.
They cannot list everything affected by one faulty rule.
They do not show who reviewed what.
They can be edited, and an auditor's first question about any record is whether it is original.
They sit in vendor systems you may no longer have access to when the audit arrives.
Step 1: map agent work to obligations

Start with a register, not with technology. List every task an agent performs, and for each one record which obligation it touches.

Agent task Obligation touched Evidence needed later
Classify costs against grant categories Eligibility of costs, record keeping, audit Source docs, rule version, classification, reviewer
Draft periodic technical or financial reports Reporting accuracy Inputs, draft, edits, approver
Answer citizen or applicant questions Duty of care, transparency Question, sources used, answer, handoff
Triage applications or benefits Fundamental rights, non-discrimination, explanation Inputs, criteria, outcome, human review
Draft procurement documents Procurement rules Sources, changes, approver
Handle incidents or alerts NIS2 reporting, security Timeline, actions, evidence

For every row, name an owner. A task without an owner will not have evidence.

Step 2: record decisions as linked chains tied to the funding context

Each decision should be linked to the grant, work package or programme it affects, so that an audit by grant, by rule or by period is a query and not a project.

python
src = await db.log(agent="grants-cost-agent", event="source_item",
data={"grant": "HE-101012345", "wp": "WP3", "item_ref": "INV-77421",
"doc_sha256": "", "period": "RP2"})

rule = await db.log(agent="grants-cost-agent", event="rules_applied",
data={"grant_rules": "HE-MGA v1.2 Art 6", "national_rules": "UNI-POLICY-2026-04",
"category_table_v": "9", "prompt_v": "v18", "model": "provider-model-2026-03"},
parent_id=src.id)

cls = await db.log(agent="grants-cost-agent", event="classification",
data={"category": "direct_equipment_service", "eligible": True,
"basis": ["service contract used only for project equipment"],
"confidence": "medium"},
parent_id=rule.id)

Store references and digests of documents, not full copies, and apply redaction before storage for personal data.

Step 3: separate agent judgment from verified decisions

Where money or rights depend on a decision, record the human step with what the person saw.

python
rev = await db.log(agent="research-accounts", event="human_review",
data={"reviewer": "u-acct-12", "saw": ["invoice", "contract", "classification_basis"],
"action": "confirmed", "sample_type": "risk_based"},
parent_id=cls.id)

Do not log only that someone clicked approve. Log what they were shown, what they changed and why. An auditor will weigh a review more heavily when it shows engagement with evidence.

Step 4: add rules outside the model for the costly mistakes

Put deterministic checks around the decisions that matter most. Examples for a research office: a cost above a threshold needs human review, a cost type flagged as ineligible by the programme's rules cannot be marked eligible by the agent, and an item that matches a known risky pattern, such as shared equipment or overheads, must be flagged.

python
await db.log(agent="grants-cost-agent", event="rule_check",
data={"rule": "shared_equipment_needs_review", "result": "flag", "blocking": True},
parent_id=cls.id)

A flagged item is held for review. The audit record explains afterwards. The rule prevents.

Step 5: use impact queries to answer extension of findings

When an auditor, or your own review, finds a faulty rule, prompt version or classification pattern, you need to know every item that used it, across every grant.

python
affected = await db.impact(rule.id)

Use it before the funder asks. List the items, correct or document each, and approach the funder with a complete picture. Voluntarily scoping and correcting a problem is a stronger position than having it extended to you.

Step 6: align retention with the funding clock

Set retention from the longest obligation that applies, not from your IT default.

Funding. At least the period in the grant agreement, such as five years after final payment for larger Horizon Europe grants, and longer if an audit is open or national rules require.
Legal hold. When an audit, investigation or dispute starts, suspend deletion for the relevant records.
Data protection. Keep personal data only as long as needed, and decide in advance how erasure requests interact with an integrity-protected record. ZizkaDB supports redaction before storage and forget with tombstones, and your data protection officer should approve the approach.
Exportability. Export and archive before systems are retired, and test that archives can be re-imported and verified.
python
export = await db.export_events(agent="grants-cost-agent", since="2026-01-01", until="2026-06-30")
Step 7: make the record tamper evident, with custody you can defend

Every event in ZizkaDB carries a SHA-256 checksum chained to the previous one for that agent. Any edit, deletion or reordering breaks the chain. Verify on a schedule and store the chain head somewhere your own system administrators cannot edit, such as your records management system or your internal audit function.

python
check = await db.verify_chain(agent="grants-cost-agent")

store check.head with internal audit, and log the verification date

When an auditor asks whether the record is original, you can show a verification result and the independently held head. That proves the record has not changed since the head was stored. It does not prove the record was complete.

Step 8: prepare for the incident clock

If an agent is involved in a security or data incident, NIS2-type reporting starts at awareness: early warning within 24 hours, notification within 72 hours, final report within one month. Prepare in advance. Make sure you can freeze and export the relevant chain, list every action the agent took in the window, scope affected records through the impact query, and show who did what during the response. Our incident response how-to covers the 72 hour runbook in more detail.

Step 9: give auditors a clean, safe way in

Create an audit access procedure before you need it.

Use read-only, expiring keys scoped to the grant, period or decision set requested.
Provide a standard export with the chain verification result.
Keep a log of who accessed what.
Run a dry audit once a year with someone outside the team.
python
await db.log(agent="audit-desk", event="auditor_access_granted",
data={"auditor_org": "funder-audit-unit", "scope": "grant HE-101012345",
"expires": "2026-12-31", "approved_by": "u-compliance-3"})
Step 10: choose infrastructure that fits public-sector constraints

Publicly funded bodies often face procurement rules, data residency expectations, sovereignty concerns and vendor exit requirements. Design for them.

Self host inside your own environment or an EU-based environment you control, so the evidence stays in your custody.
Avoid lock-in. Choose tools that are open source, so your team and your auditors can inspect the code, and that are model, LLM and cloud agnostic, so you can change providers without losing history.
Keep it small. A single container on Postgres is easier to secure, accredit and operate than a sprawling platform.
Plan exit. Test exporting and re-importing your records.

ZizkaDB's core is AGPL-3.0, runs self hosted in a single Docker container, and can be placed inside the environment you choose. Whether it meets your security and procurement requirements is for your own teams to decide.

Business objectives and how to measure them
Objective Measure
Protect funding from recovery Share of audited items with a complete evidence chain; ineligible cost found per audit
Cut audit preparation time Hours to answer an auditor request, before and after
Contain a finding early Time from discovering a faulty rule to listing all affected items
Support AI governance duties Share of agent decisions with a full record; FRIA evidence ready
Strengthen future bids and procurement positions Evidence packs provided to funders and partners on request
Reduce reputational risk Citizen complaints resolved with a verifiable account
An illustrative exposure example

This is invented, to show the logic. A university manages 40 EU and national grants worth 20 million euros over the reporting period. If a systematic classification weakness caused 2 percent of the claimed costs to be later found ineligible, the exposure would be 400,000 euros, before the cost of the audit itself and the staff time to rebuild evidence. Even a modest reduction in that risk, or in the time to scope it, can justify the effort of recording decisions properly. Use your own figures.

Common mistakes
Treating AI as an IT matter. The obligations belong to finance, research administration, legal and service owners, not only to the technology team.
Keeping logs for 30 days and grants for 5 years. The shortest retention in the chain sets your real position.
Letting an agent decide eligibility alone. Put rules and human review around money and rights.
Recording output only. An auditor needs sources, rules and versions.
Forgetting the review step. Show what the reviewer saw.
One copy, one custodian. Store the chain head elsewhere.
Assuming the vendor holds the evidence. If the contract ends, so can your access.
Ignoring erasure. Decide the approach before the first request.
A 30 day plan

Days 1 to 5: build the obligation register. List agent tasks, the obligation each touches, the retention period that applies and an owner.
Days 6 to 10: choose one high-value workflow, such as cost classification, and define its event model with research administration, legal and your data protection officer.
Days 11 to 15: instrument the workflow with source, rules, classification and review events, and add the blocking rules for the highest risk items.
Days 16 to 20: set retention and legal hold, test export and re-import, and verify the hash chain with the head held by internal audit.
Days 21 to 25: run an impact query on a seeded faulty rule and measure how fast you can list affected items across grants.
Days 26 to 30: run a mock audit with someone outside the team using the eight questions above. Record the gaps, assign owners and agree the next workflow.

Where ZizkaDB fits, and its limits

ZizkaDB is an open source causal audit database for AI agents. It records each decision as a linked event, answers why() for any outcome, lists everything downstream of a faulty input through the impact route, supports replay and drift baselines, and shows whether stored history has been altered through a SHA-256 hash chain. It is model, LLM and cloud agnostic, and it runs self hosted in a single Docker container, with a managed Cloud edition at db.zizka.ai for multi-agent setups.

It does not decide whether a cost is eligible, assess fundamental rights impacts, report incidents or make a body compliant with any rule. It records what your system captures, so the rules and reviews you add are what prevent errors. The open source edition records one agent per install, so fleets and agent to agent flows use the Cloud edition or separate instances. Take advice from your legal, audit and data protection teams on retention, erasure and what the funder requires.

If you rely on public money and use AI agents, choose one funded workflow this week and trace one claimed cost from the source document to the final report. If you can do it in minutes and show the record is original, you are ready for the audit. If you cannot, you have found the gap before the auditor did.

Corrections: if you represent a party mentioned here and believe a statement is inaccurate, contact us and we will review it promptly.

Sources: Horizon Europe Model Grant Agreement, Articles 20 and 25 (European Commission, EU Funding and Tenders Portal, version 1.2, June 2026), with guidance summaries from the Canadian ISED Horizon Europe guide and the Austrian Research Promotion Agency (FFG); EU AI Act Article 27 and Recital 96 (AI Act Service Desk and artificialintelligenceact.eu) and Article 26 (AI Act Service Desk); Digital Omnibus on AI (Regulation (EU) 2026/1744) commentary; NIS2 Directive (EU) 2022/2555 with Irish NCSC, Finnish NCSC and Morrison Foerster guidance; ZizkaDB documentation.

📰 Read the original article on Dev.to AI

Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.