Every interaction with an LLM costs tokens, money, and time. This workshop teaches practical techniques to manage those costs without sacrificing quality.
Outline
This is a short, focused workshop on understanding and minimizing token usage when working with LLMs and AI coding agents.
Agent
This workshop is taught with Claude Code and Claude CLI by default. But it can be taught with any programming language, development environment and agentic agents.
Prerequisites
Participants need to have basic experience prompting an LLM or coding agent.
Topics
- What tokens are, and how tokenizers work (subwords, whitespace, code vs. natural language)
- Why tokens matter: cost, latency, and context window limits
- Where token usage comes from: prompts, system instructions, file contents, tool output, conversation history
- Recognizing and diagnosing token bloat in a real session
- Minimizing prompts and instructions without losing precision
- Managing file and tool output size (chunking, truncation, summarization)
- Retrieval vs. “context stuffing”: when to fetch instead of include everything
- Using caching and compaction effectively
- Managing conversation history: summarization and context pruning
- Trade-offs: minimization vs. accuracy and completeness
- Monitoring and measuring token usage and cost over time
- Practical exercise: auditing and optimizing a real prompt or agent workflow