hunter paulson

art
blog art projects github linkedin

a collection of animations I made in reverse chronological order


2026-07-04 - prompt cache writes in an agent loop

legend

cache write; written to cache; cache read; new this step;

request 1

system message and tool definitions You report the weather $12.50 / 1M

user message what is the weather in Phoenix? $12.50 / 1M

the API caller pays to cache user prompt along with the system message and tools since they will be resued in all following requests
result 1

system message and tool definitions You report the weather $12.50 / 1M

user message what is the weather in Phoenix? $12.50 / 1M

assistant message I’ll use my get_weather tool to get the weather in Phoenix $50.00 / 1M

tool call(s) <tool name=get_weather> <param name=city>Phoenix</param> </tool> $50.00 / 1M

only input tokens are written to the prompt cache even though all messages will be in the prefix of the next request
request 2

system message and tool definitions You report the weather $1.00 / 1M

user message what is the weather in Phoenix? $1.00 / 1M

assistant message I’ll use my get_weather tool to get the weather in Phoenix $12.50 / 1M

tool call(s) <tool name=get_weather> <param name=city>Phoenix</param> </tool> $12.50 / 1M

tool result(s) hot $12.50 / 1M

API caller pays again to cache tokens that they just paid full output price for
result 2

system message and tool definitions You report the weather $1.00 / 1M

user message what is the weather in Phoenix? $1.00 / 1M

assistant message I’ll use my get_weather tool to get the weather in Phoenix $12.50 / 1M

tool call(s) <tool name=get_weather> <param name=city>Phoenix</param> </tool> $12.50 / 1M

tool result(s) hot $12.50 / 1M

assistant message It's hot in Phoenix right now $50.00 / 1M

the agent loop ends when LLM stops calling tools

2026-05-08 - matrix rain

download gif

my favorite movie of all time


S
T
Begin knowing the start and target page.
S
T
1
1
1
1
1
1
1
1

Get all the pages that the start page links to.
S
T
2
2
2
2
2
2
2
2
2
2
2

Get all the pages that the start page can reach in TWO links.
S
T
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3

Get all the pages that the start page can reach in THREE links.
S
T
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4

Get all the pages that the start page can reach in FOUR links.
S
4
1
1
1
2
2
3
3
3

Drop every page that is not on a shortest path.
S
4
1
1
1
3
3
3
2
2

It takes at least 4 clicks to reach the target page.

download gif


2026-04-30 - bidirectional BFS

S
T
Begin with the start and target page.
S
T

Get all the pages that link to the target page.
S
T

Get all the pages that the start page links to.
S
T

Get all the pages that can reach the target page in 2 links.
S
T

Get all the pages that the start page can reach in 2 links.
S
4
1
1
1
3
3
3
2
2

Find all the connections to the nodes where they intersect.
S
4
1
1
1
3
3
3
2
2

We have found the shortest paths from start to target!

download gif


2026-03-15 - optimizing…

(loading stochastic agentic ascent kernel...)
(loading stochastic agentic ascent chart...)

download gif


2026-03-08 - abstracting/compiling

(loading abstraction...)

download gif download reverse gif


2026-02-16 - tractors farming code

loading field...

download gif


2025-10-15 - donut.js

(loading donut...)

download gif


2025-10-04 - blackhole.wgsl/wasm

loading...


loading controls...

download gif