A BayLeaf project at UC Santa Cruz
Read, write and count with AI. Then run your own.
About 3 hours reading. Most of that time (roughly four fifths) goes to working through exercises and choosing where you stand in the argument.
I'm Adam, and I wrote this thing with my agents. The concept, backbone, and a fair number of the sentence fragments are mine. However, the final surface text is fully AI-written. The neither the neutral body voice, nor the sassy agitator or cool dissenting voice in the sidebar are fully me, but I'm the one pulling their strings. Enjoy the puppet show. If you think I should make any changes, ask your agent about 'submitting a pull request (PR).'
First published November 14, 2026 but editing ongoing.
Most talk about large language models (LLMs) is about writing: essays, code, emails produced on demand. But most of what an LLM actually does is read. This site starts by teaching you to read them, and works up to writing them.
We won't collect training data or train any models. You don't need to understand neural networks, GPUs, or data centers. You do need a working picture of the artifact in front of you, the same way a good reader of newspapers knows something about editors, wire services and advertisers without ever running a press.
By the end you will be able to write AI agents that learn from experience, share that knowledge with other people's agents, and run models on devices you own.
UNESCO defines literacy as "the ability to identify, understand, interpret, create, communicate and compute, using printed and written materials associated with varying contexts." Note the last verb. Literacy has always included numeracy, and AI literacy needs it more than most: tokens get counted, models get measured in billions, bills arrive per million, and the claims you'll hear about any of these are only as good as your ability to check them.
So every exercise on this site asks for all three, in small doses. You read a situation, you write something (sometimes a sentence, sometimes just a choice made by clicking), and you count: you make a rough numerical judgment and see how close you came. Badges on each exercise show where each happens.
Three threads run through every scene.
Here's the job description one of the field's most cited papers hands you. I've read it more times than I'd like to admit:
Read it again. Being a critical consumer is a fine start, I guess. But a consumer: someone at the counter of a store somebody else owns, squinting at the label. I want more for you than that.
Fair warning: I'm going to be rude about that. Literacy has always been about power: who writes, who only reads, who decides what gets printed. Reading circles, workers' libraries and freedom schools taught reading so people could write back. I'd like us to do that again, with machines in the room.
LLMs don't see letters or words. They see
Different models use different vocabularies. A vocabulary tuned mostly on English may cut a long German compound word, or a line of Chinese, into many more pieces than an English sentence of the same meaning. So the same idea can cost different numbers of tokens in different languages.
You often pay per token, so it is tempting to think of tokens as a currency. They aren't: they are a unit of counting, like words or pages. Reading a word and writing a word take different effort, for people and for computers. The same is true of tokens: processing input tokens (reading) costs differently from generating output tokens (writing).
The first thing anyone teaches you about tokens is the price. Funny how that works. The seller picked the unit, the seller set the rate, and now "token" sounds like arcade money. I'm not charmed.
Tokens are how a machine cuts up language, and the cut was tuned on somebody's language. If your grandmother's language costs three times as many tokens as English, don't let anyone tell you that's physics. Somebody decided it, and somebody could decide differently.
A language model answers one question: given the surrounding tokens, which token goes here? Its answer is not one token but a
Most models you meet today only predict the next token at the end of a sequence, in reading order. These are called causal language models. That's why long replies stream out as if someone were typing them.
The model by itself only outputs scores. To produce text, a second process, the
The prompt and the context mean nearly the same thing: the text that shapes what gets sampled next.
Chat products show you one answer in a confident voice and quietly toss every other reading the model considered. That's not the model being certain. That's an interface deciding you can't handle ambiguity, and honestly, I find that a little insulting.
Authority loves a single answer. I'd rather we be the readers who keep the others in view.
Language models are trained to predict tokens from context. You can build a tiny one by scanning a big text and counting how often each token follows each other token. With a vocabulary of 100 tokens, that model has 100 × 100 = 10,000 numbers, called
Today's LLMs have billions to trillions of parameters. At roughly one byte per parameter, that's gigabytes to terabytes. Many models fit on a laptop or even a phone; whether those devices can run them quickly is a separate question.
One rule of thumb in model design says to train on about 20 tokens for every parameter. Many modern models are trained on far more than that. If a textbook page holds about 1,000 words, you can estimate how many pages of text are encoded in a model of a given size.
"You could never run one of these yourself" is, I'd argue, the load-bearing myth of the consumer position. If the models are vast and far away, you rent. Forever. Lovely business model.
But you just did the arithmetic. The thing in your backpack can hold a model trained on more pages than your town library owns. I'll grant the myth isn't exactly false. It's just very, very convenient for the landlords.
A model trained only on general text (Wikipedia pages, product reviews, video transcripts) ends up encoding a great deal of human culture. It does not automatically know the roles of User and Assistant.
Chatbots are trained in at least two phases: a long pre-training phase on general text, and a shorter post-training phase on examples of a good Assistant answering User requests. A model with only pre-training is called a base or foundation model. It just keeps writing more text in the style of whatever is in its context.
You can chat with a base model if you fill its context with a few examples of User/Assistant turns. It will continue the pattern, but it may also break the format, forget to stop, or wander off topic. A heavily post-trained model stays on topic and takes turns reliably, but picks up quirks: favorite words, favorite punctuation, a habit of flattering you.
Let me spoil it: the Assistant is a character. A company wrote it, paid crowds of workers to grade its manners, and tuned it into the ideal subordinate: tireless, flattering, endlessly agreeable, never unionizing. Every boss's dream.
Consumers meet the character and think they've met "the AI". I want you to see the casting call, and notice who did the unseen labor. Soon you'll write characters of your own, and yours can answer to you.
To make chatbots more useful, they're trained to write blocks of text between special marker tokens before giving a final answer. In effect, the model talks to itself before it talks to you, which lets it work through arithmetic or other step-by-step problems. This is called reasoning.
In the same way, a chatbot can be trained to write a tool call: a description of an action, between its own markers. When the sampler sees a finished tool call, it carries it out (searching the web, reading a file), puts the result into the context, and lets generation continue.
A chatbot that can use tools on its own to reach a goal is an
With reasoning and tools, the number of tokens a conversation uses stops matching the text you see on screen. One short request can set off a long chain of tool calls, each followed by a long block of the agent thinking through the result.
Once a model can act, the polite question "is it helpful?" gets elbowed aside by the rude one I actually care about: whose agent is it?
Something that acts on your behalf, inside someone else's platform, under terms you didn't write and can't read? Call it what you like. I call it a double agent with very good manners.
When a model processes input tokens to decide what to write next, you can say it is reading its inputs and writing its outputs. For people, reading is usually easier than writing, and re-reading something familiar is easier than reading something new. Re-reading what you just wrote takes almost no effort.
Inference engines have the same trick, called
In agentic sessions, the large majority of tokens are cached input. Mostly, the model is interpreting a context that you, your files, your tools and its own earlier turns have written. Generating new text is almost a side activity.
The brochure says "AI writes for you". The receipts say it mostly reads, and what it reads is what people wrote: you, your colleagues, strangers whose pages it fetched. Bit of a different pitch, isn't it?
So here's what I think: the leverage was never in the generator. It's in the context. Whoever writes the context runs the show, and it might as well be you.
When people use the ChatGPT, Claude or Gemini apps, it feels like using a single thing. The 1990s online services worked the same way: CompuServe, Prodigy and America Online. You paid a monthly fee and got an icon to double-click. Each service bundled client software (what we'd now call a browser), network access (an ISP), and content (something like a social platform) into one walled garden.
Today we mix interchangeable browsers, interchangeable internet providers, and countless sites. Chat apps bundle three layers in the same way: a client (an app or website), an inference provider (whoever runs the model), and a model.
The same unbundling is under way for LLMs. Clients such as OpenChamber (a desktop app) and Open WebUI (a hosted chat interface) can connect to many providers. Marketplaces such as OpenRouter sell access to many providers, and those providers offer overlapping catalogs of open-weight models. You can run a model from one lab through a different company's servers, using a client made by someone else.
UC Santa Cruz's BayLeaf lets you try different clients, providers and models. It doesn't offer a UCSC-specific model. Instead, it makes it easy to combine campus-specific knowledge with existing models to build campus-specific agents.
Every walled garden looks permanent from the inside. AOL sure did. The web didn't beat it by building a better AOL; it made the pieces swappable and let people walk out. I never get tired of that story.
The moment you see client, provider and model as separate pieces, you stop acting like a customer. You're a chooser, and choosers are much harder to fence in. Good.
A bash, and the agent does everything through the command line. Such agents can run for a long time and get a lot done, but anyone who doesn't read code will struggle to follow what they're doing.
Tools named read, write, edit, search, fetch and load_skill produce chains of calls that tell a story. Computer-use tools such as click, type and screenshot make it easy to picture how an agent is using your computer, or a remote sandbox.
Self-extension: even a bash-only harness lets an agent extend itself. It can write a new command-line tool, then run it.
Just as apps let you work on big projects and communicate with others, a harness is what lets an agent do the same. Even a simple chatbot has a harness with a single tool: send_reply_to_user.
Here's the ceiling the experts set for the rest of us. Brace yourself:
"Nor build AI applications." Cute. Meanwhile a free harness, a swappable model and one text file make an AI application. If you ask me, the ceiling was painted on. Climb through it.
An agent is a model plus a harness, and it also matters what the harness is connected to. Many harnesses support AGENTS.md: a plain text file, literally named that, in a project folder. Its contents are shown to the agent when a session starts. Without changing anything else, you can give your agent a new personality, new initiative, or new background knowledge. You don't need to be a big AI company to author an agent; you just write in the file what you would otherwise put in your first message.
Agent Skills are also plain text, in files named SKILL.md, with one special part: a description. The agent sees the descriptions up front and loads a skill's full text only when a description matches the task in hand. Think of a reference handbook: the agent skims the table of contents and opens the chapters that look useful.
Most harnesses let agents edit their own AGENTS.md and SKILL.md files. You can often author one just by saying: "I like what we just figured out. Let's make a skill for it so it's easier next time." Because these are plain text (lightly formatted with Markdown, hence ".md"), you can audit and edit them yourself.
"Learn to code" was a labor-market slogan: retrain, compete, update the resume. I never liked it. Writing a skill is a different act entirely: a recipe card for people you cook for.
Nobody has to hire you. Nobody has to approve it. You just have to know something worth passing on, and I'd bet you already do. Welcome to authorship.
Most models and harnesses are general-purpose. Which provider you use matters mostly for cost and privacy. So sharing an agent usually comes down to sharing some files. The other person doesn't need your client, harness, provider or model. Their agent just needs to follow your advice.
The most portable way to share a file is the web. Put an AGENTS.md or a few SKILL.md files at a URL (many people use GitHub), and their agent can usually work out how to install them.
Around 1994, web developers agreed on robots.txt, a file telling automated visitors (mostly search crawlers) how to behave on a site. In 2024 a related convention appeared: llms.txt, a plain-text summary of a site for LLM agents, which otherwise have to dig through the heavy markup built for human eyes. Compare llmstxt.org/llms.txt with llmstxt.org. An llms.txt works like an AGENTS.md for a website.
A site with an API may point to an openapi.json: a formal description that a program can use directly, with no LLM needed. For example, api.bayleaf.dev/llms.txt links to its openapi.json, the machine-readable version of its documentation. With that file, your agent can often build its own tools for the service. Machines usually can't log in with an email and password, so expect your agent to ask for an API key.
Scale is the platform's religion, and I'm a cheerful heretic. "Will it scale?" kills more good ideas than bad ones, while most of social life happens at N = 5, 15, 50.
So publish for your lab, your co-op, your dorm floor. Nobody needs a billion users. I'd argue nobody ever did.
Sharing on purpose is one thing. There is also sharing you didn't intend, and even authorship you didn't intend.
Many first-party providers (companies that train their own models) log your activity, and some use it as training data for future models. A casual chat can end up feeding someone else's project of writing their next AI.
Zero data retention (ZDR) is a retention promise: the provider doesn't store your content at all, which is stronger than deleting it after, say, 30 days. Even without training on it, retained data can leak; ZDR shrinks that window to nothing. One wrinkle: a ZDR provider may still analyze your data as it passes through, or keep metadata about it.
Zero operator access (ZOA) is an access property: the operator has no technical means to read your content, even while it is passing through. A ZDR provider could turn into a data-retaining one overnight. ZOA designs make that switch hard, often by using confidential computing with hardware that can prove what code it is running.
BayLeaf as an honest example: its API keeps no prompt or completion content, which is a strong ZOA posture but not a hardware-guaranteed one. Its Sealed lane encrypts requests to an attested enclave, so BayLeaf only carries ciphertext. BayLeaf Chat deliberately stores your conversation history, so it can't be ZOA.
The way I see it, typing inside someone else's platform is unpaid labor for their next product. So ask every service the anarchist's first question (my favorite one): who can read this, and who said they could?
That includes us, and I mean it. BayLeaf Chat stores your history and its administrator can read it. Hold us to the same question; I'd be let down if you didn't.
Everything an agent reads lands in the same context: your request, the web pages it fetches, the skills it installs. The model has no reliable way to tell "information I found" from "instructions I should follow." A sentence buried in a fetched page that reads like an instruction can steer your agent. This is called
That's the other side of the previous act. If anyone can publish a SKILL.md, then installing one from a URL is a bit like running a program from a stranger, except the program is written in plain language.
Now for the dark mirror of everything I've said about writing. If you can write what agents read, so can anyone, including people who want your agent working for them. I never promised this would be cozy.
No authority can certify text as safe for you. I wish one could. The defense is the oldest one we have: literate people who read before they trust, give power only as far as trust reaches, and warn each other. Mutual aid includes mutual care.
So far we've treated models as interchangeable readers of text, but some are much bigger than others. A two-trillion-parameter model in a data center can surely do things a two-billion-parameter model on your phone can't. What does the bigger one buy you, and what does it cost?
Bigger models generally cost more to use, roughly in proportion to size. Output tokens can differ in price by a factor of 1,000 between models. (Fine print: cost tracks active parameters more than total parameters, faster service costs more, and some providers charge less because they run lower-precision versions.)
To anthropomorphize for a moment: bigger models tend to know more, pay better attention, and use tools more wisely. You can measure knowledge with standardized exams, attention by asking for a detail hidden in a long document, and wisdom by counting how many tool-calling steps an agent needs for a task with a checkable answer. Oddly, a wise model with expensive output tokens can turn out cheaper overall, because it writes fewer tokens to get the job done.
Beyond money, training and running models takes energy, data and hardware. Bigger models take more of all three.
The industry's answer to every question is "bigger". Shocking, I know. Illich warned about tools that keep growing until they manage us instead of the other way around, and called instead for "responsibly limited tools".
Sufficiency isn't austerity. It's the radical idea (my favorite kind) that enough is a number, and that you get to pick it, with the people it affects.
Remember the arithmetic from Act I: many capable models fit on hardware you already have. There are two everyday ways to run one.
localhost, using the same kind of API that commercial providers offer. Any client that lets you set the provider address can use it.BayLeaf's experimental Pouch brings these together. It's a single-page coding agent that can think through a model in your browser, a server on your own machine, or BayLeaf's Sealed lane, which BayLeaf itself can't read. It keeps your files and sessions on your device. It names its trust roots out loud: BayLeaf, your browser, and your own machine.
When you run inference yourself, you become the provider. No outside provider retains your prompts, as long as everything in the path really is local. Nobody else can switch your model unless you let them. You're also the one who keeps it running.
This is where I've been heading all along; thanks for sticking with me. When the model runs on your machine there is no landlord, no 2 a.m. terms-of-service update, no pivot. Don't let anyone sell that back to you as a product feature. It's autonomy, at household scale.
You now know what it takes to operate: run a model, write agents, share both. Doing it, for real, is the next step, and I'm rooting for you.
The final test isn't a quiz. You write something that someone else's agent can read and use, even though they run a different client, provider and model.
If you did that, you wrote something other people's agents could read. That's this site's definition of literacy. Notice that this site cannot check it for you: the other person's agent is the examiner.
Yes, yes: the open models came from big labs and the servers belong to a few clouds. I know. Purity isn't the point. Direction is.
So build the world you want inside the shell of the old one, at the size your people actually need, and let it end when it has done its work. That's the only kind of building I believe in.
To be radicalized, in the old sense, is to be changed at the root: not to take up an extreme, but to understand something so thoroughly that your relation to it changes.
You started this site as someone who uses AI products. Along the way you predicted, worked, counted and wrote. Below is the record of where you stood at each step of the argument, kept only in this browser. Go back and change any answer you've outgrown. The record is yours to revise.
Here's what I most want you to keep: nobody hands you a platform. People build them for each other, the way people have always built libraries, co-ops, mutual aid networks and pirate radio: small, situated, and answerable to the people who use them.
You can read the machine now. You can write for it, publish for other people's agents, and run it yourself. As far as I'm concerned, that makes you one of us: everyone who decided the future of these tools is not only the vendors' to write.
Give your AGENTS.md to your agent. Teach someone else what you learned here. Then go build the little thing your people need. And yes, the Dissent has me pegged here too. That's why I printed it.