Wirity Labs
Back to Blog

How We Built an EU-Compliant AI Agent for Our SME Clients: A CTO’s Playbook

A step-by-step guide to building AI agents that don’t just work, but meet EU regulations without breaking the bank.

How We Built an EU-Compliant AI Agent for Our SME Clients: A CTO’s Playbook
Madusha Sandaruwan Nov 25, 2025 8 min read
Table of Contents

The Wake-Up Call That Changed Everything

Last quarter, our largest German manufacturing client dropped a question that stopped me mid-sentence: “Is your AI sales assistant EU AI Act compliant? We need documentation by Friday.”

We had 48 hours.

My team had built a clever agent that streamlined their quote-to-order proces,s cutting response times by 60%. But while we were solving business problems, the regulatory landscape shifted beneath our feet. That Friday deadline forced us to move from “move fast and break things” to “move fast and comply.”

Here’s what we learned while helping a German wholesaler shrink a two-hour quote into a two-minute chat: most SMEs feel stuck between hiring one of the Big Four for €30 k and a PowerPoint graveyard, or sneaking in a US tool and hoping no one asks where the data sleeps. We didn’t love either option, so we tried something else. Three weeks, one Mistral instance, and €3 200 later, we had an agent that keeps its logs in Frankfurt, its confidence score above board, and our client so calm they referred us to their biggest competitor. This is the short version of how we got there.

Understanding the EU AI Act (Without the Legal Jargon)

The EU AI Act isn’t here to kill innovation; it’s here to categorize risk. For SMEs, most business AI tools sit in two categories:

Minimal Risk (Your Spam Filter, Inventory Forecasting)

  • No mandatory obligations
  • Best practice: Document what you’re using and why
  • Limited Risk (Chatbots, Content Generation, Our Sales Agent)

  • Core requirement: Transparency
  • What this means: Tell users they’re interacting with AI, keep a human in the loop for critical decisions
  • The Good News: the Act contains multiple SME targeted measures rather than a single list. Key wins:

  • Reduced conformity fees that scale with company size
  • Standardized documentation templates provided by the EU Commission
  • Priority access to regulatory sandboxes for testing
  • Lower fines for SMEs: capped at the lower of 35 million euros or 7 percent turnover
  • Translation: if you’re under 250 employees and 50 million euro turnover, the EU is deliberately trying to make compliance less painful for you.

    Why Mistral AI Studio (And Not ChatGPT Enterprise)

    When we evaluated platforms, compliance wasn’t just a feature—it was architecture. Here’s why Mistral AI Studio won:

    Data Sovereignty by Default

  • EU-based company (Paris) with EU-hosted infrastructure
  • No US data transfer in our deployment model
  • GDPR compliance is built into data processing agreements
  • Observability That Auditors Actually WantMost platforms give you API logs. Mistral gives you:

  • Full traceability: Every agent decision is logged with context
  • Human-in-the-loop controls: Built-in approval workflows for high-impact actions
  • Model lineage: Document which version made which decision
  • This turned our audit from a nightmare into a 30-minute conversation.

    Agent Runtime for Business Logic didn’t just need an LLM—we needed an agent that could:

  • Query our client’s SAP system (custom connector)
  • Apply EU-specific pricing rules (deterministic code)
  • Escalate exceptions to human sales managers (workflow orchestration)
  • Mistral’s Agent Runtime let us combine LLM intelligence with deterministic business rules, critical for compliance and reliability.

    Cost comparison:

  • US-based alternative: €12,000/year + legal review fees
  • Mistral AI Studio: €3,200/year (Pro tier + dedicated EU hosting)
  • Step-by-Step: Building a Compliant Sales Agent

    Here’s the exact architecture we implemented for our client, a 50-person industrial parts supplier in Stuttgart.

    Step 1: Map Your AI Risk Level (1 Hour)

    Our agent’s function: “Automate quote generation for existing customers based on historical pricing and inventory.”Risk assessment:

  • Not high-risk: No automated decision-making about credit, employment, or safety
  • Limited risk category: Requires transparency + human override
  • No biometric/profiling: Just processing business transactions
  • Step 2: Design for Transparency (2 Hours)

    User notification: Every email generated by the agent includes: "This quote was automatically generated by our AI assistant. A sales manager will review and approve within 2 hours. Questions? Reply to escalate to human support."Internal dashboard: Real-time view of:

  • Agent actions pending approval
  • Confidence scores for each quote
  • Full conversation history with customers
  • Step 3: Implement Human Oversight (1 Day)

    // Simplified from our production code
    if (quote.amount > 10000 || quote.discount > 0.15) {
      await agent.holdForApproval({
        reason: "High-value quote requires manager review",
        assignee: salesManager.email,
        timeout: 7200 // 2 hours
      });
    }

    Step 4: Build Your Audit Trail (2 Days)

    What we logged:

  • Timestamp, user ID, input prompt
  • Model version (e.g., mistral-small-24-09-25)
  • Retrieved data sources (SAP inventory, CRM history)
  • Final output and any modifications
  • Human approval/rejection with reason
  • Storage: Encrypted EU-based PostgreSQL, 90-day retention (aligned with business needs).

    Step 5: Create Compliance Documentation (1 Day)

    Our AI Act compliance file (12 pages total):

    System purpose and risk classification

    Data flow diagram (customer request → SAP → Agent → Email)

    Human oversight procedures

    Transparency measures

    Monitoring and logging protocol

    Incident response plan (what if agent quotes wrong price?)

    Training records (sales team AI literacy)

    Real Results: 90 Days After Launch

    MetricBefore AgentAfter AgentImprovement
    Quote response time8 hours47 minutes90% faster
    Manual processing cost€14/quote€4/quote71% cheaper
    Human escalation rateN/A27%Acceptable
    Customer satisfaction7.2/108.9/1024%
    Compliance audit timeN/A30 minutesPass

    Unexpected benefit: Our client’s sales team now spends time on relationship building, not copy-pasting from SAP.

    The Three Mistakes We Made (So You Don’t Have To)

    We thought we were being thorough by storing every byte the model touched. Two weeks later the cloud bill arrived and we realised we’d logged ourselves into a €600 hole. Now we only keep the moments that matter: the decision, the data it looked at, and the edit it made. Storage dropped by 92 % and the regulator still gets a clean trail.

    Human override used to be “if it feels weird, ping us”. That line doesn’t look clever in an audit. We replaced gut feel with a single number: confidence < 0.82 or any mention of a discount > 5 % → human eyes only. Suddenly, the sales team knows exactly when to step in, and the auditor knows exactly why they did.

    The biggest surprise was the staff workshop. I ran a one-hour Zoom call from my spare room in Kelaniya, screen-shared a few agent bloopers, and taught the German sales reps how to say “that’s not right” in SQL-ese. They loved it; the EU AI Act loves it; we now tick the “AI literacy” box without hiring a training company that charges per syllable.

    Your 90-Day Action Plan

    Week 1-2: Inventory panic

    We opened a shared Google Sheet and listed every place a model touches data: the Zendesk macro, the Python script that cleans leads, and the new Notion AI thing marketing just turned on. One afternoon, three coffees, done.

    The sheet itself became Annex A of our compliance file.

    Week 3-4: Draw the spaghettiI screenshotted the SAP export, the WhatsApp forward, the four-hour Excel marathon that followed, and drew a box over every step a machine could own. Under each box we wrote the sentence a user will see: “This summary was generated by AI, you can ask for a human at [email protected].”

    If we couldn’t fit the sentence in the box, the box stayed human.

    Week 5-8: Ship the ugliest pilot

    We pointed the agent at an internal Slack channel nobody cares about and let it suggest replies to “Where is the PO for 473922?”It crashed twice, hallucinated a customer that doesn’t exist, and taught us exactly which logs we’d actually read when something breaks.

    Cost so far: €37 in Mistral credits and one Saturday.

    Week 9-12: Validate

    We ran the agent side-by-side with the sales rep for fourteen days. Every mornin,g the rep opened a Notion page, pasted the agent’s top three suggestions, and wrote “KEEP” or “NAH”.That page became our validation report. On day 1,5, we flipped the switch and kept the human veto button glowing green in the corner.

    Nobody noticed the handover, which is the whole point.

    Compliance Doesn’t Have to Be Expensive

    The first quote we got was €28 k for a “preliminary gap analysis” and a deck we could have generated ourselves. Instead, we spent €3 200 in platform fees and forty hours of developer time—most of it waiting for SAP to export CSVs.The sandbox programme the Commission is running accepted our application in six days; the simplified template dropped the word-count from 60 pages to 12. Building for the Act from day one turned out to be cheaper than apologising later.

    What I Want You to Take Away

    As a CTO in Sri Lanka serving EU clients, I’ve learned that compliance is a competitive advantage. Our German client didn’t just stick with us—they referred us to three other SMEs facing the same question. The EU AI Act isn’t a barrier. It’s a blueprint for building trustworthy AI that scales .You don’t need a 10-person AI team. You need:

  • One developer who understands your business logic
  • A platform built for EU compliance (Mistral AI Studio in our case)
  • A willingness to document what you’re doing (not as scary as it sounds)
  • The window for early compliance is open now. By August 2026, when the Act is fully enforced, early movers will have a massive trust advantage.

    Technical Appendix (For Your Developer)

    Stack we used:

  • Mistral AI Studio (Agent Runtime)
  • Node.js/Hono (or Net) for API layer
  • PostgreSQL on Hetzner (or Azure) (EU hosting)
  • Keycloak for authentication
  • Langfuse for observability
  • Key Mistral features leveraged:

  • Custom tools (SAP connector via MCP)
  • Workflow orchestration (approval loops)
  • Model versioning and A/B testing
  • Compliance libraries:

  • GDPR logging middleware
  • Want the GitHub repo? Email me, happy to share the non-proprietary parts.

    Madusha Sandaruwan

    Madusha Sandaruwan

    Co-Founder & CTO

    Microsoft AI and GitHub Security-certified engineer leading product delivery.