Agentic AI by hand ✍️

By Prof. Tom Yeh

Published: 2026-05-28

URL: https://www.byhand.ai/p/library-series-agents-tokens


I designed this workbook to get your hands busy with AI agents. This is the first in a series I plan to develop and share with you over the summer.

This is not the first time I have tried to make you pick up a pen and write on paper by hand. ✍️ In my previous Agentic AI online seminars, I asked you to sketch diagrams, draw lines, and many of you did.

This time I want to bring it up a notch: can I get you to do some math? Don't worry, simple math: adding numbers, multiplying them, working things in reverse. The goal is to build real intuition about how agents work by solving problems by hand, rather than passively reading and watching or mindlessly vide-coding. 😂

This first workbook is about tokens. The next one will cover the context window.

Now let's see if you can solve all 20 problems.

Token problems Series:

  1. Count the Tokens
  1. Subword Splitting
  1. Punctuation Counts
  1. Tokens per Word
  1. Will It Fit?
  1. The Price of a Call
  1. Two Kinds of Token
  1. Input or Output?
  1. The Two-Part Bill
  1. End-to-End Call Cost
  1. Comparing Three Calls
  1. The Average Call
  1. The System Prompt
  1. The System Prompt Tax
  1. Calls in a Budget
  1. Tokens on a Budget
  1. How Long Will It Take?
  1. The Split Matters
  1. Pricing per Million Tokens
  1. Tokens from the Bill

1. Count the Tokens

Read Count the Tokens →


2. Subword Splitting

Read Subword Splitting →


3. Punctuation Counts

Read Punctuation Counts →


4. Tokens per Word

Read Tokens per Word →


5. Will It Fit?

Read Will It Fit? →


6. The Price of a Call

Read The Price of a Call →


7. Two Kinds of Token

Read Two Kinds of Token →


8. Input or Output?

Read Input or Output? →


9. The Two-Part Bill

Read The Two-Part Bill →


10. End-to-End Call Cost

Read End-to-End Call Cost →


11. Comparing Three Calls

Read Comparing Three Calls →


12. The Average Call

Read The Average Call →


13. The System Prompt

Read The System Prompt →


14. The System Prompt Tax

Read The System Prompt Tax →


15. Calls in a Budget

Read Calls in a Budget →


16. Tokens on a Budget

Read Tokens on a Budget →


17. How Long Will It Take?

Read How Long Will It Take? →


18. The Split Matters

Read The Split Matters →


19. Pricing per Million Tokens

Read Pricing per Million Tokens →


20. Tokens from the Bill

Read Tokens from the Bill →