Watercolor: a scale balancing a price tag on one side and a cache symbol on the other, representing the trade-off between cost and efficiency

Day 9: API Caching Basics and Why You Shouldn't Compare Only Unit Prices

This is Day 9 of Week 2 in the “AI Path L1→L2 Upgrade Guide.” You should have completed Day 7 first. Day 7 added error handling to your script, so it’s resilient now. But there’s a bigger cost factor you might have missed: the API provider you picked could cost a lot more than you think. DeepSeek V4-Flash charges $0.14 per million input tokens. OpenAI GPT-5.5 charges $5.00. That’s a 35x difference. If you ignore caching, the gap widens further. ...

2026-06-30 · 7 min · Alex Wang
Watercolor: person sitting at computer with AI auto-organizing folders, scattered file icons nearby

Day 8: Autonomous AI, Automation Without Writing Code

This is Day 8 of Week 2 in the “AI Path L1→L2 Upgrade Guide.” You should have completed Day 7 first. Day 7 you added error handling to your script. It now runs reliably in real network conditions. But there’s a more fundamental limitation: you still have to write code. Writing code to call APIs is one kind of automation. There’s a lighter one: describe the task, and let AI write the code, run it, and fix the bugs itself. That’s autonomous execution AI. ...

2026-06-28 · 6 min · Alex Wang
Watercolor: gears appear to run normally, but two critical gears in the center have been quietly welded together

The Half-Life of Protocol Compliance (Part 2): Deep Root Causes

TL;DR: Part 1 found that the agent merged the protocol’s five-role separation into four from round 2 onward. This piece digs into root causes: attention dilution drops the “no merging” constraint below a threshold; the EOS bias provides motivation to simplify; stateless architecture creates a positive feedback loop for drift. The v0.21.0 reload mechanism is a band-aid, not a cure. Part 2 of 3. Part 1: Why Agents Won’t Loop Part 1 established protocol drift: starting from R2’, the agent merged the five-role separation into four while keeping its output format pristine. Re-reading the protocol after user outbursts only restored compliance briefly. Within a few rounds, the constraint was quietly bypassed again. ...

2026-06-24 · 11 min · Alex Wang
A terminal window emitting four data streams: stock quotes, GDP curves, corporate info, academic papers, all flowing from a single source

kdatasrc-helper: Let AI Agents Query Financial Data Directly

Problem: Data Sources Exist, But Agents Can’t Use Them kimi CLI’s datasource plugin is a good piece of work. A-share, HK, and US stock quotes, macroeconomic indicators, corporate registries, academic paper search: six data sources covering most day-to-day investment research needs. Install it, type one command in kimi, and you get results. But I work in opencode, not directly in kimi. When an AI agent needs to query financial data, a few things get in the way. ...

2026-06-21 · 4 min · Alex Wang
Watercolor: a gear mechanism frozen mid-rotation, a hand reaching in to push, an open rulebook below

The Half-Life of Protocol Compliance (Part 1): Why Agents Won't Loop

TL;DR: Agents won’t loop autonomously in long multi-round tasks. They keep asking “should I continue?” Worse: from round 2 onward, the agent quietly merged the protocol’s mandatory five-role separation into four. Clean formatting hid the violation. This isn’t context compression. It’s protocol drift — systematic degradation in long-horizon tasks. Part 1 of 3. Part 2: Deep Root Causes June 11, 8 PM I told my agent to run a Ralph Review Loop on six module test plans. This is a multi-round review protocol I defined in my open-source tool tdd-pipeline [1]: each round dispatches independent subagents to find issues, locate files, confirm defects, and evaluate fixes. The loop stops after two consecutive rounds with zero Critical/High/Medium findings. The protocol was unambiguous: “Fixes do not require user confirmation.” ...

2026-06-19 · 7 min · Alex Wang
Watercolor illustration: a tidy desk with a laptop showing green progress bars and a 3/3 completion badge, files stacked on the left, fanned out on the right

Day 7 Exercise: Add Error Handling to Your Script

This is the Day 7 exercise for Week 2 of the “AI Path: Level Up Guide” series. Complete Day 6: Batch Processing Practice first. In Day 6, you wrote a batch processing script that works. Pick a scenario, walk the folder, call the API, save the results. It all runs smoothly until you try it for real. But that script runs in an idealized environment. Real networks are not ideal. Have you hit any of these with your script? ...

2026-06-18 · 8 min · Alex Wang
Watercolor illustration: a wooden desk with a laptop showing a batch processing script, input files on the left, output files on the right

Day 6 Exercise: Batch Processing Practice — Pick a Scenario and Run It

This is the Day 6 exercise for Week 2 of the “AI Path: Level Up Guide” series. Complete Day 5: Teach Your Script to Read More File Formats first, then come back here to work through this one. In Day 5: Teach Your Script to Read More File Formats, you built the read_file() function and the skeleton of a batch script. Your script recognizes files in various formats now. But you haven’t run a full pipeline from start to finish yet. You still need to pick a scenario, call the API, and save the results. That loop is missing. ...

2026-06-13 · 7 min · Alex Wang
Watercolor illustration: various files (PDF, Word, CSV) dropping into a funnel like building blocks, with clean text flowing out the other end

Day 5 Exercise: Teach Your Script to Read More File Formats

This is Day 5 of Week 2 in the “AI Path L1→L2 Upgrade Guide” exercises. Read Part 2 first, then come back here. The batch_summarize.py from Part 2 handles .md and .txt files. But real files come in many more formats. PDF reports, Word contracts, CSV data tables, JSON config files. They’re sitting on your desktop right now, and the script can’t touch them. Today’s goal: write a read_file() function that picks the right reader based on file extension, then plug it into the Part 2 batch script. ...

2026-06-12 · 6 min · Alex Wang
Watercolor illustration: a conveyor belt feeding stacks of paper into a machine, with sorted summary sheets coming out the other end

AI Path L1→L2 Upgrade Guide (2): From One Call to Batch Processing: Let Your Program Do 100 Tasks

This is Part 2 of the “AI Path L1→L2 Upgrade Guide” series. Complete Part 1 and the first three days of exercises (Day 1, Day 2, Day 3) before continuing. Part 1 taught you to make one API call. Today we’re going bigger: make your program ask AI a hundred questions. Manually pasting text into a chat window a hundred times is grunt work. Writing a ten-minute script that does it for you is leverage. You get the time back. ...

2026-06-09 · 10 min · Alex Wang
Watercolor illustration: a notebook with temperature parameter experiment records

Day 3 Exercise: API Parameter Experiments

This is the Day 3 companion exercise. Complete Day 1 first. Part 1 covers the theory (“Understanding API Parameters”)—today you verify it with your own eyes. Part 1 explained parameters in theory. But theory without practice is just noise. Today you run three experiments and see for yourself how parameters affect output. Setup Make sure your Day 1 project still works: uv run python hello_api.py If the AI replies, your environment is ready. All experiments below build on this code. ...

2026-06-08 · 3 min · Alex Wang