Skip to main content

Command Palette

Search for a command to run...

Compliance Is the Boring Part of Agentic Apps. Build It First Anyway.

Updated
View as Markdown
Compliance Is the Boring Part of Agentic Apps. Build It First Anyway.
A
Hi, I'm Ayobami Omotayo, an AI-enabled Full-Stack Engineer and educator passionate about building intelligent software that solves real-world problems and empowers communities. I specialize in developing scalable, end-to-end web applications and AI-powered solutions, combining modern frontend and backend technologies with Large Language Models (LLMs), AI agents, Retrieval-Augmented Generation (RAG), and workflow automation to create reliable, production-ready systems.

Every team building agentic software right now is chasing the same question: can the agent actually do the thing? Book the flight, close the ticket, move the money, file the form. Fair enough, that's the fun part.

But there's a second question almost nobody asks until something goes wrong: if the agent did the wrong thing, could you explain why? Not "the model decided to," but an actual chain you could show a regulator or a nervous customer and have it hold up.

That's compliance. And it doesn't work the way it used to. Under the EU AI Act, the toughest obligations for high-risk AI systems, the exact things this post is about, like logging and human oversight, were originally due to land on August 2, 2026. That deadline just got pushed back to December 2027, after EU lawmakers agreed to give companies more time. So there's breathing room. But the direction hasn't changed, only the runway. Regulators are still heading toward requiring this, and building it in now costs a lot less than retrofitting it under a deadline later.

"We log everything" isn't an answer

Old-school compliance is basically about access. Who touched what, when, with what permission. You bolt on some audit logs, add role-based access control, write a retention policy, and a compliance officer signs off and goes home.

Agents break that, because what you're auditing now isn't a fixed path through code. It's a decision. Your agent doesn't run step four because a developer wrote if X then step 4. It runs step four because, given a prompt, a set of tools, and whatever context it pulled in, it decided step four was the move. Do the same thing tomorrow and it might pick step six instead. Same model, different day, different retrieved context, different outcome.

So when someone says "don't worry, we log everything," what they usually mean is they have gigabytes of raw data nobody can actually read. That's not an audit trail. A real audit trail explains itself: why the agent made the call it made, what it did, what information it used to decide, and whether any safety checks caught it or missed it. Someone outside your team should be able to read it and understand what happened, without you in the room to translate.

It's a bigger gap than most teams realise. One recent study found that 82% of enterprises had AI agents running that their own security teams didn't know about. Another found that while most large companies now have someone in charge of AI, only about one in eight of them actually think their AI governance is good enough.

Where I've felt this the most

I've spent most of my career in fintech and energy, and lately I've been pulled deeper into agentic and RAG-based tooling, so none of this is theoretical for me.

Take fraud detection. If an automated system flags or blocks a transaction, "the model was pretty confident" is not going to satisfy a regulator. You need a defensible line from signal to decision, something you could put in front of someone whose job is to distrust you by default.

Or take tax filing. An agent that submits or amends something on someone's behalf can't just be right most of the time. It needs a clear line: what it can decide on its own, and what has to wait for a human to check it first.

Different domains, same lesson: compliance isn't something you log after the fact. It's something you design into where the agent's autonomy actually ends.

What's actually worked, in practice

A few things have made a real difference for me, as opposed to just generating paperwork.

First, track what the agent did, not what it said. A chat transcript is for humans reading in the moment. What you'll need later is a record of every action the agent actually took: which tool it called, with what inputs, what came back.

Second, keep that record somewhere the agent can't touch. If the agent has write access to its own logs, it can quietly edit its own history, whether through a bug or a compromise. Store logs separately, with separate credentials.

Third, don't let the agent do everything on its own just because it can. Give it a wide range of tools if you want, but put a hard stop in front of anything irreversible, moving money, filing something official, deleting a record. Make it wait for a human to confirm first.

Fourth, keep track of what changes. The prompt, the model version, the data it pulled in. If someone asks in six months why the agent did what it did, "here's the current code" won't answer that. You need to know what things looked like on the day it happened.

And fifth, remember who you're really building this for. Engineers want to know "did it work?" Compliance wants to know "who allowed this, and can you prove it?" Those are different questions, and they need different answers.

The unglamorous truth

None of this demos well. Nobody's tweeting about your audit trail. It's not going to be the thing that gets your launch noticed. But it's the thing that decides whether your agent is still running in a year, or whether it's the reason a client's legal team stops taking your calls.

Teams that build this in from the start get to keep shipping autonomy. Everyone else ends up rebuilding it after the incident that forced the conversation, usually at a much worse time, under real regulatory pressure, and with a lot less goodwill in the room.


I write about building in fintech, security, and AI-native tooling. If you're working through similar problems in your own agentic systems, I'd genuinely like to hear how you're approaching it.

J

The audit trail point is spot on. I think many teams focus on making agents smarter but forget they need to understand what happened when things go wrong.

A

Absolutely. An agent is only as useful as it is debuggable. Without a clear audit trail, diagnosing failures, understanding decisions, and building trust quickly become difficult especially in production.

K

The distinction between logging access and being able to reconstruct why the agent acted is the whole thing, and most trace setups capture the former while missing the decision inputs that actually explain a choice. What holds up to a regulator is the prompt, retrieved context, and tool outputs at each step, versioned so you can replay it. Are you storing enough of the run to reconstruct a decision, or just enough to see that it happened?

A

Well said. There's a big difference between knowing an agent executed a task and being able to explain why it made a specific decision.

M

One thing I'd add is that auditability shouldn't be a reporting layer, it should be part of the execution layer. If compliance depends entirely on reconstructing events after execution, you're already relying on inference. The strongest systems I've seen make every high impact action pass through an explicit decision point where policy, intent, and runtime state are evaluated before the action is allowed to execute

M

I like the emphasis on designing for accountability instead of treating compliance as an afterthought. One lesson from building agentic AI solutions at IT Path Solutions is that audit trails, approval gates, and execution logs become just as important as prompt quality once agents start interacting with real systems. They're rarely the features users notice, but they're often the reason a solution is ready for production rather than staying as a demo.

A

Exactly this, prompt quality gets the attention because it is visible, but the boring plumbing (logs, gates, who approved what) is what actually decides if something's production ready or stays a demo. Really good to hear this holds up from the IT Path Solutions side too, thanks for adding that.

M

Great insights! As AI agents become more autonomous, compliance and governance are becoming essential rather than optional. We recently explored how AI-powered WhatsApp agents can securely automate customer support, sales, and business workflows while maintaining trust and scalability. Worth a read for anyone interested in practical AI implementations: https://www.moontechnolabs.com/blog/whatsapp-ai-agents/

A

Thanks for sharing, appreciate the read. Governance for something as customer-facing as WhatsApp agents is also a good example of where this matters.

More from this blog

P

Practical Web Development Tips & Guides - By Ayobami Omotayo

12 posts

TechBytesWithAyo by Ayobami Omotayo is your go-to hub for bite-sized insights on web development, blockchain, AI, and the latest tech trends, simplifying complex topics, one byte at a time.