AI for law firms: why it has to run in-house, and how to fence in an agent (before it sends an email in your name)
For a law firm the main road is artificial intelligence running on a machine the firm owns. And once AI becomes an agent, it needs an enclosure that decides folders, addresses and credentials. We said it to the lawyers of AIGA Benevento, at the Rocca dei Rettori, on 16 November 2026: the questions from the room and the answers.
For a law firm the main road is artificial intelligence running on infrastructure the firm owns, with an open model: it is the only setup in which confidentiality depends on the machine rather than on a vendor's contract. And once AI becomes an agent, it also needs an enclosure that decides which folders it sees, where it connects and what it can send.
I said it on 16 November 2026 at the Rocca dei Rettori in Benevento, in the council hall of the Province, at the conference Professionisti e imprese nell'era dell'AI. Nuove regole, nuove responsabilità, nuove opportunità (Professionals and businesses in the age of AI: new rules, new responsibilities, new opportunities), organised by the Benevento section of AIGA, the Italian Association of Young Lawyers: three continuing education credits, one of them in professional ethics (Benevento Bar). It was the third stop in six days with lawyer Armando De Lucia, member of the AIGA National Department for Artificial Intelligence and Electronic Proceedings, with whom I host the podcast Innovazione Sotto Processo. As always, I brought the machine and he brought the rules.
The material was the same as the Caserta lab and the Avellino conference, in a thirty-minute version. The audience had been invited to ask questions during the talks as well, and the questions came. They did not ask what AI can do: they asked where it has to run, and how you keep it in check once it starts acting.

Why should a law firm use local AI?
Because it is the only way in which protecting client data depends on the firm, and not on a vendor's contract. In the room I put it this way: data «can only be protected if the infrastructure where artificial intelligence runs is owned». It does not have to sit in the office, it can be a server hosted elsewhere, but it has to belong to the firm. The model running on it is an open model, free, installed in-house: on my slides I mentioned Gemma and Mistral and, among the Italian ones, Minerva and Velvet.
Armando explained why this weighs more for a lawyer than for a company: «For me, privacy, from 0 to 10, is a 5. Secrecy is a 10». Data protection applies to everyone, professional secrecy is a lawyer's duty, and a much stricter one. Then he took an example from his family history: whoever farmed the land of a Neapolitan nobleman did not own it, had the right to work it and in return owed him a share in kind. Those contracts, however, came with protections, such as a minimum term. With the AI of the big vendors, he said, we contribute the data and the value stays with them, without even those protections. The advantage has to stay «with the lawyer, with the accountant, with the business, not with these private companies».
Main road does not mean everything at once. There are three routes for data, and I compared them in the Caserta write-up: the free chat, where data goes to the vendor and can train its models; the professional plan, where confidentiality is a contract; the in-house model, where confidentiality is the machine. For filings, case files and credentials the destination is the third. Until the firm has its own machine, the bridge is the second, with the contract actually read. The first, never.
A warning for anyone planning to get by with anonymising documents before uploading them: anonymisation done with AI is not deterministic, meaning the same request does not always give the same result. It cannot be left to a machine without supervision, because one name slipping through once is enough for it to leave the firm.
How much does an AI server cost for a law firm?
The model is free, you pay for the machine: for a server that serves the whole firm my estimate, given in the room, is about 10,000 euros, while to try things out a laptop with an 8 GB graphics card is enough. The machine is sized on the people who use it, and this is the table I showed on the slides:
| What for | Which machine | Memory for the model |
|---|---|---|
| Trying it out | A laptop with a graphics card | 8 GB |
| A few people, every day | A powerful computer | 16-32 GB |
| The whole firm | A server in the office | 128 GB |
The 8 GB come from the test I measured on my laptop on 8 November 2026, described in the article on the Caserta lab. The other two rows are indicative sizing, taken from model and hardware specifications: OpenAI states that its open model gpt-oss-20b runs «within 16GB of memory» (model card), and NVIDIA's DGX Spark, a desktop computer designed for local AI, goes up to 128 GB of memory shared between processor and graphics (NVIDIA). The comparison between an in-house machine and the cloud, with list prices, is in On-premise AI for SMEs.
A participant picked up that figure straight away, and that is where the most interesting question of the evening started.
Can an AI agent send an email in a lawyer's name?
Yes, if you give it permission, which is exactly why you do not. The question from the room was this: I put the 10,000 euro server in the office and the agent starts working with the instructions I gave it, but does it stay connected to the network? Because handing your mailbox to an agent, he said, means risking your own name under an email you never sent, if someone has tampered with its instructions.
The risk is real and it has a name: prompt injection, meaning a document coming from outside, such as the attachment of a PEC (Italy's certified email), carrying hidden instructions for the model. It is the first entry in the OWASP list of risks for applications built on language models, which admits it is unclear whether fool-proof prevention methods exist.
My answer came in two parts. First: the server is yours and you can connect it to whatever you like, but every task you hand to the agent is given with the principle of least privilege, meaning only the permissions it cannot do without. If the agent works on the mailbox to sort it and prepare drafts, it must not have permission to send. Second: a model's built-in protections, the ones that stop it from doing harmful things, are limited, and on an open model they can be removed. So security cannot sit inside the model: it has to sit around it.

How do you secure an AI agent in a law firm?
You close it inside an enclosure where everything is forbidden except what the firm has written down. The example I gave in the room is OpenShell, an open source environment from NVIDIA under the Apache 2.0 licence, announced on 16 March 2026 as an isolated sandbox «that adds data privacy and security to autonomous agents» (NVIDIA press release).
The principle fits in one line of the project: «You declare what each agent can touch in a policy, and OpenShell enforces it». The firm writes in a file, the policy, what each agent may touch, and OpenShell enforces it. Everything else is blocked: «OpenShell denies every outbound connection from a sandbox unless a rule in network_policies allows it». This is what the policy decides according to the documentation, read on 17 November 2026:
| What | What the policy decides | An example for the firm |
|---|---|---|
| Folders | Only the declared paths | The agent sees the PEC folder, not the case file archive |
| Network | Only approved destinations | It talks to the in-house model and the mailbox, nobody else |
| Requests | It can read from a service without being able to write to it | It reads mail, it does not send |
| Credentials | Used only towards authorised addresses | The mailbox password goes nowhere else |
| Model | Data goes only to approved models, including one hosted by the firm | Filings and case files stay on the firm's server |
This is the granular control of data I talked about in the room: not a promise from the model vendor, but a file the firm writes, keeps and can have audited. The documentation itself suggests keeping policies under version control, meaning with a history of who changed what and when, as security controls «that can be reviewed and audited».
Two warnings, because an enclosure is not a certificate of trustworthiness. OpenShell is young: in November 2026 it is at version 0.1.9, released on 17 November (GitHub), and it has to be installed and configured by a technician, not downloaded and opened like any program. And the enclosure limits the damage, but it does not replace the firm's rules: limited keys, a written procedure, nothing sent without a signature, every step logged. They are the same rules with which you govern an agent like a trainee. What happens to an agent with access to everything I tried with an autonomous agent I uninstalled right away.
How do you keep unauthorised AI out of a law firm?
With an inventory and a regular check. The risk has a name, shadow AI, and in the room I described it like this: the firm adopts no tool, then a colleague is given an impossible deadline, and they use AI anyway, on their own. The remedy I proposed has two steps. First you list the processes touched by artificial intelligence and classify them by risk. Then, if not every week, at least once a month, you check with your colleagues that no new tool, free or paid, has come in without anyone knowing.
What does Italian law 132/2025 say about AI in a law firm?
Article 13 of law 132/2025 allows artificial intelligence in the intellectual professions only for instrumental and support activities, and requires the professional to inform the client. In Benevento Armando covered it in the legal part: the tool prepares the draft, then it stops, and the lawyer signs. The legal analysis is his, and here I report what he said, not an opinion.

If the tool gets it wrong, the lawyer is responsible, on three fronts: towards the client, for the contractual relationship; towards the Bar, for professional ethics; towards the justice system, up to aggravated liability under article 96 of the Italian code of civil procedure. Armando's seven rules for the firm are in the Avellino write-up. How I brought the same talk to thirty minutes, with questions along the way, is on my personal website.
Frequently asked questions
Is local AI safer than the cloud for a law firm?
For confidentiality yes, for the rest it depends on the firm. With a local model, filings and case files do not go out to a vendor, and professional secrecy does not depend on someone else's contract. The security of the machine, however, becomes the firm's job: access, updates, backups and agent permissions. That is why the main road is local AI configured by a technician, and in the meantime the professional plan with a contract, never the free chat.
How much does local AI cost for a law firm?
The model is free: open models such as Gemma or Mistral install with free programs such as Ollama or LM Studio. You pay for the machine. To try it out a laptop with an 8 GB graphics card is enough, a few people every day need a computer with 16-32 GB, the whole firm a server with 128 GB. The latter, according to the estimate I gave at the AIGA conference in Benevento on 16 November 2026, costs about 10,000 euros.
What is NVIDIA OpenShell and what is it for?
OpenShell is an open source environment from NVIDIA, under the Apache 2.0 licence, that runs each AI agent inside an isolated enclosure. Announced on 16 March 2026, it enforces a policy written by whoever uses it: which folders the agent sees, which addresses it connects to, which credentials it uses and which models it sends data to. Anything the policy does not allow is blocked. In November 2026 it is at version 0.1.9 and has to be configured by a technician.