back to thoughts

tokens are the new compute. start spending them intentionally.

Diagram showing tokens are the new compute with system prompts, tools, memory, retrieval results, logs, and history all feeding into an agent which makes decisions

when most people start building AI agents, they obsess over the model. which one is smarter, faster, scores better on benchmarks. and yeah, that matters. but after spending a while actually building and running agents, you start to notice the real bottleneck is something else entirely.

tokens. it's almost always tokens.

every system prompt, every tool definition, every memory blob, every retrieval result and conversation log -- all of it eats into the context window. and as agents get more capable, they also get more expensive and slower and just... harder to manage. the challenge stops being "can this model answer my question" and starts being "what does this model actually need to know right now."

the first thing i learned the hard way: stop loading everything upfront. it's so tempting to just throw everything in -- more tools, more docs, more memory. feels thorough yknow?? but eventually the agent spends more time processing its own context than doing the actual task. context should be a workspace, not a warehouse.

Diagram comparing context as a warehouse (bad) vs a workspace (good). Warehouse loads everything and hits 120k tokens. Workspace loads only current task, relevant memory, required tools, and short-term history, with everything else loaded on demand.

related to that -- reuse work whenever possible. a huge chunk of an agent's context is identical across requests. same instructions, same tools, same memory structure. yet a lot of systems just... reprocess all of it every single time. prompt caching exists for a reason. if the model already did that work once, don't make it do it again.

and ngl the biggest mindset shift for me was realizing not every task needs the most powerful model. searching files, extracting structured data, classifying things -- smaller models handle that just fine. save the heavy hitters for tasks that genuinely need deep reasoning. it's not about being cheap. it's about using the right tool for the right job.

there's also this thing that happens as agents run over time -- they accumulate clutter. tool outputs, logs, failed attempts, duplicate info, plans that are now outdated. most of it was useful in the moment. none of it is useful later. the best agent systems i've seen aren't just good at collecting information. they're good at knowing when to throw it away.

The Token Efficiency Flywheel: a circular diagram with 5 steps -- Reuse (cache prompts), Load Less (only what is needed), Route Smarter (right model for the job), Clean Context (remove noise), More Available Tokens (free up space) -- all leading to Better Agent Performance in the center.

i think what we're slowly moving toward is less prompt engineering and more context engineering. the question isn't "how do i write the perfect prompt." it's "what information should be active right now, what should be retrievable later, and what should just be gone."

because in practice, tokens aren't just text. they're compute, latency, memory, and money. and the teams that figure out how to spend them intentionally are the ones building agents that are actually fast and efficient and capable -- not just technically impressive on paper.

~ shrey