Building your own CLI coding agent with Pydantic-AI
martinfowler.com
Building your own CLI coding agent with Pydantic-AI
1–10 of 43 posts
Re: Building your own CLI coding agent with Pydantic-AI
#2Re: Building your own CLI coding agent with Pydantic-AI
#3https://github.com/caesarnine/rune-code
Part of the reason I switched to it initially wasn't so much it's niceties versus just being disgusted at how poor the documentation/experience of using LiteLLM was and I thought the folks who make Pydantic would do a better job of the "universal" interface.
Re: Building your own CLI coding agent with Pydantic-AI
#4Towards coding agents, I wonder if there are any good / efficient ways to measure how much different implementations work on coding? SWE-bench seems good, but expensive to run. Effectively I’m curious for things like: given tool definition X vs Y (eg. diff vs full file edit), prompt for tool X vs Y (how it’s described, does it use examples), model choice (eg. MCP with Claude, but python-exec inline with GPT-5), sub-agents, todo lists, etc. how much across each ablation, does it matter? And measure not just success, but cost to success too (efficiency).
Overall, it seems like in the phase space of options, everything “kinda works” but I’m very curious if there are any major lifts, big gotchas, etc.
I ask, because it feels like the Claude code cli always does a little bit better, subjectively for me, but I haven’t seen a LLMarena or clear A vs B, comparison or measure.
Re: Building your own CLI coding agent with Pydantic-AI
#5Pydantic-AI is lovely - I've been working on a forever, fun project to build a coding agent CLI for a year plus now. IMO it does make constructing any given agent very easy, though the lower level APIs are a little painful to use but they seem to be aware of that. https://github.com/caesarnine/rune-code Part of the reason I switched to it initially wasn't so much it's niceties versus just being disgusted at how poor…
Re: Building your own CLI coding agent with Pydantic-AI
#6I've been using it a lot lately and anything beyond basic usage is an absolute chore.
Re: Building your own CLI coding agent with Pydantic-AI
#7I really wish Pydantic invested in... Pydantic, instead of some AI API wrapper garbage. I've been using it a lot lately and anything beyond basic usage is an absolute chore.
Re: Building your own CLI coding agent with Pydantic-AI
#8Nevertheless i would strongly recommend to not use directly the libraries of the ai providers as you get quickly locked in a extremely fast paced market where today's king can change weekly.
Re: Building your own CLI coding agent with Pydantic-AI
#91 - https://pydantic.dev/articles/building-data-team-with-pydant...
Re: Building your own CLI coding agent with Pydantic-AI
#10These abstractions are nice to not get locked in with one llm provider - but like with langchain - once you use some more niche feature the bugs do shine through. I tried it out with structured output for azure openai but had to give up since somewhere somewhat was broken and it's difficult to figure out if it's the abstraction or the library of the llm provider which the abstraction uses. Nevertheless i would strong…