In October, I described how I build software on my own projects: I agree on a goal, and the agents implement, test, deploy and fix their own work. I ended that post with a promise to write about larger organizations. This is that post.
Recently I have worked on one question, as an advisor to a large enterprise with 15,000+ developers: how can teams of hundreds or thousands of developers work with coding agents, and keep the compliance and the guarantees that a company of that size needs?
To answer it, I collected 1,204 public data points on how twenty leading companies work with agents, and I built a prototype to test my own ideas. The companies are divided on almost every question, and many do not publish what they do, so there is no consensus to copy.
This post is the view I formed, described piece by piece, and I say where those companies go a different way. I describe each piece by what it does. Where I name a technology, it is an example and not a requirement, and I am not affiliated with any AI vendor.
Why a local environment setup is not enough
In October I wrote that my agents must not weaken a check without asking me, and that they know this rule because it is written in their instructions. For one person, that is enough. In an enterprise environment it is not. A rule that depends on the agent reading it is a wish. A rule that the system enforces is a control.
With a coding assistant in each developer’s local environment, most rules are wishes:
- Every developer gives the agent a different context.
- The agent works with the access of that developer.
- The company has no shared record of what the agents did.
The control most companies trust is “a person always reviews”. I understand why. But agents produce more changes than people can read with care. When that happens, people start to approve without really looking, and a signature that nobody had time to think about is worse than no signature, because it looks like control.
So the agents need a system around them. It is commonly called a software factory: the layer of orchestration and governance where the agents work. What is central in it is the rules and the infrastructure. The content is not: each team owns its context, its agents and its skills.
1 Request
a person decides what gets built
Software factory
2 Context
How things are done here, and what past work taught.
3 Agents, skills
A catalog. Each one has an owner, a version and a record of results.
4 Sandbox
One for each task. No internet, no permanent credentials. Deleted when the task ends.
5 Model gateway
One door to all models. A spending limit per run. Cost by team and agent.
Controls on everything: identity · permissions · gates · cost limits
7 The record of every change
8 Operation: dashboards, alerts
6 Acceptance
a person reads the evidence
To explain the pieces, I follow one change through the factory. It is a real one from my prototype, on a demo application.
1. The request
A person starts the work. The request was one sentence: sort and filter the transactions of an account, as you would in a spreadsheet.
One sentence is not enough to build from. In most companies, what happens next depends on who wrote it. Some people write a full specification, and some write a title. When people did the coding, this was acceptable, because the developer filled the gaps by asking around. An agent fills the gaps by guessing.
So in the factory, an agent helps the person to finish the request. It reads the context of the project and the company’s template for a request, and it comes back with a few questions. Each question has options and a proposal, so the person can answer in seconds.
In our example it asked three questions that the person had not thought of. Then it wrote the request in the company’s format: what is wanted, eight acceptance criteria that can each be checked, and what is out of scope. When a request is too big for one pull request, the agent proposes to split it.
The agent proposes, and it never decides. The original sentence is kept, and nothing moves until a person approves the definition. I think of the approved request as a ticket for the theatre. It has a fixed format, somebody checked it, and nobody enters without one.
A person, one sentence
"Sort and filter the transactions of an account, as you would in a spreadsheet."
An agent, three questions
- Which columns can be sorted? Proposal: date, amount and description
- Should the filters stay after a reload? Proposal: yes, in the address of the page
- What if no transaction matches? Proposal: an empty table with a message
"Yes to all three."
Request · company format
Sort and filter the transactions of an account
Acceptance criteria · 8
- A click on a column header sorts by that column
- A filter by text, by date range and by amount
- The filters stay after a reload
- and 5 more
- Out of scope
- export to a file
- Size
- fits one pull request
- Original text
- kept with the ticket
Approved by a person
Entry to the factory
This conversation between a person and an agent is what makes the step work with thousands of people. The template and its rules are part of the context: the company owns the base, and a team can add to it. So every request arrives in the same form, from any team, and the questions that an experienced analyst would ask reach everybody. The agents that work on the ticket afterwards always find the same structure.
It also moves the human time to where it is cheapest. When agents write the code, a bad request costs a run and a review. In the prototype, the definition cost a few cents and about a minute. Ten of the twenty companies also put a person here: someone approves the spec or the plan before any coding.
This is where the vision goes in: what deserves to be built, and what a good result looks like.
What it guarantees
Every change has a named person who asked for it, and a definition in the same format, approved before the work started.
2. Context
This is the piece I would keep if I had to keep only one. An agent with no context writes code like a good programmer from anywhere. It does not know your security rules, your architecture, or what you tried last year and dropped. In a large company this knowledge exists, in people’s heads and in old review comments.
Two kinds of text make it usable.
- Knowledge has authority: “this is how we do it here”. Plain documents in a repository, each with an owner and a review date.
- Memory is dated: “this is what happened in ticket 27”. Why a decision was taken, what was tried and dropped, what the reviewer corrected. The agent writes it at the end of each task, and a person reviews it with the code.
Context has levels: company, team and project. An agent receives only what belongs to the scope of its task.
⚠️ What I got wrong: search only
My first version gave the agents a search tool over the documents, and nothing else. One version of an agent searched in places that did not exist. The next version did not search at all. An agent cannot search for something it does not know exists.
What worked was a short index at the start of each task, with one line for each document that says when to read it. And one door: the agent in its sandbox and the developer in a local environment ask the same service, with the same permissions, and every read is recorded.
Three levels
-
Company
security, quality, architecture
-
Team
how payments work
-
Project
decisions, guides, memory
The folder decides who can read it. A task gets only the levels of its scope.
What the agent gets: a short index
- company/security/secrets.md read it when you touch credentials
- company/quality/testing.md read it before you write tests
- project/api-guidelines.md read it when you add or change an endpoint
- project/memory/0182-filter-transactions.md read it when you change the transaction filters
One line for each document it may read. It opens the whole document only when the task needs it.
One door. The same documents, the same permissions, and a record of each read.
The answer I hear most often in the industry is the knowledge graph: a map that connects code, documents, services and decisions. Several of the platforms I studied are built on one, and I expect it to matter more as the context grows. But a graph is an index. It tells the agent where to look. It does not say who owns a rule, or when it was last reviewed. So I would build it on top of the reviewed text, and never in place of it.
Context also has to grow, and so do the skills of the next section. When a senior engineer corrects something in a review, that hour of judgment improves one change. If the correction reaches the shared context, every next task starts with it. So once a week, for each team, an agent reads the new memories and proposes changes to the knowledge, in one pull request. This process is often called dreaming, and Anthropic describes it well in The components of agent memory. In the factory, the dream ends in a proposal: the owner of that knowledge merges it or closes it.
Here are two proposals.
Accepted. In three tasks, a reviewer corrected the same thing: the agent used decimal numbers for amounts of money, and the payments team always uses whole cents. The owner adds it to the guidelines of that team.
Rejected. In three other tasks, the agent skipped a slow test and the change was merged without problems. The proposal is to make that test optional. The owner closes it. Three tasks agreed, but they shared the same wrong idea, and frequency is not authority.
Writing and reviewing context is senior work. I think the time should come from reviewing routine changes, which is where senior time is spent today with less effect.
What it guarantees
Agents follow the rules of the company and of the team, each rule has an owner, and you can show which documents an agent read for any change.
3. Agents and skills
The agent that does the work is a definition: which skills, which tools, which model profile, which limits. Skills turn knowledge into something an agent can run. Both are code. They live in a repository, they have an owner and a version, and every change is a pull request that the owner approves. A repository with these rules is already a catalog.
Ten of the twenty companies put the work in a few agents with many skills, and four prefer many specialised agents. I am with the ten: fewer agents are easier to own and to judge.
The hard question is how to know if an agent is good, and if a new version is better.
⚠️ What I got wrong: a large evaluation system
I built evaluations in three steps, and after a lot of work and a lot of model spend, the result was not conclusive.
- Checks on the text of the answer. They said little about an agent that writes code.
- A model that judged the answer against written rules. The rules are much harder to write than to say.
- Coding tasks scored with hidden tests. They were a lot to maintain.
The system was bigger than the question it answered, and I removed it.
What I kept is simpler: the signals that daily work already leaves in the repositories, and the opinion of the team.
Coding agent · v2.1.0 · last 40 tasks
The result
- Merged36 / 40
- Not reverted in 14 days35 / 36
- No defect reported afterwards33 / 36
The human effort it needed
- Merged at the first review round24 / 36
- No commits from people needed29 / 36
- Did not stop to ask for help31 / 40
Two groups, and no single total. Less human effort is good news only when the result stays as good.
Is the new version better?
- v2.0.0 31 / 40
- v2.1.0 34 / 40
Both repeat the same 40 past tasks. A task passes when the tests that were merged with the original change pass. If the new version is worse, it does not enter. If it is better, a person decides.
Does the team like it?
34 up · 3 down this month
Each vote down comes with a reason: the request, the code, the knowledge, a tool. It goes to the owner of the agent every week.
There is a trap in this kind of scorecard. “No person had to add commits” and “merged at the first review round” look like quality. They can also mean that nobody looked. If you mix the result and the human effort in one score, you reward the agent whose work nobody reviewed. So I keep them in two groups. Less human effort is good news only when the reverts and the defects found later stay low.
A new version of an agent repeats tasks that were already solved, on the code as it was at that moment. The tests that the team merged with the original change decide if a task passes, so there is no separate set of tests to maintain. A person then decides with the two results side by side. Rebuilding those old states is not free, so I would do it for the few agents that carry most of the work.
What it guarantees
No anonymous agent. For every change you know which version of which agent did it, who owns it, and how its past work went.
4. A sandbox for each task
The task gets its own isolated environment, created for that task and deleted when it ends. Something has to create these environments, schedule them and clean them up, hundreds at a time. I call it the sandbox orchestrator.
The sandboxes run on a cluster that the company controls, in its own data centre or in its cloud account, and the cluster grows and shrinks with the work. This takes the limit away from the developer’s machine. Ten agents or a thousand is a question of capacity and cost, and a task that finds no room waits in a queue. Kubernetes is the usual choice today, but the idea does not depend on it.
The sandbox has the code it needs and nothing else. No open internet, and no permanent credentials. The code and the documents in it can still be confidential, so the ways out matter as much as the ways in: the agent reaches the context, the models and the packages only through services that the factory controls.
Never inside
- Open internet
- Permanent credentials
- The keys of the model providers
The sandbox of one task
- One agent, one task
- The code of the project
- The tools to build and test
What comes out: a pull request with evidence, and a preview that lives only for that change.
The only ways in
-
Context
through one door, with a permission check
-
Models
through the gateway, with a key for this run only
-
Packages
through an internal proxy
Who is the agent, for the rest of the company’s systems? In my design, every run acts in the name of the person who started it, with a temporary identity that lasts as long as the run. The agent can never do more than that person, and when the person loses a permission, so do their runs.
Five of the twenty companies say they give the agent an identity of its own. I think both models will live together. In both, no run is anonymous.
The factory also deploys each pull request to a preview: a short-lived environment in the same cluster, with its own address. It runs the application with that change and nothing else, on test data, and the person who accepts opens the link and tries it. The preview is separate from the sandbox. The sandbox is deleted when the agent finishes, and the preview has to live until somebody accepts or rejects the change.
This is the piece that depends most on what a company already has. A sandbox with a preview assumes that the system can be built, tested and started in isolation, with test data that is safe to use. Many older systems cannot do this today. For them, that work comes first, and it helps the people who work on those systems too.
What it guarantees
An agent can only touch what its task needs, it cannot send data out by a path the company does not control, and a mistake stays inside one task.
5. The model gateway
Inside the sandbox, the agent starts to work, and every call to a model goes through one place. I call it the model gateway. Some people call it an LLM router.
Agents do not ask for a model. They ask for a profile. A profile is a name for what the task needs: “strong coding”, “fast coding”, “review”. The company decides, in one file, which model answers to each name.
Why not write the name of the model in each agent? Because models change every few months, and a large company will have hundreds of agents.
- A better model arrives. With profiles, you change one line and every agent uses it. With model names, somebody has to edit and test each agent.
- A provider fails, or raises its prices. The company points the profile to another model, and the agents do not notice.
- A project cannot send data outside. Its agents only get the profiles that run in house, and nobody has to check each agent.
- The author of an agent does not have to follow the model market. They say what the task needs, and the team that runs the gateway decides which model gives it.
That one line changes many agents at once, so it needs the same care as a code change. It is changed by pull request, tested on past tasks, given a part of the work first, and easy to undo.
The agent
asks for a profile, not for a model
"strong coding"
Model gateway
The profiles are one file, changed by pull request.
- strong coding frontier model, outside
- fast coding open model, in house
- review a different provider
- search open model, in house
The coding run of one change
- who
- a developer
- agent
- frontend feature
- profile
- strong coding
$1.18 of $5.00
The key of the run stops at its limit.
The run in the figure is the coding run of our change: $1.18, under a limit of $5. These numbers are model spend only. The real cost of a change also has the infrastructure, the retries and the human time.
⚠️ What I got wrong: budgets
My first version had budgets: a limit per person and a limit per ticket. It sounded responsible. In practice nobody could choose a good number before the work started. When the number was too low, the work stopped half done, and it looked like a technical failure. When it was too high, it protected nothing.
I removed the budgets and kept one fixed limit for each run, which only exists to stop an agent that is in a loop.
The total spend is a different question, and the gateway answers it by showing the cost by team, by project and by agent, with an alert when it moves away from the normal. The twenty companies are divided here too: six limit what each engineer spends, and six say they do not.
How does the gateway know which work can go to a model outside the company? I would not try to classify each prompt. I would decide it by project: the owners of a project say which profiles its agents may use, and a project with sensitive data only gets profiles that run in house. Seven of the twenty companies already run open models on their own infrastructure.
The last decision is the one I expect people to disagree with: whether to keep the full text of every prompt and every answer. Keeping it helps to investigate a bad decision or an attack through a malicious instruction, known as prompt injection. It also creates a new store of code and customer data that somebody must protect.
My choice is to keep the numbers and the exact versions of the agent and of the documents it read, and to keep the text in a separate place, for a short time, encrypted, with access that needs a reason. A company may choose differently, but it should decide it once, in one place.
What it guarantees
The company decides which models see which data, every call has a person, an agent and a cost attached, and a model can be replaced without touching the agents.
6. The gate and the acceptance
The agent does not deliver “done”. It delivers a pull request with evidence:
- each acceptance criterion, with the test that covers it
- the commands it ran, and their output
- screenshots and a short video of the change working, when it has something to show on a screen
- a list of what it could not check
- a link to the preview, where a person can try that change and only that change
Evidence should be fast to read. A person understands a twenty-second video of the new filter sooner than a page of test output, and can then decide where to look more closely.
Before a person sees it, the change passes a gate that belongs to the factory: tests, static checks, a scan for secrets, protected paths. The agent can add checks, but it cannot change or remove these ones. If the agent writes the code and also the tests, from the same wrong reading of the request, the evidence will look perfect. The approved criteria and the protected checks are the two things the agent did not write.
Then a person reads the evidence, tries the result, and signs or sends it back. Two people answer for a change. The one who asked answers for what was built. The one who accepted answers for the evidence being enough. They should not be the same person.
In our example the coding took the agent 7.5 minutes, and the whole change took 18 minutes and $1.26. The person spent about three minutes in total, between the request and the acceptance, and none of them reading code line by line.
That is right for a filter in a table on a demo application. It is wrong for a change in how prices are calculated. The depth of the human look should depend on the change. Eleven of the twenty companies say that a person still reads the code line by line. I would keep that for the changes where the risk asks for it.
| The change | What the person looks at | Who accepts |
|---|---|---|
| A routine change | The evidence and the preview | A person who did not ask for the change |
| A change in a protected part of the code | The evidence, the preview and the code | The owner of that part |
| A change in a critical system | All of the above, and someone reads the code line by line | The owner, with a second person |
The factory can help the person choose. It can show which paths the change touches, how big it is, which other systems depend on it, which data it reads, and how easy it is to undo. When it cannot tell, the change is treated as high risk.
What it guarantees
Separation of duties. No change reaches production on the word of the agent, and human attention goes where the risk is.
7. The record
Every step of a change leaves a line in one record, written by the factory and not by the agent: who acted, in the name of whom, with which version, what was allowed or denied, how long it took and what it cost.
The record · one change, shortened
verified: nothing was changed
- #1 ticket.define a person asks for the change, in one sentence
- #2 ticket.defined definition agent 3 questions, 8 acceptance criteria
- #3 ticket.ready a person approves the definition
- #4 ticket.start a person starts the work
- #5 run.started coding agent v1.3.0 in the name of that person, with its list of documents
- #6 knowledge.read coding agent opens a guide of the project: the path, never the text
- #7 policy.decision coding agent asks for a tool that is not on its list denied
- #8 model.usage gateway profile, model, tokens and cost: $1.18
- #9 run.finished coding agent pull request opened, gates passed
- #10 pr.merged another person reads the evidence, accepts and merges
So everything is traced, and everything is measured.
- Traced. From any change in production you can go back, step by step, to the first sentence. You can also go the other way: if a guideline was wrong, or a version of an agent had a problem, you can list every change it touched.
- Measured. Every line has a time and a cost, so the record says what a kind of change costs, how long it waits for a person, and how often it comes back. Nobody fills in a report.
The record does not copy the work. It links to it: the ticket, the pull request, the commits, the preview, the agent run, the documents and the memory. Some of these live in the factory. Others stay where they already are, in the code repository and in the ticket system.
-
Ticket
who asked, the criteria
tickets
-
Agent run
agent, version, cost
factory
-
Documents
what the agent read
factory
-
Pull request
who accepted
repository
-
The record
one line per step, with links
-
Memory
why it was done this way
factory
-
Commits
the code that changed
repository
-
Evidence
checks, screenshots, video
repository
-
Preview
the change, running
factory
lives in the factory lives in a system the company already has
A person or an agent can start from any of them and reach the rest. An agent that starts a task finds the earlier tickets and what was learned in them. A person who follows a project does not have to ask where things are.
Three rules make the record something you can trust.
- It is complete. If an action cannot be recorded, the action does not happen.
- It cannot be changed quietly. Nobody can edit or remove a line without it being noticed.
- It keeps names and numbers, and no content. That is why many people can read it.
The scorecard, the cost by team and the dashboards are all views of this record. So is the decision to give the agents more autonomy.
What it guarantees
For any change in production, you can answer who asked, who approved the definition, which agent and which version did the work, what it read, which checks passed, who accepted, and what it cost.
8. Operating the factory
A factory with hundreds of agents is a production system, and it is watched in two ways. Dashboards are for the questions that people ask: what it costs, how good each agent is, where work stops. Alerts are for what cannot wait until somebody looks.
None of this needs a new tool. The factory can publish its numbers to the observability system the company already uses, for example Grafana, next to the dashboards of every other service.
Dashboards
People open them to answer a question.
-
What do the agents cost?
By day, team, project, agent and model.
-
How good is each agent version?
Success rate, cost and duration, version by version.
-
Do requests become changes?
Time in each step, and why work stops.
-
Is the factory healthy?
Failures and their reasons, sandboxes, the gateway.
Alerts
They call a person. Nobody has to look.
- Many runs are failing ok
- The model gateway is returning errors ok
- Daily model spend is high look
- A sandbox could not start: no network rules ok
- The record failed its check ok
- The catalog has not been synced recently firing
Dashboards and alerts show ids, times, states and costs. They never show a prompt.
⚠️ What I got wrong: failures noticed late
In my first version, a run that broke was only noticed when its time limit passed, ten minutes later. Now a watcher gives each failure a reason in seconds: out of memory, crashed, no capacity, limit reached.
The same idea applies to the controls. An agent does not start if its sandbox is not really closed. Isolation is checked before each run, not assumed.
What it guarantees
The controls are checked on every run, and a failed check stops the work.
Where people stay as autonomy grows
In everything above, a person accepts every change. I think that is the right place to start in an enterprise environment. It is also a phase, because the routine look is short, but it is still a look, and the number of changes will keep growing.
Autonomy is earned by kind of change
The change sets the level, and not the author. A change in how prices are calculated needs the same careful look, whether a person or an agent wrote it. So autonomy is not given to an agent, or to a team. It is given to one kind of change, in one system.
One kind of change, in one system
-
1
A person reads the code
And the evidence, and the preview. Critical systems stay here.
-
2
A person reads the evidence
And tries the preview. The code is read only when something looks wrong.
-
3
No person on each change
The checks decide. People review a random sample every week.
To go up: the owner of the system decides, with its own numbers. Few reverts, few defects found later, few corrections by the person who accepts.
To go down: one bad week is enough. An incident, or a problem found in the sample, and the person comes back.
The record is what makes each step possible. When the numbers of one kind of change are good for long enough, it can pass with no person, and people review a random sample to see what the checks do not catch. If the sample finds problems, the person comes back.
Five of the twenty companies say they already let the changes they classify as low risk merge with no human approval, or that they are preparing it. A company that cannot show what its agents did has no way to take this step, and will keep a person on every change.
People move up one level
Autonomy does not remove the work of people. It moves it, from how to what: less time reading lines of code, and more time on the request, on the context and on the result.
This changes how a team corrects. When a result is wrong, I ask three questions, in this order.
- Was the request wrong? Then the next request must be clearer. This is the cheapest lesson.
- Was the context missing something? Then the correction goes to the knowledge, and every next task gets it.
- Was it only the code? Then fix the code.
Most teams go directly to the third question, because it is the habit. But a correction in the code improves one change, and a correction in the context improves many.
The same is true for incidents. A problem in production is the best test the factory has. Each one should leave something behind: a new protected check, or a new line in the knowledge. This is how the need for human review goes down over time: because the checks got better, and not because people got tired.
Every system keeps an owner
The known risks, like security and cost, grow with the agents, and everybody watches them. The new risks make no noise. Each change passes its checks while the codebase gets worse, because nobody looks at the whole. And if people do not read most of the code, who will understand, in two years, the system they operate?
My answer is ownership. Every system has a named owner: a team that answers for it in production, whoever wrote the code. An agent is never the owner. The owner decides how much autonomy the system gets, and uses the models to understand any part of it when needed. But the team has to know enough to see when an explanation is wrong.
Where I would start
A company does not need all eight pieces to begin. The order matters more than the speed, and each step below is useful by itself, even if the next one never comes. The first three need no new infrastructure.
- Choose one team and one kind of change, and measure it today. How long a change takes, how much review it needs, how often it is reverted. Without this number, nobody can say later if the agents helped.
- Write down how things are done. In a repository, with an owner for each document. The assistants that people already use in their local environments get better the next day.
- Agree on the format of a request. One template, and an agent that asks the missing questions. People write better requests with it, with or without agents to build them.
- Put every model call behind one gateway. Before limiting anything, look: from the first day it shows who uses what, and what it costs.
- Move that one kind of change into sandboxes, with the record. This is the first real infrastructure, and now there is a reason for it.
- Then start to go up the steps of autonomy. With the numbers of step 1 to compare, and an owner who decides.
Most of these pieces can be bought, built or assembled from open source. The hard part is the change in how people work, more than the technology. Moving a large organization to agentic development is a change management project, and it needs what every large change needs.
- Deal with the resistance. Many engineers fear for their role, and some of the best ones do not trust code they did not write. Show them where their judgment is needed more than before: in the request, in the context and in the acceptance.
- Align people before the agents are fast. Engineering, security, architecture and risk should agree on the rules first. The factory then enforces what they agreed.
- Train people for the new work. Writing a request that can be checked, writing context and reading evidence are skills, and most people have never been taught them.
- Give teams the ownership. Their context, their agents, their level of autonomy. Start with the teams that want to go first, and let the others see the result.
People will use as little as possible a factory they do not trust. They will use well one they helped to shape.
Closing words
This is my personal view. It comes from building software with agents every day, for a long time, and from this recent work: a study of twenty companies and a working prototype.
This field moves very fast. In February I directed my agents step by step, and in October I had almost stopped. I expect parts of this view to change too.
How is your company approaching this? The conversation is on LinkedIn.
Agents already write more code than we can read
What stays with people is to decide what is worth building, to write down what we know, and to keep looking at the result.