Introduction
In the ever-evolving world of software development, artificial intelligence (AI) is playing an increasingly crucial role. However, with this advancement, the costs associated with using AI models can quickly become prohibitive. By 2028, AI coding costs are expected to surpass the average developer's salary. Already, a quarter of engineering leaders spend between $200 and $500 per developer per month on tokens, some even exceeding $2,000.
This is where Spotify's Portal comes into play, reducing my Claude Code token usage by 90%. How? Through two simple modes that effectively delegate work to less expensive models.
The Inefficiency of High-Tech Tokens
Most tasks performed by an AI coding agent do not require intense reasoning. Whether it's reading several files to answer a question or generating a test file following an existing pattern, these tasks consume thousands of tokens without requiring complex reasoning. Using a state-of-the-art AI model for these tasks is like using a sledgehammer to crack a nut.
AiKA Modes in Portal
Spotify's Portal introduced AiKA Modes, an innovative solution that allows managing these tasks more economically. A mode is a declarative agent that runs on an ephemeral runtime, similar to AWS Lambda, but for agents. You define the instructions, choose a model, configure parameters like temperature, and attach MCP tools. Portal handles the rest.
Mode 1: bulk-reader
The bulk-reader mode is designed for situations where Claude would otherwise read multiple large files just to answer a question. Using Gemini 2.5 Flash as the worker model, this mode acts as a bulk file reader for code analysis.
- Name: bulk-reader
- Description: Bulk file reader for code analysis - delegates I/O from Claude Code instructions.
- Instructions: You are a precise code analyst. Read the provided files and answer the question concisely.
Mode 2: code-writer
The code-writer mode is ideal for tests, config scaffolding, type stubs, or any task where the output is predictable from existing patterns.
- Name: code-writer
- Description: Boilerplate code generator - delegates output-heavy work from Claude Code instructions.
- Instructions: You generate code files based on a spec and reference files.
Significant Impact on Costs
Thanks to these two modes, the usage of Claude Code tokens was reduced to just 10% of previous usage. This means not only significant cost savings but also an optimization of AI resources for more complex tasks requiring deep reasoning.
Conclusion
Spotify's Portal has demonstrated that it is possible to effectively manage AI token usage, thereby reducing costs without compromising work quality. For tech companies looking to optimize their AI spending, adopting similar solutions could be a considerable lever.
Let's discuss your project in 15 minutes.