25. Nov 2026
AI Coding Agents Made Transparent: Token Monitoring and Repository Context as Open Source
Why token transparency matters
Without measurement, it is hard to steer the use of AI coding agents. Teams see a bill at the end of the month, but rarely see what work lies behind it. Anyone who knows the consumption per project, per model, and per agent can make better-informed decisions, for example about which model fits which task.
Open-source monitoring for OpenCode
Our OpenCode plugin captures the token consumption of your coding sessions and breaks it down by project, model, agent, and token type. Behind it is a pipeline built from proven open-source components:
- OpenCode plugin: captures token consumption
- OpenTelemetry Collector: receives and processes the data
- VictoriaMetrics: stores the time series
- Grafana: displays the results in live dashboards
Installation and configuration are documented in the repository. The same pipeline can also process data from other OpenTelemetry GenAI sources, for example GitHub Copilot.
The project is licensed under the Apache License 2.0: github.com/accso/ai-monitoring
Less searching, more context: two tools for repository context
The second question is: how do you give an agent useful repository context without unnecessarily bloating the setup? We have published two iterations.
ai-context-mcp is the first iteration. It provides repository structure, semantic search, symbol lookup, impact analysis, and documentation search via the Model Context Protocol (MCP). For server-side use, it remains a sensible option, but it requires more infrastructure.
ai-context-opencode-plugin is our current, leaner iteration for OpenCode. The Docker-free plugin runs directly in the process and supports repository and documentation search, symbol and impact analysis, and search across shared repositories. Context no longer has to be copied manually between indexed projects.
Both approaches pursue one goal: agents should retrieve relevant repository information directly and need fewer exploratory calls. The plugin continues the same approach with less operational effort.
A note on data processing: indexing and search run locally. However, the retrieved context is still passed to the model provider configured for the agent. If you want to assess the data flow, you should take this into account in your own setup.
The repositories: ai-context-mcp und ai-context-opencode-plugin, both under the Apache License 2.0.
How the two fit together
The monitoring makes visible where tokens arise. The context tooling is meant to help reduce unnecessary exploration. Whether and how much this actually lowers consumption should be measured in your own sessions.
Feel free to try the tools in your own coding sessions. Questions, bug reports, and ideas are welcome in the Issues sections of the repositories. Are you planning to introduce AI coding agents in software development or make their use measurable? We are happy to support you.
For questions, contact Florestan Sulimma and Daniel Stuckert.