Skip to content
Frank Huettner

Agentic AI in Business · Workshop II

Homework until 23 Nov, Part A: The model and the facts

On this page

Claude Code makes mistakes, and it costs money. So it is good to know who makes the mistakes, and who gets the money. In this part, you find out which model works inside Claude Code. Then you look at the information that Claude Code receives at every start, e.g. about your setup: with this info, it needs to guess less, makes fewer detours, is faster, and you need to correct less.

1. Know the model inside Claude Code (here: GLM 5.3 Flash)

Claude Code has two parts:

  • The tool is the program in your terminal, on your laptop. It carries out the steps: it reads files, runs commands and shows you what happens. It also keeps the whole conversation since you started Claude Code, and at every step, it sends the conversation to the model.
  • The model runs on a server of the company that offers it, not on your laptop. It reads the conversation and decides the next step: which file to read, which command to run, what to tell you.

In the course, the model is GLM 5.3 Flash, by the company Z.ai. The same tool also works with other models, for example with Claude, by Anthropic, the company that makes Claude Code. In this homework, “Claude Code” means both parts together, as you see them in your terminal. Where it matters which part does something, we say “the tool” or “the model”.

Youwrite the prompt, and steer
The toolon your laptop: carries out the steps, keeps the conversation
The modelon a server: decides the next step

GLM 5.3 Flash by Z.ai, through OpenRouter, paid with your OpenRouter key

Claude (Sonnet, Opus …) by Anthropic, paid by your Claude subscription

Claude Code: the tool and the model. Each dot is one step: the tool sends the conversation to the model, and the model answers with the next step. The two buttons swap the model; the tool stays the same.

Your turn: see which model works for you. Start Claude Code. Paste this line into your terminal. The dollar sign before it stands for the terminal: it is not part of the command.

cd ~/kingo-pod && ./kingo claude
New here? Start Claude Code in your practice folder

Start it as in your first start: paste this line in place of the one above.

cd ~/kingo-pod && ./kingo claude --in ~/projects/practice

Look at its first lines. In our tests, they looked like this:

Claude Code v2.1.322 z-ai/glm-5.3-flash · API Usage Billing ~/kingo-pod/claude
The first lines of Claude Code in our tests, with your folder in the third line. Marked: the model, and how it is paid.

The second line names the model, z-ai/glm-5.3-flash, and how it is paid: API Usage Billing means per use, here with your OpenRouter key. Find the two in your own first lines.

Commands with a slash. In Claude Code, where you write your prompts, you can also type commands that start with / (do not type the sparkles: we use them here only to tell these commands apart from terminal commands). They control the tool itself, for example:

  • /exit ends Claude Code.
  • /clear empties the conversation, for a fresh start. Your files stay as they are.

Type / now, where you write your prompts: a list of all commands opens, and there are many more. You meet some of them in this homework. Leave with /exit.

Quiz. Which part is it, the tool or the model? Sort each card into its box.

What is trueWhich part
Runs on your laptopThe tool
Runs on a server of the company that offers itThe model
Keeps the whole conversation and sends it to the model at every stepThe tool
Decides which command to run nextThe model
Empties the conversation when you type /clearThe tool
Writes Chinese all of a sudden, in the middle of an English taskThe model
Why

The tool is the part on your laptop: it keeps the conversation and carries out what the model decides. The model is the part on a server: it decides the next step and writes the words. So when Claude Code suddenly writes Chinese, that comes from the model, and one line steers it back: “Please write in English.”

Why this matters. Each model makes its own kind of mistakes. In our tests, GLM 5.3 Flash went in circles and switched to Chinese (as we’ll discuss in step 6); another model may make other mistakes. This homework develops your habits, things that you do: how you ask, how you watch, how you check. So they help with any model.

Four settings decide which model works, and how. They are the first four rows of this table. Note: An API is the way that programs talk to each other, here the tool and the server of the model. A token is a short piece of text, often part of a word.

./kingo claude./kingo claude --login
The model name: which model answersz-ai/glm-5.3-flash, that is GLM 5.3 Flash, by Z.aiClaude (Sonnet, Opus …), by Anthropic
The API URL: where the tool sends the conversationto OpenRouter, which passes it on to a server that runs the modelto Anthropic
The API key: who paysyou, with your OpenRouter key: about 0.15 US dollars per million tokens in, 0.50 US dollars per million tokens outyour Claude subscription, up to its limits: your login takes the place of a key
The context window: how long the conversation can get200,000 tokens: kingo sets this1,000,000 tokens on the current Claude models
/effort: how much the model thinks before it answersnot for this model/effort low to /effort max

200,000 tokens is a lot: the text of several books. When the conversation gets near the end of its context window, the tool shortens it: it replaces the older part with a summary.

The toolon your laptop
OpenRouteropenrouter.ai/api
The modelz-ai/glm-5.3-flash

The model name says which model answers: z-ai/glm-5.3-flash. OpenRouter passes the conversation on to a server that runs this model.

The API URL says where the tool sends the conversation, at every step: to https://openrouter.ai/api.

The API key goes with every request. OpenRouter charges the owner of the key: you.

The context window says how long the conversation can get: 200,000 tokens. Near that limit, the tool replaces the older part with a summary.

Click the four settings: each one lights up what it decides.

What leaves your laptop. At every step, the tool sends the conversation to the model: your prompts, and everything that Claude Code read, for example files and mails from your database. With your OpenRouter key, it goes to OpenRouter and on to a server that runs the model; with --login, it goes to Anthropic. OpenRouter keeps your prompts only if you switch that on, and the company that runs the model has its own rules.

  • In your team’s project: when Claude Code reads its data, the data goes to the server of the model, just as when your Langflow flows send it there. This is okay: the data is synthetic, made up for the course.
  • At work: let Claude Code read company or customer data only when you may send that data to every company that gets it: the company that runs the model, and any service in between, such as OpenRouter.

The model is set for you. kingo set the four settings for you. In all six places where Claude Code names a model, one for each of its jobs, kingo put GLM 5.3 Flash. In the course, your OpenRouter key works only for the course’s models: after /model and another name, Claude Code shows an error. To go back, type /model z-ai/glm-5.3-flash in Claude Code, or start ./kingo claude again in your terminal.

If you have a Claude Pro or Max subscription, you can use it with ./kingo claude --login: then Claude Code uses Anthropic’s models, and your Claude subscription pays. Type /model in Claude Code and pick one.

If you use Claude Code without kingo: where to find the settings

Outside kingo, you set the four settings yourself. Claude Code reads them from environment variables. You can also write them into a file settings.json, under "env": kingo did that for the model names, for the course in ~/kingo-pod/claude/.claude/settings.json, and for a folder of your own in ~/kingo-pod/setup/claude/settings-in.json.

SettingIts name in Claude Code
The model nameANTHROPIC_MODEL, and five more, for Claude Code’s other jobs, as in kingo’s settings.json
The API URLANTHROPIC_BASE_URL, for OpenRouter: https://openrouter.ai/api
The API keyfor OpenRouter: ANTHROPIC_AUTH_TOKEN, with ANTHROPIC_API_KEY set to ""; for Anthropic’s own API: ANTHROPIC_API_KEY
The context windowCLAUDE_CODE_MAX_CONTEXT_TOKENS, for a model that Claude Code does not know
  • A key is a password. Never write it into a file that you share or upload, for example to GitHub. In kingo, Claude Code never sees your key: the sandbox keeps it and adds it to each request on the way out.
  • Claude Code knows the context window of Claude models only. For any other model, it assumes one, and that may be wrong. So give it the size from the model’s page, or a smaller one. kingo gives 200,000 tokens, though GLM 5.3 Flash takes more than 1,000,000: so the tool shortens a long conversation earlier, and each step after that costs less.

From Anthropic’s pages on environment variables and on the context window of a model it does not know, and OpenRouter’s guide Claude Code integration.

Done: you know who answers you, where your words go, and who pays.

Next time. When you start Claude Code somewhere new, read its first lines: which model works there, and who pays?

From Anthropic’s How Claude Code works: “models that reason and tools that act”, and its pages on model configuration and commands. The price and the context window of GLM 5.3 Flash are from OpenRouter, 18 Nov 2026. What OpenRouter keeps: its pages on data collection and provider logging.

Stuck? Help for step 1

2. Give Claude Code the facts of your setup

Quiz. Langflow and n8n come in many versions, and what works in one version may fail in another. How does Claude Code know which versions run in your kingo-pod?

  • From what the model learned: it knows every version of Langflow and n8n
  • From the files it reads at the start, and from what it finds out while it works
  • From the newest documentation on the internet
Show the answer

From its files and from what it finds out. The model learned a lot about Langflow and n8n, but not which versions run on your laptop. The newest documentation is for the newest version, and your setup may run an older one. When its files say nothing, Claude Code has to guess and try, and that takes time. A few lines in its files save it that search.

Here, three short files tell Claude Code the facts of your kingo-pod: how to find the versions, where Langflow and n8n describe their API (the way other programs talk to them), how long they may take to answer, and what you can do that Claude Code cannot.

In kingo-pod, kingo gives Claude Code such facts. Indeed, it writes them into your course folder, ~/kingo-pod/claude, at every start of ./kingo claude. Your turn: see them.

New here? Look at the facts that kingo writes for the course

With --in, kingo writes no file into your folder: these facts are about n8n and Langflow, which you do not have. But kingo-pod holds the files that kingo writes for the course, in the folder ~/kingo-pod/setup/claude. On a Mac, paste this line into your terminal:

open -e ~/kingo-pod/setup/claude/AGENTS.md

On Windows, paste this line into the Ubuntu app:

cd ~/kingo-pod/setup/claude && notepad.exe AGENTS.md

Find the section “Facts about this setup”, right above the heading # Your team's rules. Its three lines with @ load the three files in the folder info-for-ai, next to AGENTS.md. Close the file without a change. Then skip the four steps below, and read on at For any project.

  1. Start Claude Code. Is it running already? Type /exit first. Then paste this line into your terminal. It updates kingo-pod, checks that the facts have arrived (you see the names of three files), and starts Claude Code.

    cd ~/kingo-pod && ./kingo update && ls setup/claude/info-for-ai && ./kingo claude

    Got an error? Expand the hints below. Otherwise, move on to the next step.

    Claude Code does not start, and the last line says "No such file or directory"?

    Then your kingo-pod is still an older one: ./kingo update could not bring its newest files. The line stops on purpose before Claude Code, because the older kingo-pod writes no folder info-for-ai.

    Scroll up in your terminal to the lines of ./kingo update. Find the line that starts with WARN:. It says why the update did not come through. Do what that line says:

    • could not reach GitHub (no network?): check that your laptop is online. Then repeat step 1.
    • this folder has local changes: a file of kingo-pod itself was changed. Paste cd ~/kingo-pod && git checkout -- .: this line undoes the change. Your course folder, your flows and your workflows stay as they are. Then repeat step 1.
    • Send this message to your instructor: send it, with the lines around it. Until the answer comes, start Claude Code with cd ~/kingo-pod && ./kingo claude, skip 2, 3 and 4 below, and read on at For any project.

    It worked when you see the names of three files, kingo-pod.md, langflow.md and n8n.md, and then Claude Code starts.

    Do you start Claude Code with --login?

    Then kingo asks for your OpenRouter key if it does not have it yet: paste the key that your flows in Langflow use. With it, Claude Code can try the models of your flows.

  2. Open your course folder, ~/kingo-pod/claude: there Claude Code works for the course. Is Claude Code still running? Type /exit first: the lines below go into your terminal, not into Claude Code. On a Mac, paste this line:

    open ~/kingo-pod/claude

    On Windows, paste this line into the Ubuntu app:

    cd ~/kingo-pod/claude && explorer.exe .

    Tip for Windows: pin the folder, so that you find it again without the command. Click the arrow ↑ next to the address bar: now you see the folder claude. Right-click it and choose Pin to Quick access. From then on, it is in the left column of every File Explorer window.

    Windows: how can Ubuntu open a window of Windows?

    Ubuntu runs inside Windows, and the two can reach each other:

    • From Ubuntu, you can start programs of Windows: explorer.exe is the File Explorer, notepad.exe is Notepad. The last dot in explorer.exe . means: the folder you are in.
    • So the File Explorer shows your folder in Ubuntu, and you can drag files from Windows into it.
    • Ubuntu also sees your files in Windows: the drive C: is the folder /mnt/c. Still, keep your work in Ubuntu, under ~, as this homework does: Microsoft advises to avoid working in Windows folders from within WSL.

    From Microsoft’s Working across file systems.

  3. In the course folder, open the folder info-for-ai: it holds three short files, kingo-pod.md, langflow.md and n8n.md. In the terminal, this line lists them:

    ls ~/kingo-pod/claude/info-for-ai
  4. Open AGENTS.md in a text editor, as in step 6 of the last homework. On a Mac, paste this line into your terminal:

    open -e ~/kingo-pod/claude/AGENTS.md

    On Windows, paste this line into the Ubuntu app:

    cd ~/kingo-pod/claude && notepad.exe AGENTS.md

    Find the section “Facts about this setup”, right above the heading # Your team's rules. Its three lines with @ load the three files.

What stays, and what kingo writes. kingo writes everything above # Your team's rules anew at every start, and the three files in info-for-ai too. So your team’s rules go below the heading: there they stay. Did a line of your own land above the heading? kingo moves it below the heading and says so. kingo keeps a copy of the file as it was in ~/kingo-pod/backups/course-files/.

Done. At every start, the tool now loads these five files, its start files, and gives them to the model, before your first prompt:

  1. CLAUDE.mdClaude Code opens it first. It points to AGENTS.md: @AGENTS.md
  2. AGENTS.mdhow to reach the services, your team's rules, and three lines with @info-for-ai/…
  3. info-for-ai/kingo-pod.mdyou, the student, and this kingo-pod
  4. info-for-ai/langflow.mdthis Langflow: how to find its version, where its API is described
  5. info-for-ai/n8n.mdthis n8n: how to find its version, where its API is described
Each @ in a file makes the tool load one more file. The model gets all five, at every start.

For any project. Here, kingo wrote the facts for you; in a project of your own, you write them yourself. Claude Code loads the file CLAUDE.md at every start. Many other coding agents (tools like OpenCode) read a file AGENTS.md instead, and Claude Code reads that file too when a folder has no CLAUDE.md. Here, CLAUDE.md only points to AGENTS.md, so both work.

Four tips for such a file:

  • Keep it short. The model reads every line, for every task.
  • Write down what Claude Code cannot find out by itself, or only after a long search: for example, which versions you run, a decision that is only in your head, and anything you had to correct twice.
  • Say how to check the work, for example with the command that runs the tests.
  • Name the limits. Does Claude Code work in a sandbox? Write down what it may do there, what it may not, and what you can do for it. Then it does not lose time finding the limits by trial and error.

Next time. When you correct Claude Code twice on the same thing, ask it: “Write this into AGENTS.md, below # Your team's rules.” From then on, it reads it at every start.

From Anthropic’s best practices for Claude Code: tell Claude what it can’t see (the limits of a sandbox are such a thing), and keep CLAUDE.md short; on AGENTS.md: How Claude remembers your project and OpenCode’s page on instructions. Pin to Quick access: Microsoft’s File Explorer in Windows.

Stuck? Help for step 2

Next: Part B · Ask well →

If something goes wrong

Find your step.

Step 1

What you seeWhat to do
New here: kingo says n8n and Langflow must be running firstThat is the start for the course. Start Claude Code in your folder: cd ~/kingo-pod && ./kingo claude --in ~/projects/practice.
New here: kingo says Claude Code is not installed, or python3 is missingPaste the line that kingo names after it, then start again.
After /model and a name, Claude Code shows an errorIn the course, your key works only for the course’s models. Type /model z-ai/glm-5.3-flash to go back. With a key that may use other models, check the name on the model’s page, and that the model supports tools and images: No endpoints found … means that OpenRouter found no server for this model that takes your request, for example because the model reads only text and the conversation holds a picture.

Step 2

What you seeWhat to do
No such file or directory for ~/kingo-pod/claudeClaude Code never started in the course folder. Do step 4 of the last homework first.
You see no AGENTS.md in the course folderSame as above: start Claude Code once with cd ~/kingo-pod && ./kingo claude, then /exit.
open or explorer.exe opens no window, or Claude Code answers the lineYou pasted the line into Claude Code. Type /exit, then paste the line again.
There is no folder info-for-ai in your course folder, or ls says No such file or directory for itNew here? You have no course folder: the facts are in ~/kingo-pod/setup/claude/info-for-ai, as the box in step 2 says. In the course, type /exit and paste the first line of step 2 again: cd ~/kingo-pod && ./kingo update && ls setup/claude/info-for-ai && ./kingo claude. Claude Code does not start? Open the box under that line.
kingo says that your AGENTS.md has no heading ”# Your team’s rules”Open AGENTS.md, and write the line # Your team's rules above your team’s rules, or at the end of the file. Then start ./kingo claude again.
kingo says that it moved lines below # Your team's rulesThey were above the heading, where kingo writes its own part. Now they are right below the heading: check them there. The file as it was is in ~/kingo-pod/backups/course-files/.
./kingo claude (or ./kingo claude --login) asks for your OpenRouter key, and you do not have it any moreIn the course, paste the key that Yanbo gave you. You cannot find it, or you want a key of your own? On openrouter.ai, make an account and add credits. Then open Settings, then Keys, make a key, and paste it.