logoalt Hacker News

kgeistlast Tuesday at 11:44 PM3 repliesview on HN

>Tiny ~6mb binary

I wonder why it's so large for a program written in Zig. It's basically just a loop that accepts user input, prepares the context, sends it to the LLM, parses the output, invokes the tools, and presents it all in the terminal. Add the built-in prompts and a few checks here and there (like blocking a write tool call before the file has been read first), and I'd expect a truly tiny native agent to be around 200-300 KB max.


Replies

miguel_martinyesterday at 9:39 PM

fwiw, here's 3code which is 1.6MiB written in Nim - https://3code.capocasa.dev/

wyreyesterday at 11:30 PM

I was looking it last night and the repo is something like 600k lines of Zig. Maybe 500k after comments and blank lines.

In my own experiments to build a tiny zig agent it came out to under 800kb.

show 1 reply
irishcoffeeyesterday at 11:59 PM

So large? Really? Allow me to introduce you to electron.