How to let staff and AI agents build internal tools without losing control
Your employees are already building software with AI. Someone in finance has a reconciliation tool written with an AI coding assistant. Someone in operations has a dashboard built in an afternoon. Someone else asked an agent to “make a small app for the team” and it did. The question is no longer whether people in your company will build internal tools with AI. It is where those tools run, who can see the data in them, and what happens when one of them breaks or leaks.
This post is for the IT, security or platform lead who has noticed this happening and has to decide what to do about it. Banning it does not work, and ignoring it is how a spreadsheet of customer data ends up on a public URL. There is a third option: give these tools one governed place to land, where the safe way to ship is also the easiest way. Here is how to design that.
The problem: a new kind of shadow IT
Shadow IT is not new. People have always bought tools on a credit card or kept critical processes in a personal spreadsheet. What AI coding tools change is the scale and the nature of it.
- The volume. Building a small web app used to take a developer days. Now a non-developer can produce one in an hour. A company that had a handful of unofficial tools can soon have dozens, then hundreds.
- The capability. These are not spreadsheets. They are real applications, with databases, logins (or no logins), integrations and API keys, connected to company data.
- The hosting. They end up wherever is easiest for the person who built them: a personal account on a hosting platform, a free tier somewhere, a laptop left running.
- The authors. Increasingly, the “developer” is an AI agent acting on someone’s behalf, deploying code its user never read.
The typical result is a long tail of small apps with company data, no single sign-on, no backups, no owner, no audit trail and no security review. Security teams often cannot see them at all, and when they do, they have two bad choices: shut them down and become the department that blocks useful work, or approve them one by one and become the bottleneck.
Why banning it does not work
The instinct is to write a policy: no AI-built apps outside the official development process. It fails for predictable reasons.
The value is real. The finance analyst’s reconciliation tool genuinely saves hours each week. People will not give that up because of a policy, they will just stop telling you about it.
The tools are everywhere. AI coding assistants are built into editors, browsers and chat apps. You cannot block them all, and blocking the obvious ones pushes people to less visible ones.
The official process is too slow for small things. If getting a tiny internal tool approved takes a month of tickets, people will route around it. Every time.
A ban moves the problem out of sight. The goal should be the opposite: bring it into view, and make the governed path faster than the ungoverned one.
The principle: one paved road
The approach that works is what platform teams call a paved road: a single, well-maintained path from “I have some code” to “it is running for my team”, with security and operations built in. People use it because it is the easiest option, not because they are forced to.
For AI-built internal tools, the paved road has to meet a high bar. It must be as easy as the personal hosting account it replaces, ideally a single command or a single instruction to an agent. And everything that makes it safe must happen automatically, without the author having to know or care.
That second point is the whole design. The people shipping these tools are not security experts, and the agents writing the code will do whatever they are told. The secure option has to be the default, and opening anything up has to be a deliberate, recorded decision.
What the paved road needs
These are the capabilities we consider essential. They are drawn from building exactly this kind of platform; the details are in our governed app platform case study.
Private by default
Every new app starts behind company sign-in, visible only to the people who should see it. No app is ever public by accident. Going public, or getting a custom domain, requires an explicit approval from an administrator.
This one rule removes the most common and most damaging failure: an internal tool with real data sitting on an open URL that a search engine eventually finds.
Isolation between apps
AI-generated code will sometimes be careless, and occasionally the code an agent pulls in will be malicious. Each app should run in a sandbox, separated from the others and from the underlying infrastructure, with its network access denied by default. A compromised or broken app should not be able to reach anything else.
In our platform, every app and every build runs in a gVisor sandbox, and workspaces are separated by default-deny network policies, quotas and pod security rules. The specific technology matters less than the property: one bad app stays one bad app.
Checks before anything runs
Before code is built, scan it for secrets: API keys and passwords that people (and agents) paste into code constantly. Before it is rolled out, scan it for known vulnerabilities, and re-scan what is already running as new vulnerabilities are published. These checks should block the obviously dangerous cases automatically and explain why, so the author can fix them without filing a ticket.
Controlled outbound traffic
An internal tool that can send data anywhere on the internet is a data-loss risk. Limit outbound traffic to an allowlist of destinations the app genuinely needs. A “learn mode” that records what an app tries to reach, before enforcing the list, makes this practical: you see the real dependencies instead of guessing them.
Data handled properly
Tools need databases, and the database is usually where the real risk lives. Each app should get its own managed database, firewalled to that app, with continuous backups and point-in-time restore. When someone’s AI-written migration deletes a table, restoring it should be a routine action, not a crisis. Anyone browsing the data should see it through an interface that masks sensitive fields and gives read-only access by default.
Agents as first-class but limited users
AI agents will deploy code. Design for it rather than against it:
- Give agents a proper interface, such as a command-line tool and an MCP server, so “deploy this” from an AI coding tool lands in the right place.
- Issue scoped, expiring tokens, never long-lived master keys.
- Record every action in the audit trail as the person, via the agent, so accountability stays with a human.
- Let agents request risky changes, like making an app public, but never grant them. A person approves.
That last rule is simple and important. An agent can be manipulated by a prompt hidden in a document or a web page. It should never be able to escalate its own permissions.
Operable without heroics
Every app should get basic operations for free: request, error and latency metrics; uptime checks; searchable logs; and alerts sent somewhere a human will see them. When something breaks, the owner should be able to find out why without asking the platform team.
An owner for every app
Every app needs a named owner, and the platform should know who it is. Apps whose owner leaves, or that nobody has used for months, should be flagged for review and eventually archived. Without this, the long tail grows forever.
Policy still matters, it just comes second
A platform is not a substitute for clear rules. People need to know, in plain language:
- Which data is allowed in self-built tools, and which is not. Customer personal data, payment data and health data usually need extra controls or a proper development process.
- What requires a review: anything public, anything handling regulated data, anything that sends email or changes records in core systems.
- Who owns what: the author owns the app; the platform team owns the platform.
If you want a starting point, our free AI-Built Internal Tools Policy is a ready-to-adapt template covering all of this: a traffic-light data rule, review triggers, ownership and rules for AI agents.
The point of the paved road is that most tools can follow these rules automatically. The policy covers the exceptions, and it is far easier to enforce when the default path already does the right thing.
How to roll it out
A paved road nobody uses is just another platform. Adoption is the hard part, and it usually goes in this order:
- Find what already exists. Ask, without blame, what people have built. Check expense reports for hosting accounts. Most organisations are surprised by the number.
- Start with the people who are already building. Offer to move their tools onto the platform for them. They become the examples everyone else follows.
- Make it faster than the alternative. If deploying on the platform takes one command and a personal hosting account takes ten minutes, people will switch on their own.
- Connect it to the AI tools people use. If an agent can deploy to your platform as easily as to a public host, it will.
- Set a date for the old way. Once the paved road is clearly better, give a deadline after which unmanaged hosting of company data is not allowed, and help people migrate before it.
Build it or buy it?
Few products cover all of this out of the box, though the pieces exist. Broadly, there are three routes:
- Extend what you have. If you already run a container platform with good identity integration, you may be able to add sandboxing, scanning, approvals and agent access to it.
- Assemble from managed services. A cloud provider’s managed containers, databases, identity and logging can cover most of it, with policy and automation glued on top.
- Adopt a dedicated internal platform. Purpose-built platforms for internal apps are appearing. We built our own, which is where the design above comes from.
The right choice depends on your existing infrastructure, your security requirements and how many tools you expect. The wrong choice is to wait, because the number of unmanaged tools grows every month you do.
A checklist for your paved road
- New apps are private behind company sign-in by default
- Going public requires a human administrator’s approval
- Each app runs isolated, with network access denied by default
- Code is scanned for secrets before build and for vulnerabilities before rollout
- Outbound traffic is limited to an allowlist
- Each app gets its own database with backups and point-in-time restore
- Agents use scoped, expiring tokens and can request but not grant risky changes
- Every action is audited as a person, including actions taken via an agent
- Every app has metrics, logs, uptime checks and alerts
- Every app has a named owner, and unused apps are reviewed
Frequently asked questions
What is shadow AI?
The use of AI tools, and increasingly AI-built applications, outside the organisation’s approved and governed systems. It includes employees pasting company data into public AI tools and, more recently, people deploying AI-written internal apps to personal hosting accounts.
Should companies let employees build apps with AI?
Most companies benefit from it, because these tools genuinely save time. The risk is not the building; it is where the apps run and what data they hold. Providing a governed platform that is easier than the alternatives gets the benefit while controlling the risk.
How do you secure code written by AI agents?
Treat it like any untrusted code: run it in a sandbox, deny network access by default, scan it for secrets and vulnerabilities before it runs, give it its own isolated database, and never let the agent grant itself more permissions than it was given. Keep a human accountable for every deployment through the audit trail.
What is a paved road in platform engineering?
A supported, well-maintained default path for building and running software, with security and operations built in, designed to be easier than the alternatives so that teams choose it voluntarily rather than being forced to.
How do you stop internal tools being exposed to the internet?
Make every new app private by default behind company sign-in, and require an explicit, logged approval from an administrator to make anything public. Do not rely on authors remembering to add a login.
The short version
People will build internal tools with AI whether or not you allow it. The way to stay in control is not a ban but a paved road: one place to ship, private by default, sandboxed, scanned, backed up, observable, and with every risky step requiring a human’s approval. Make that path easier than the alternatives and most of the problem solves itself.
If this is landing on your desk and you want help designing or building that path in your own environment, start a conversation.