Studio CodeAI
PROJECTSApril 16, 2026

A Custom Legal Agent for an Accounting Firm: Official Sources, Cost Cut by Ten

An accounting firm supporting some sixty SMEs had subscribed to an AI-powered legal assistance service. The monthly bill exceeded several hundred euros. Yet their staff still spent a third of their time on manual research — because the tool's answers were not reliable enough to trust. The Studio CodeAI team built a specialized agent, deployed within days. Monthly cost: a few dozen euros.

What the Client Needed

The firm's clients regularly asked the same legal questions: notice periods for dismissal, mandatory posting requirements, commercial debt limitation periods. Simple questions — but ones that kept qualified staff occupied for twenty to thirty minutes each time.

The firm had tried to solve this with a general-purpose AI tool. The problem: these tools answer with confidence, but sometimes fabricate legal references that do not exist. Under those conditions, passing an answer on to a client with a verifiable source was impossible. Trust was not there.

The requirement was clear: fast answers, sourced exclusively from official texts, and verifiable by anyone with a single click.

What We Studied

Before building anything, we assessed the available options for accessing French legal texts.

Légifrance is the official source. Navigating it manually works, but it is slow to automate: each search generates dozens of screens to parse. We also evaluated the PISTE API, the official programmatic interface for French government legal data.

Ultimately, MCP Pappers proved the right choice: this tool queries legal articles directly by keyword or reference and returns the full text with the exact Légifrance URL. Two calls suffice where manual navigation required six or seven. We kept Playwright browser navigation for occasional visual verification — proof that the agent is genuinely consulting the source it cites.

What We Built

We designed an agent with a defined identity and strict rules, set in a dedicated configuration file.

The core rule is simple: the agent may only cite Légifrance sources. It never draws on its general knowledge to answer a legal question. If the information cannot be found on Légifrance, the agent says so explicitly and recommends consulting a lawyer. This principle of source governance is what guarantees the reliability of every answer.

Each response follows a structured format: a direct answer in two or three sentences, the legal basis with a clickable URL, a practical implication for the business owner, and a disclaimer on the limits of interpretation.

The agent was also configured by sector — one profile for tradespeople, another for retail businesses — to match the vocabulary and applicable rules to each context.

What We Deployed at the Client's Site

We deployed Claude Code App, Anthropic's desktop interface. No server to manage, no custom application to maintain, no lengthy onboarding.

The firm's staff were fully autonomous in under an hour. They ask their question in plain language; the agent searches, cites, and formats. The answer is ready to forward to the client, with official references attached.

The Results

A question that previously required twenty to thirty minutes of manual research now takes two. Answers are grounded in current legislation, with URLs directly verifiable on Légifrance.

The subscription to the general-purpose AI service was cancelled. The monthly cost of the new solution dropped to a few dozen euros — all in.

Beyond the immediate savings, this is a question of control: the firm knows exactly what the agent bases its answers on, can audit it at any time, and can adapt it whenever regulations change.

This type of agent is not suited to every situation. It answers factual questions about legislation in force — it does not replace legal counsel for complex matters. That is precisely why we designed it to recognize its own limits.

Is your team losing time on repetitive research? Book a call with the Studio CodeAI team to assess what a custom agent could change in your organization.

Book a call