# Lightyear: Fewer tokens per agent loop, savings you can see.

> Lightyear cuts the tokens coding agents send on every turn of a loop and shows the tokens and cost it saved in Fabric analytics, without changing the agent or its prompts.

Fabric Gateway, from Postman. This is the Markdown version of https://fabricgateway.ai/product/lightyear/.

Lightyear reduces each request on the agent’s existing route; tokens and cost saved appear in analytics.

- **7** coding agents qualified
- **Tokens and cost** saved, shown in analytics
- **0** changes to the agent

Route Claude Code through Fabric (~/.claude/settings.json):

```diff
- "ANTHROPIC_BASE_URL": "https://api.anthropic.com"
+ "ANTHROPIC_BASE_URL": "https://GATEWAY_HOST/anthropic"
```

## The problem

Agent loops resend the same context on every turn: the system prompt, tool definitions, file contents and the growing conversation. Most of it has not changed since the last call, but the model is billed for all of it again. Long sessions get slower and more expensive the longer they run, and nobody can see where the tokens went.

## Solution

Lightyear runs in the Fabric data plane, on the route your coding agent already uses. It reduces the tokens each request carries before it reaches the model, and records what it saved, so tokens and cost saved show up in Fabric analytics next to the rest of your usage. Because it sits in the gateway, the same routing, limits, credential brokering and traces apply to every request it touches.

## What you get

- **Built for agent loops:** Targets the context that repeats from one turn to the next.
- **Savings in analytics:** See tokens and cost saved, by route and namespace, in Fabric analytics.
- **No agent changes:** Point the agent at Fabric; Lightyear works on the route.
- **Works across coding agents:** Qualified on Claude Code, Codex, OpenCode, Cursor, Gemini CLI, Droid and Devin.

## Related

- [Read the launch post](https://fabricgateway.ai/blog/lightyear-reducing-ai-spend/): How Lightyear cut task cost 40% and time 31% in agent benchmarks.
- [Adaptive Model Routing](https://fabricgateway.ai/product/adaptive-model-routing/): Pair fewer tokens with a cheaper model tier per request.
- [MCP Tool Search](https://fabricgateway.ai/product/mcp-tool-search/): Keep MCP tool definitions out of the context window.
- [Cost Controls](https://fabricgateway.ai/product/cost-controls/): Track and cap spend by team, user and agent.
- [Set up Claude Code](https://docs.fabricgateway.ai/fabric/agents/claude-code): Route Claude Code through Fabric in two settings.
- [Review analytics](https://docs.fabricgateway.ai/fabric/observability/analytics): Where token usage and cost show up.

## Frequently asked questions

### What is Lightyear?

Lightyear is token reduction for coding-agent loops. It runs in the Fabric data plane on the route your agent already uses, trims the context that repeats from one turn to the next, and records the tokens and cost it saved.

### Do I need to change my coding agent?

No. Point the agent at Fabric and Lightyear works on its route. For Claude Code that means setting ANTHROPIC_BASE_URL to your gateway host and sending your gateway key in a custom header; the setup guide has the exact settings.

### Where do I see what Lightyear saved?

In Fabric analytics, next to the rest of your usage: tokens and cost saved, broken down by route and namespace.

### Which coding agents does Lightyear work with?

Lightyear is qualified on Claude Code, Codex, OpenCode, Cursor, Gemini CLI, Droid and Devin.

### How is Lightyear different from adaptive model routing?

Lightyear lowers the number of tokens each request carries; adaptive model routing lowers the price per token by sending each request to the cheapest model tier that can handle it. They run on the same route and their savings add up.

### Which plans include Lightyear?

Lightyear is available on both the Free and Enterprise plans.

---

- [Homepage](https://fabricgateway.ai/)
- [Pricing](https://fabricgateway.ai/pricing/)
- [Book a demo](https://fabricgateway.ai/book-demo/)
- [Documentation](https://docs.fabricgateway.ai)
- [Sign up and log in](https://app.fabricgateway.ai)
- [Site summary for AI assistants](https://fabricgateway.ai/llms.txt)

