# You Should Write An Agent · The Fly Blog

<https://fly.io/blog/everyone-write-an-agent/>

- Host: [fly.io](https://links.thingelstad.xyz/hosts/fly.io/)
- Saved: November 11, 2025 (2025-11-11T14:17:04Z)
- Record: https://links.thingelstad.xyz/links/ca03375f2436/
- JSON: https://links.thingelstad.xyz/links/ca03375f2436.json

## What Jamie wrote

Great article walking through creating an agent using Python and then extending it with tools and capabilities. It is all a pretty simple example, but it is powerful to show how much capability you can create with these. I think it is fair to say that today every developer should know how to author their own agents with sub-agents and tools. Compared to deploying something in AWS, this is easy.

The author correctly highlights what I know to be one of the biggest challenges — managing context windows.

> You're allotted a fixed number of tokens in any context window. Each input you feed in, each output you save, each tool you describe, and each tool output eats tokens (that is: takes up space in the array of strings you keep to pretend you're having a conversation with a stateless black box). Past a threshold, the whole system begins getting nondeterministically stupider. Fun!
> 
> No, really. Fun! You have so many options. Take "sub-agents". People make a huge deal out of Claude Code's sub-agents, but you can see now how trivial they are to implement: just a new context array, another `call` to the model. Give each `call`different tools. Make sub-agents talk to each other, summarize each other, collate and aggregate. Build tree structures out of them. Feed them back through the LLM to summarize them as a form of on-the-fly compression, whatever you like.
> 
> Your wackiest idea will probably (1) work and (2) take 30 minutes to code.

Great stuff.

## Facts

- Kind: [Page](https://links.thingelstad.xyz/kinds/page/)

## Appears in

- [WT332: Weekly Thing 332 / Compute, Avatar, Cryptography](https://weekly.thingelstad.com/archive/332/), Notable

## Same host

- [My AI Skeptic Friends Are All Nuts · The Fly Blog](https://links.thingelstad.xyz/links/bb15dd91aa34/) (fly.io, June 12, 2025)

## Saved the same week

- [Mr TIFF](https://links.thingelstad.xyz/links/de84a449f2d8/) (inventingthefuture.ghost.io, November 11, 2025)
- [Internet Archive’s legal fights are over, but its founder mourns what was lost - Ars Technica](https://links.thingelstad.xyz/links/f9ebdefa328f/) (arstechnica.com, November 11, 2025)
- [Code execution with MCP: building more efficient AI agents Anthropic](https://links.thingelstad.xyz/links/31348971d5a0/) (anthropic.com, November 11, 2025)
- [How I use AI (Oct 2025) - Ben Stolovitz](https://links.thingelstad.xyz/links/103b442d83f4/) (ben.stolovitz.com, November 11, 2025)
- [Making Sense of Bitcoin’s Changing Market Rythm](https://links.thingelstad.xyz/links/e387ee9d4a9e/) (coinmetrics.substack.com, November 11, 2025)

## Elsewhere

- Wayback Machine: https://web.archive.org/web/*/https://fly.io/blog/everyone-write-an-agent/
