Skip to content

docs: v1.2 guide on reducing token usage with AI coding agents#269

Open
rachaelrenk wants to merge 11 commits into
mainfrom
rrenk/reduce-token-usage-guide
Open

docs: v1.2 guide on reducing token usage with AI coding agents#269
rachaelrenk wants to merge 11 commits into
mainfrom
rrenk/reduce-token-usage-guide

Conversation

@rachaelrenk

@rachaelrenk rachaelrenk commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a new Guides-section guide on getting more out of your tokens with Warp's coding agents. It lives in Guides → Configuration, alongside "Use Agent Profiles efficiently."

The guide keeps the searchable title "Reduce token usage with AI coding agents" (for the non-branded search query) but frames the body around using tokens efficiently and getting more out of each token. It also notes that Warp meters this usage in credits, which package tokens into a single unit across differing provider rates.

Changes

src/content/docs/guides/configuration/how-to-reduce-token-usage-with-ai-coding-agents.mdx (new)

  • New guide covering practical, evergreen techniques anchored to Warp features:
    • Track usage first (per-turn Usage Summary, /cost, Settings > Billing and usage)
    • Match the model to the task (auto-efficient, auto-open for open-weight models, lightweight models, avoiding mid-conversation model switching for prompt caching)
    • Automate model selection with custom routers (route by complexity or by rules; cost-efficient default)
    • Keep each conversation focused (/new, /compact, /fork-and-compact)
    • Be selective about attached context
    • Let Codebase Context retrieve code (/index)
    • Set up Rules and AGENTS.md (/add-rule, /init)
    • Plan large tasks first (/plan)
  • Cross-links to a Guides page and several main-docs feature pages (Model choice, Custom routers, Conversation forking, Slash Commands, Codebase Context, Rules, Planning, Blocks as context).

src/sidebar.ts

  • Added the nav entry under the Configuration section.

Review updates (@hongyi-chen)

  • Efficiency framing: shifted the body from "reduce/trim" toward using tokens efficiently and getting more out of each token, for a cost-conscious audience. Kept the searchable title and slug.
  • Credits: added a note that in Warp this usage is measured in credits, which package tokens into a single unit that accounts for the differing token rates and prices across providers.
  • Open-weight models: added a "Prefer open-weight models" bullet pointing to Auto (Open-weights) (auto-open).

Notes

  • Custom routers accuracy: the canonical Custom routers doc says routers can't target BYOK/custom-endpoint models, so the guide doesn't repeat the "BYOK/BYO inference" claim from external posts.
  • One mild inference to validate: "switching models mid-conversation can reset prompt caching."
  • style_lint.py passes with 0 issues, and a local npm run build succeeds (347 pages). The failing Vercel preview is from a pre-existing /404 route collision (src/pages/404.astro vs Starlight's built-in) coming from main, not from this guide.
  • A screenshot TODO remains for a token-labeled Usage Summary capture once that UI ships.

Conversation: https://staging.warp.dev/conversation/1c22e517-4000-4f62-be81-f63070554481

Co-Authored-By: Oz oz-agent@warp.dev

@vercel

vercel Bot commented Jun 29, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview, Comment Jul 9, 2026 10:11pm

Request Review

@cla-bot cla-bot Bot added the cla-signed label Jun 29, 2026
@oz-for-oss

oz-for-oss Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

@rachaelrenk

I'm starting a first review of this pull request.

You can view the conversation on Warp.

I completed the review and no human review was requested for this pull request.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@oz-for-oss oz-for-oss Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overview

This PR adds a new Guides > Configuration page about reducing token and credit usage with agents, plus the corresponding sidebar entry. I checked the guide against the provided diff, existing docs references, and the security checklist; the links and referenced slash commands map to existing docs, and there are no security findings.

Concerns

  • No blocking concerns found.

Verdict

Found: 0 critical, 0 important, 0 suggestions

Approve

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@rachaelrenk rachaelrenk changed the title docs: add guide on reducing token usage with AI coding agents docs: v1 guide on reducing token usage with AI coding agents Jun 29, 2026
@rachaelrenk rachaelrenk self-assigned this Jun 29, 2026
Incorporates the new custom model routers feature: route by complexity or rules to keep routine work off the most expensive models.

Co-Authored-By: Oz <oz-agent@warp.dev>
@rachaelrenk rachaelrenk changed the title docs: v1 guide on reducing token usage with AI coding agents docs: v1.2 guide on reducing token usage with AI coding agents Jun 30, 2026
Credits are being phased out in favor of tokens. Removes credit framing and genericizes credit-named surfaces (usage chip, usage details, usage resets) while keeping links accurate to today's docs.

Co-Authored-By: Oz <oz-agent@warp.dev>
Editorial pass from PR review: clearer intro, accurate Usage Summary description (with TODO for a token-labeled screenshot), tightened custom router and conversation sections, a Next steps lead-in, and a chose->choose typo fix.

Co-Authored-By: Oz <oz-agent@warp.dev>
@@ -0,0 +1,103 @@
---
title: "Reduce token usage with AI coding agents"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of framing it as "reduce" i would try to frame this more around how to be more efficient with tokens / make them go further / accomplish more with less for a cost-conscious audience

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rachaelrenk I still think we could frame this more positively. Instead of “Reduce token usage,” maybe something like “Use tokens more efficiently with AI coding agents” or “Get more out of your tokens" (i defer to you on the exact messaging, but i think we should stray away from "reduce" -- we'd love to encourage folks to use our agent more!)

The guide is less about cutting usage for its own sake and more about helping cost-conscious users make their usage go further: choosing the right model, keeping context focused, using routers/rules, etc.

---
Every agent task consumes tokens. Tokens are the unit of text a model reads and generates. The more tokens a task uses, the more it costs and the longer it takes, so trimming token usage keeps your agent workflows lean and fast.

This guide covers practical ways to lower token usage in Warp. You'll learn how to choose the right model, route tasks to cost-appropriate models, keep context tight, manage conversations, and configure your agents to work efficiently.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's worth mentioning somewhere that in Warp, the unit of measurement is actually credits, but it's essentially packages up tokens into an easier to grok measurement (e.g. different tokens rates across different providers, price of per token, etc)


Larger reasoning models process more tokens per turn than lighter ones, so the model you choose has one of the biggest effects on usage.

* **Use a cost-efficient model for routine work** - Switch to **Auto (Cost-efficient)** (`auto-efficient`), which optimizes for lower token consumption while keeping output quality high. Lightweight models like Claude Haiku also use fewer tokens for simple edits, lookups, and quick questions.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe worth mentioning that if folks prefer open source models, we also have an auto-open (need to double check the exact name) router, or they can create their own custom router

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah i see you mention the custom routers below, nvm

Per @hongyi-chen review: shift framing toward token efficiency (keeping the searchable title/slug), add a note that Warp meters usage in credits which package tokens across providers, and mention Auto (Open-weights) (auto-open) for open-source models.

Co-Authored-By: Oz <oz-agent@warp.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants