AI agents for sales reporting
AI coding agents and Microsoft 365 Copilot agents that write report code, answer KPI questions and follow the team's rules every time.
The problem
An AI model can write a query in seconds. It does not know which table is trusted, how a report should be named, or which data must never leave the building. Without that, every answer needs checking from scratch.
I wanted AI to do real reporting work under the same rules a careful analyst follows.
What I built
- One rulebook that every AI coding tool reads: mandatory rules, coding patterns and a catalogue of trusted data sources.
- A memory of past projects and decisions, one fact per note, so the agent does not relearn the same lesson.
- Reusable skills for the repeat jobs: report quality checks, branded Excel output, slide building and mail dispatch.
- Guard rails: credentials only from environment files, customer data privacy rules, and a hard stop when a database login fails.
- A Microsoft 365 Copilot agent that answers monthly sales KPI questions. A script does exact lookups on a prepared dataset, so the model never does the arithmetic itself.
- A second Copilot agent that writes a complete SQL and Python report script to house standards. It writes, and a person runs it.
How it works
- Rules and reference docs set the standard
- The agent writes code or looks up a number
- Scripts do the exact maths
- A person reviews and runs
- Lessons go back into memory
Results
- Report scripts written by the agents follow the same standards as hand-written ones.
- The KPI agent is a proof of concept, in testing with a small group of users.
- The report-writing agent is tested against a fixed set of 10 prompts, with a pass target of 9.
Built with
Claude Code, Microsoft 365 Copilot, Python, SQL, SharePoint.
This is internal work at Robi Axiata. The description is general on purpose: no company data, figures or screens are shown.