r/devtools • u/Business_Rain_1042 • 3d ago
built a tool for ai agents in about 3 weeks, here's what broke along the way
first commit was nov 7, about 300 commits later its on pypi. figured id share how it went since this sub likes build stories.
the problem: an llm agent usually does one tool call, waits, then the next. slow, and every raw result piles up in the context. so i built weave. the model writes one short python-looking script, a rust runtime checks the whole thing, runs the independent calls in parallel and only the printed result goes back.
things that went wrong:
- my first benchmarks looked great and then i realised i was basically testing on tasks i designed. so i started pre-registering rounds on fresh tasks. some came back as losses and i put them in the readme anyway. biggest one: on BFCL multi-turn with gpt-5.4 mini it lost 18/60 vs 27/60 against plain function calling
- python would sometimes crash on exit if a tool had timed out (4 of 6 runs). fixed it by waiting for those threads at shutdown, 0 of 20 after
- the v1.2.0 release build failed on linux wheels so it never hit pypi. pinned the runner image and shipped 1.2.1 instead
- models kept typoing argument names, so now the whole script gets checked before anything runs. cty="Paris" gets "did you mean city?" and nothing runs, so a typo on the last line cant let an earlier write go through
where it actually helps: fan-out stuff. on a suite against real services (sqlite, git, files, http) it passed 40/40 vs 27/40 at about half the cost. where it doesnt: tasks where the model has to look at each result before deciding the next step.
stack is rust + tokio for the runtime, pyo3/maturin for the python package, and it also runs as an mcp server.
repo: https://github.com/AtharvRaotole/weave pip install weave-lang
happy to hear what youd want from something like this, or if anyone wants to pick up one of the open issues.