Case Study

How SOMA Cuts AI Agent Costs with SayGM

SOMA cuts the tokens AI agents send, and SayGM cuts what each token costs. See how the two stack up to lower AI agent costs.

BSBrittany Seales· Marketing5 min read
SayGM x SOMA case study header for how SOMA cuts AI agent costs with SayGM

Developers using SOMA can now send their compressed agent requests straight to SayGM for inference, so an agent pays for fewer tokens and pays less for each token it does send. That matters most in long coding sessions, where AI agent costs climb fastest because the agent re-sends its entire conversation history every time it takes a step.

SOMA is the context compression subnet built by Dendrite, the Bittensor team that also builds and mines across a long list of other subnets. Since September 2026, SayGM has been one of the inference providers SOMA users can select when they create an API key. This case study covers what SOMA does, why it added SayGM, how a compressed request travels to the model, and what the pairing changes for anyone paying an agent's token bill.

Table of Contents

What Is SOMA?

SOMA is a context compression layer for AI agents. It sits between a coding agent and the model, and before each inference request reaches the model, SOMA compresses the agent's context, reducing token usage while aiming to preserve the information needed to complete the task. Developers point their agent at SOMA's OpenAI-compatible endpoint instead of the model provider, and nothing else about the agent changes. If the compressor is ever unavailable, the request goes through uncompressed rather than failing.

SOMA homepage reading Your agents pay for tokens they never needed, explaining context compression for AI agents

The compression itself comes from the network. SOMA runs as Bittensor Subnet 114, where miners submit compressors, validators score them on cost and task success, and the team adapts the winning code for the app. The subnet's open-source repository shows how those competitions run in two-week cycles. Today SOMA works with GitHub Copilot CLI and Codex, with Claude Code listed as next.

Why Do AI Agent Costs Keep Growing in Long Sessions?

A chat that answers one question costs a few cents. An agent is different. It works in turns: each turn is one round trip where the agent sends a request to the model and gets a reply back, and a single task can take dozens of them. Each turn re-sends the whole session so far: the original instructions, every file it has read, every tool result, and its own earlier reasoning. By turn forty, the agent may be paying to re-send tens of thousands of tokens it has already sent dozens of times.

Prompt caching helps, but only with the part of the context that hasn't changed. Tool output, edited files and new reasoning all fall outside the cache and get billed at full input rates. That is why heavy agent users often find their bill driven far more by input tokens than by the answers they actually read.

Context compression goes after that waste directly. In October 2026, SOMA published measured results for its current compressor, including on these models available through SayGM:

SOMA has documented how those savings are measured, including the full experiment methodology. Results still vary with the task and the context size, and long sessions with heavy tool output tend to gain the most.

Why Did SOMA Let Users Choose SayGM?

Compression reduces the number of tokens sent to the model. It does nothing about what each of those tokens costs at the other end. That second half is a provider decision, and SOMA chose to hand it to its users. When someone creates a SOMA API key, they pick both the model and the provider their agent talks to, and SayGM is one of the provider options.

What SayGM brings is a pricing market. Inference providers compete to serve each model, the best eligible bid sets the rate, and that rate is capped at the model maker's list price. The gateway already speaks the same OpenAI-compatible format SOMA uses, so adding it as a provider was an integration, not a rebuild.

"Compression only solves half the problem. We cut how many tokens an agent sends, and SayGM cuts what each of the remaining tokens costs. Our users get both savings on the same request without changing a line of their own code."

— Aleksander Muszynski, CEO at SOMA

There is also a fit in how both teams think. SOMA and SayGM are each Bittensor subnets that do one job and expose it through a standard API. Plugging one into the other is the kind of subnet-to-subnet composition the network was designed for, and it is now running in production.

Inside a Compressed Request: SOMA to SayGM in Four Steps

SOMA x GM Teamworks artwork of a red SOMA robot and a yellow GM robot bumping fists in front of a rising sun SOMA x GM artwork, created by the SOMA team.

Here is what happens when a developer's agent sends a turn through SOMA with SayGM selected:

  1. The agent calls SOMA. The agent sends its full context to SOMA's endpoint using an sk-soma key, exactly as it would call any OpenAI-compatible API.
  2. SOMA compresses the context. The compressor reduces the amount of context the model needs to process while aiming to preserve task performance, then forwards the compressed request to SayGM with the model the user selected. Through SayGM, SOMA users can currently access DeepSeek V4 Flash, DeepSeek V4.1 Flash, GLM-5.3, GLM-5.3 Flash and Kimi-K3, with more models likely to be added over time.
  3. SayGM routes the request. SayGM's gateway runs inside an Intel TDX trusted execution environment, and TLS terminates inside it, so SayGM's operators and the host machine can't read the prompt. The gateway sends the request to the best eligible provider bid for that model and retries on another provider if one fails. LLM routing on SayGM covers how that choice is made.
  4. The answer comes back. The response returns through SayGM and SOMA to the agent, which carries on with its next turn.

One point on privacy, stated precisely: on standard models, SayGM provides private routing, and the model provider still receives the prompt under its own API terms. For work that needs more, SayGM's confidential models (marked -tee) run inference inside a TEE as well, so the prompt stays sealed end to end. SayGM's private inference page explains the difference between the two.

Two Savings on One Request

The value of the pairing is that the two savings multiply rather than overlap. Compression lowers the number of tokens on every turn. SayGM's provider market lowers the price of those tokens. A session that sends fewer tokens at a lower rate costs less on both counts.

Take DeepSeek V4.1 Flash. SOMA delivers an estimated 28% reduction in inference costs, and every token that's left is billed at SayGM's rate, which is 55% below DeepSeek's list price at time of writing. The two savings land on the same request, and the developer doesn't have to do anything extra to get either one.

"SayGM was one of the easiest integrations we've shipped. It already spoke the same OpenAI-compatible API we do, so it slotted straight in. For developers, that means lower costs with zero extra setup: SayGM never charges more than the model maker's list price, and often charges much less."

— Aleksander Muszynski, CEO at SOMA

SOMA had SayGM live as a provider in less than a week. For developers, the practical result is simple. They keep the agent they already use, point it at SOMA, pick SayGM as the provider, and pay less for the same work.

Common Questions About AI Agent Costs

How can I reduce AI agent costs?

Start with what the agent sends, then what you pay per token. Context compression tools like SOMA cut the tokens each turn re-sends, prompt caching cuts the cost of the unchanged part of the context, and a provider like SayGM lowers the rate on what remains. Choosing a smaller model for routine steps also helps.

What is context compression for AI agents?

Context compression shortens an agent's conversation history and earlier reasoning before each request, keeping only what the task still needs. Unlike plain truncation, which cuts off the oldest messages, compression tries to keep the important details from the whole session.

Does prompt compression reduce output quality?

It can if done badly, which is why SOMA's validators score compressors on task success as well as cost. A compressor that saves tokens but makes the agent fail doesn't win. SOMA also falls back to the uncompressed request if its compressor is unavailable, so a compression outage doesn't break the agent.

Try SOMA or SayGM

If agent spend is creeping up, the quickest test is to run the same task through SOMA with SayGM as the provider and compare the bill. If you would rather call models directly, connect your coding agent to SayGM using one of the SayGM integration guides.

About SOMA

SOMA is a context compression layer for AI agents, built by Dendrite and running as Bittensor Subnet 114. Miners compete to build better compressors, and the winning code powers SOMA's API, which cuts the tokens agents send on long sessions without changing how the agent works.

Website | Twitter | GitHub | Dendrite

About SayGM

SayGM is a drop-in inference gateway for teams who don't want to just take a company's word that their prompts are private. Every request is routed through a hardware-verified confidential environment - not even SayGM can see what's inside it. That's not a policy, it's provable. Swap in your existing OpenAI, Anthropic, or Gemini code and you're covered in minutes, at transparent, published rates with no hidden markup.

Say gm to AI at saygm.com.

Website | Twitter | Discord | Blog | Medium | Docs | LinkedIn

  • Bittensor
  • Case Study
  • Compression
  • Inference
BS

Brittany SealesMarketing

Saying gm to marketing (and AI)

X ↗