ecoai
problem
An assistant that is useful inside a company has to act in its systems (code, tickets, docs, monitoring, the data warehouse), answer data questions correctly, and keep customer data away from model providers.
solution
One agent runtime on Cloudflare behind Slack, a desktop app and an admin dashboard, with about 160 tools, a curated knowledge graph over the warehouse, small routing models and a privacy layer.
results
Used by 246 colleagues across the company. I started it in November 2025 and wrote about 1,600 of its 1,700 commits.
Architecture
Every conversation is a pair of Durable Objects: a mailbox that orders turns and a processor that runs them. The agent loop loads tools on demand, and every model call from a private conversation goes through the privacy layer.
data
A knowledge graph of the company’s data, built from the code
To answer business questions, the agent needs to know what the warehouse means, not just its schema. The graph is built from evidence in the repositories: the product schema, the ETL pipelines, and five layers of SQL transformations with their lineage read from the warehouse.
Meaning the evidence can’t provide (grain, time policy, warnings, reviewed joins, routes) is curated on top. At runtime a question ranks its sources in the graph, and the SQL is written from that prepared context and checked before it runs.
routing
Routing with four small models
Before the main model runs, four TF-IDF and logistic-regression models choose the model tier, the tools to load and a first step, in about 0.1 ms. Each stays silent unless it is confident. The confidence thresholds were tuned by a genetic algorithm on reviewed threads, with a wrong hint costing five times what a correct one earns.
When a hint is given, the first tool is right 93% of the time.
reliability
Turns that survive a crash
Each conversation’s processor checkpoints while it streams and records every tool result. If it dies mid-turn, a fresh processor resumes from the checkpoint and reuses the recorded results, so an action with side effects never runs twice.
analytics
Charts and forecasts from references
Query tools return a reference to their result, not the rows. The model passes the reference to the chart tool and the server fills in the values, so no number in a chart is typed by the model. Forecasts work the same way: TimesFM runs in a container on the referenced series and returns a p10–p90 band.
privacy
Reversible aliasing of customer data
When a tool returns customer data, emails, IBANs, card and CPR numbers, company names and people are replaced with stable aliases from an encrypted vault before any model call. The user sees the real values, restored in the answer and in rendered artifacts.
ecoai is internal to Visma e-conomic · counts are rounded and examples are illustrative