AI agent · Case study
AI agent for the code of a large enterprise product
The agent reads the source code of a large product, answers employees with links to the file and line, and builds documentation. In production since autumn 2026.
01
Challenge
In a large product the code changes every day while the documentation falls behind. Analysts, testers and support need an exact answer about how the system works now, and there are not enough developers to answer every question.
- Only the code knows how the system really works, and not everyone who needs an answer can read it
- There is one product but several variants for different clients: the answer depends on which one is meant
- An answer without a link to a place in the code cannot be checked, which means it cannot be trusted
02
Solution
The agent works in the corporate chat. It reads the current code in an isolated environment and answers from it, not from the model's memory. It has its own rules for each audience and type of task.
- 01
Answers from code
To a short question the agent replies with links to the file and line. Half of the answers arrive in under a minute.
- 02
Large documents
API specifications, setup guides, service descriptions. The agent builds them from the code, and subagents double-check the claims.
- 03
Documentation check
The agent compares user guides with the current code and shows where the text is out of date.
- 04
For each audience
The agent answers an analyst, a tester, support and the business differently: 19 rule sets for roles, tasks and product variants.
- 05
Quality loop
The logs are reviewed regularly: where the agent made a mistake and what is asked most often. A person decides what goes into the rules.
- 06
Cost control
Every run has limits on steps, time and cost. A daily report shows how the agent is used.
How it is built
- 01
Chat
Employees write to the agent in a corporate chat with domain sign-in.
- 02
Agent
Works in an isolated environment with a copy of the code. The copy is updated once an hour.
- 03
Rules and skills
System rules and 19 skill sets. A skill is loaded when needed, not all at once.
- 04
Monitoring
Logs, a daily usage report and a check after every change to the rules.
Results
- < 1 minmedian response time
- 95%of requests complete without failures
- ×4growth in requests in the week after access was widened
- 2×faster to build a large document after optimization
What I did
I run the agent in production and am responsible for its development. I set up the quality loop: exporting and reviewing logs, the daily report, a process for changing rules through a check. I went through the logs and found what slows answers down and makes them more expensive. I prepared a set of control queries and a plan for rolling out to the whole company.
Need something similar?
Tell me about your task. The first call is free.