News for hackers. Stuff that matters.
Re:You Should Write An Agent by riskable on Thursday November 06, 2025 @04:51PM (#45840907)
It's interesting how much this makes you want to write Unix-style tools that do one thing and only one thing really well. Not just because it makes coding an agent simpler, but because it's much more secure!
Re:You Should Write An Agent by tptacek on Thursday November 06, 2025 @05:11PM (#45841115)
One thing that radicalized me was building an agent that tested network connectivity for our fleet. Early on, in like 2021, I deployed a little mini-fleet of off-network DNS probes on, like, Vultr to check on our DNS routing, and actually devising metrics for them and making the data that stuff generated legible/operationalizable was annoying and error prone. But you can give basic Unix network tools --- ping, dig, traceroute --- to an agent and ask it for a clean, usable signal, and they'll do a reasonable job! They know all the flags and are generally better at interpreting tool output than I am.

I'm not saying that the agent would do a better job than a good "hardcoded" human telemetry system, and we don't use agents for this stuff right now. But I do know that getting an agent across the 90% threshold of utility for a problem like this is much, much easier than building the good telemetry system is.

Re:You Should Write An Agent by foobarian on Thursday November 06, 2025 @05:38PM (#45841365)
Honestly the top AI use case for me right now is personal throwaway dev tools. Where I used to write shell oneliners with dozen pipes including greps and seds and jq and other stuff, now I get an AI to write me a node script and throw in a nice Web UI to boot.

Edit: reflecting on what the lesson is here, in either case I suppose we're avoiding the pain of dealing with Unix CLI tools :-D

Re:You Should Write An Agent by jacquesm on Thursday November 06, 2025 @05:45PM (#45841418)
Interesting. You have to wonder if all the tools that is based on would have been written in the first place if that kind of thing had been possible all along. Who needs 'grep' when you can write a prompt?
Re:You Should Write An Agent by agumonkey on Thursday November 06, 2025 @07:33PM (#45842327)
It's highly plausible that all we assumed was good design / engineering will disappear if LLMs/Agents can produce more without having the be modular. (sadly)
Re:You Should Write An Agent by jacquesm on Thursday November 06, 2025 @08:23PM (#45842617)
There is some kind of parallel behind 'AI' and 'Fuzzy Logic'. Fuzzy logic to me always appeared like a large number of patches to get enough coverage for a system to work even if you didn't understand it. AI just increases the number of patches to billions.
Re:You Should Write An Agent by agumonkey on Thursday November 06, 2025 @10:29PM (#45843286)
true, there's often a point where your system becomes a blurry miracle
Re:You Should Write An Agent by tptacek on Thursday November 06, 2025 @05:46PM (#45841431)
My long running joke is that the actual good `jq` is just the LLM interface that generates `jq` queries; 'simonw actually went and built that.
Re:You Should Write An Agent by dannyobrien on Thursday November 06, 2025 @06:23PM (#45841773)
https://github.com/simonw/llm-jq for those following along at home

https://github.com/simonw/llm-cmd is what i use as the "actually good ffmpeg etc front end"

and just to toot my own horn, I hand Simon's `llm` command lone tool access to its own todo list and read/write access to the cwd with my own tools, https://github.com/dannyob/llm-tools-todo and https://github.com/dannyob/llm-tools-patch

Even with just these and no shell access it can get a lot done, because these tools encode the fundamental tricks of Claude Code ( I have `llmw` aliased to `llm --tool Patch --tool Todo --cl 0` so it will have access to these tools and can act in a loop, as Simon defines an agent. )

Re:You Should Write An Agent by a-french-anon on Friday November 07, 2025 @04:36AM (#45844870)
Tried gron (https://github.com/tomnomnom/gron) a bit? If you know your UNIX, I think it can replace jq in a lot of cases. And when it can't, well, you can reach for Python, I guess.
Re:You Should Write An Agent by andai on Thursday November 06, 2025 @10:43PM (#45843369)
Could you give some examples? I'm having the AI write the shell scripts, wondering if I'm missing out on some comfy UIs...
Re:You Should Write An Agent by foobarian on Thursday November 06, 2025 @10:49PM (#45843390)
I was debugging a service that was spitting out a particular log line. I gave Copilot an example line, told it to write a script that tails the log line and serves a UI via port 8080 with a table of those log lines parsed and printed nicely. Then I iterated by adding filter buttons, aggregation stats, simple things like that. I asked it to add a "clear" button to reset the UI. I probably would not even have done this without an AI because the CLI equivalent would be parsing out and aggregating via some form of uniq -c | sort -n with a bunch of other tuning and it would be too much trouble.
Re:You Should Write An Agent by sumedh on Friday November 07, 2025 @12:50AM (#45843849)
It can be anything. It depends on what you want to do with the output.

You can have a simple dashboard site which collects the data from our shell scripts and shows your a summary or red/green signals so that you can focus on things which are interested in.

Re:You Should Write An Agent by zahlman on Thursday November 06, 2025 @05:50PM (#45841457)
> They know all the flags and are generally better at interpreting tool output than I am.

In the toy example, you explicitly restrict the agent to supply just a `host`, and hard-code the rest of the command. Is the idea that you'd instead give a `description` something like "invoke the UNIX `ping` command", and a parameter described as constituting all the arguments to `ping`?

Re:You Should Write An Agent by tptacek on Thursday November 06, 2025 @05:53PM (#45841491)
Honestly, I didn't think very hard about how to make `ping` do something interesting here, and in serious code I'd give it all the `ping` options (and also run it in a Fly Machine or Sprite where I don't have to bother checking to make sure none of those options gives code exec). It's possible the post would have been better had I done that; it might have come up with an even better test.

I was telling a friend online that they should bang out an agent today, and the example I gave her was `ps`; like, I think if you gave a local agent every `ps` flag, it could tell you super interesting things about usage on your machine pretty quickly.

Re:You Should Write An Agent by mwcampbell on Thursday November 06, 2025 @07:23PM (#45842265)
What is Sprite in this context?
Re:You Should Write An Agent by cess11 on Friday November 07, 2025 @03:52AM (#45844672)
I'm guessing the Fly Machine they're referring to is a container running on fly.io, perhaps the sprite is what the Spritely Institute calls a goblin.
Re:You Should Write An Agent by zahlman on Thursday November 06, 2025 @06:10PM (#45841669)
Also to be clear: are the schemas for the JSON data sent and parsed here specific to the model used? Or is there a standard? (Is that the P in MCP?)
Re:You Should Write An Agent by spenczar5 on Thursday November 06, 2025 @09:17PM (#45842892)
Its JSON schema, well standardized, and predates LLMs: https://json-schema.org/
Re:You Should Write An Agent by zahlman on Friday November 07, 2025 @12:05AM (#45843681)
Ah, so I can specify how I want it to describe the tool request? And it's been trained to just accommodate that?
Re:You Should Write An Agent by simonw on Friday November 07, 2025 @12:38AM (#45843811)
Most LLMs have tool patterns trained into them now, which are then managed for you by the API that the developers run on top of the models.

But... you don't have to use that at all. You can use pure prompting with ANY good LLM to get your own custom version of tool calling:

  Any time you want to run a calculation, reply with:
  {{CALCULATOR: 3 + 5 + 6}}
  Then STOP. I will reply with the result.
Before LLMs had tool calling we called this the ReAct pattern - I wrote up an example of implementing that in March 2023 here: https://til.simonwillison.net/llms/python-react-pattern
Re:You Should Write An Agent by indigodaddy on Friday November 07, 2025 @10:56AM (#45847685)
Or have the agent strace a process and describe what's going on as if you're a 5 year old (because I actually need that to understand strace output)
Re:You Should Write An Agent by tptacek on Friday November 07, 2025 @10:57AM (#45847706)
Iterated strace runs are also interesting because they generate large amounts of data, which means you actually have to do context programming.
Re:You Should Write An Agent by chickensong on Thursday November 06, 2025 @08:58PM (#45842789)
I hadn't given much thought to building agents, but the article and this comment are inspiring, thx. It's interesting to consider agents as a new kind of interface/function/broker within a system.
Re:You Should Write An Agent by 0xbadcafebee on Thursday November 06, 2025 @09:55PM (#45843115)
> I'm not saying that the agent would do a better job than a good "hardcoded" human telemetry system, and we don't use agents for this stuff right now.

And that's why I won't touch 'em. All the agents will be abandoned when people realize their inherent flaws (security, reliability, truthfulness, etc) are not worth the constant low-grade uncertainty.

In a way it fits our times. Our leaders don't find truth to be a very useful notion. So we build systems that hallucinate and act unpredictably, and then invest all our money and infrastructure in them. Humans are weird.

Re:You Should Write An Agent by simonw on Thursday November 06, 2025 @11:58PM (#45843670)
Some of us have been happily using agentic coding tools (Claude Code etc) since February and we're still not abandoning them for their inherent flaws.
Re:You Should Write An Agent by crystal_revenge on Friday November 07, 2025 @12:34AM (#45843797)
The problem with statements like these is that I work with people who make the same claims, but are slowly building useless, buggy monstrosities that for various reasons nobody can/will call out.

Obviously I’m reasonably willing to believe that you are an exception. However every person I’ve interacted with who makes this same claim has presented me with a dumpster fire and expected me to marvel at it.

Re:You Should Write An Agent by simonw on Friday November 07, 2025 @12:40AM (#45843815)
I'm not going to dispute your own experience with people who aren't using this stuff effectively, but the great thing about the internet is that you can use it to track the people who are making the very best use of any piece of technology.
Re:You Should Write An Agent by crystal_revenge on Friday November 07, 2025 @01:04AM (#45843911)
This line of reasoning is smelling pretty "no true Scotsman" to me. I'm sure there were amazing ColdFusion devs, but that hardly justifies the use of the technology. Likewise "This tool works great on the condition that you need to hire a Simon Willison level dev" is almost a fault. I'm pretty confident you could squeeze some juice out of a Markov Chain (ignoring, of course, that decoder-only LLMs are basically fancy MCs).

In a weird way it sort of reminds me of Common Lisp. When I was younger I thought it was the most beautiful language and a shame that it wasn't more widely adopted. After a few decades in the field I've realized it's probably for the best since the average dev would only use it to create elaborate foot guns.

Re:You Should Write An Agent by gartdavis on Friday November 07, 2025 @03:51AM (#45844662)
"elaborate foot guns" -- HN is a high signal environment, but I could read for a week and not find a gem like this. Props.

Destiny visits me on my 18th birthday and says, "Gart, your mediocrity will result in a long series of elaborate foot guns. Be humble. You are warned."

Re:You Should Write An Agent by notpachet on Friday November 07, 2025 @08:52AM (#45846353)
> I've realized it's probably for the best since the average dev would only use it to create elaborate foot guns

see also: react hooks

Re:You Should Write An Agent by hombre_fatal on Friday November 07, 2025 @09:15AM (#45846616)
Meh, smart high-agency people can write good software, and they can go on to leverage powerful tools in productive ways.

All I see in your post is equivalent to something like: you're surrounded by boot camp coders who write the worst garbage you've ever seen, so now you have doubts for anyone who claims they've written some good shit. Psh, yeah right, you mean a mudball like everyone else?

In that scenario there isn't much a skilled software engineer with different experiences can interject because you've already made your decision, and your decision is based on experiences more visceral than anything they can add.

I do sympathize that you've grown impatient with the tools and the output of those around you instead of cracking that nut.

Re:You Should Write An Agent by cyberpunk on Friday November 07, 2025 @12:44AM (#45843827)
We have gpt-5 and gemini 2.5 pro at work, and both of them produce huge amounts of basically shit code that doesn’t work.

Every time i reach for them recently I end up spending more time refactoring the bad code out or in deep hostage negotiations with the chatbot of the day that I would have been faster writing it myself.

That and for some reason they occasionally make me really angry.

Oh a bunch of prompts in and then it hallucinated some library a dependency isn’t even using and spews a 200 line diff at me, again, great.

Although at least i can swear at them and get them to write me little apology poems..

Re:You Should Write An Agent by Etheryte on Friday November 07, 2025 @01:50AM (#45844113)
On the sometimes getting angry part, I feel you. I don't even understand why it happens, but it's always a weird moment when I notice it. I know I'm talking to a machine and it can't learn from its mistakes, but it's still very frustrating to get back yet another here's the actual no bullshit fix, for real this time, pinky promise.
Re:You Should Write An Agent by simonw on Friday November 07, 2025 @12:56AM (#45843867)
Are you using them via a coding agent harness such as Codex CLI or Gemini CLI?
Re:You Should Write An Agent by cyberpunk on Friday November 07, 2025 @01:27AM (#45844000)
Via the jetbrains plugin, has an 'agent' mode and can edit files and call tools so on, yes I setup MCP integrations and so on also. Still kinda sucks. shrug.

I keep flipping between this is the end of our careers, to I'm totally safe. So far this is the longest 'totally safe' period I've had since GPT-2 or so came along..

Re:You Should Write An Agent by edanm on Friday November 07, 2025 @01:25PM (#45849319)
But isn't this true of all technologies? I know plenty of people who are amazing Python developers. I've also seen people make a huge mess, turning a three-week project into a half-year mess because of their incredible lack of understanding of the tools they were using (Django, fittingly enough for this conversation).

That there's a learning curve, especially with a new technology, and that only the people at the forefront of using that technology are getting results with it - that's just a very common pattern. As the technology improves and material about it improves - it becomes more useful to everyone.

Re:You Should Write An Agent by techpression on Friday November 07, 2025 @01:41AM (#45844080)
I abandoned Claude Code pretty quickly, I find generic tools give generic answers, but since I do Elixir I’m ”blessed” with Tidewave which gives a much better experience. I hope more people get to experience framework built tooling instead of just generic stuff.

It still wants to build an airplane to go out with the trash sometimes and will happily tell you wrong is right. However I much prefer it trying to figure it out by reading logs, schemas and do browser analysis automatically than me feeding logs etc manually.

Re:You Should Write An Agent by DeathArrow on Friday November 07, 2025 @02:50AM (#45844369)
Cursor can read logs and schemas and use curl to test API responses. It can also look into the database.
Re:You Should Write An Agent by techpression on Friday November 07, 2025 @03:48AM (#45844652)
But then you have to use Cursor. Tidewave runs as a dependency in the framework and you just navigate to a url, it’s quite refreshing actually.
Re:You Should Write An Agent by chemotaxis on Thursday November 06, 2025 @04:57PM (#45840969)
You could even imagine a world in which we create an entire suite of deterministic, limited-purpose tools and then expose it directly to humans!
Re:You Should Write An Agent by SatvikBeri on Thursday November 06, 2025 @06:28PM (#45841810)
Half my use of LLM tools is just to remember the options for command line tools, including ones I wrote but only use every few months.
Re:You Should Write An Agent by layer8 on Thursday November 06, 2025 @05:13PM (#45841139)
I wonder if we could develop a language with well-defined semantics to interact with and wire up those tools.
Re:You Should Write An Agent by chubot on Thursday November 06, 2025 @05:34PM (#45841342)
> language with well-defined semantics

That would certainly be nice! That's why we have been overhauling shell with https://oils.pub , because shell can't be described as that right now

It's in extremely poor shape

e.g. some things found from building several thousand packages with OSH recently (decades of accumulated shell scripts)

- bugs caused by the differing behavior of 'echo hi | read x; echo x=$x' in shells, i.e. shopt -s lastpipe in bash.

- 'set -' is an archaic shortcut for 'set +v +x'

- Almquist shell is technically a separate dialact of shell -- namely it supports 'chdir /tmp' as well as cd /tmp. So bash and other shells can't run any Alpine builds.

I used to maintain this page, but there are so many problems with shell that I haven't kept up ...

https://github.com/oils-for-unix/oils/wiki/Shell-WTFs

OSH is the most bash-compatible shell, and it's also now Almquist shell compatible: https://pages.oils.pub/spec-compat/2025-11-02/renamed-tmp/sp...

It's more POSIX-compatible than the default /bin/sh on Debian, which is dash

The bigger issue is not just bugs, but lack of understanding among people who write foundational shell programs. e.g. the lastpipe issue, using () as grouping instead of {}, etc.

---

It is often treated like an "unknowable" language

Any reasonable person would use LLMs to write shell/bash, and I think that is a problem. You should be able to know the language, and read shell programs that others have written

Re:You Should Write An Agent by jacquesm on Thursday November 06, 2025 @05:43PM (#45841404)
I love it how you went from 'Shell-WTFs' to 'let's fix this'. Kudos, most people get stuck at the first stage.
Re:You Should Write An Agent by chubot on Thursday November 06, 2025 @10:48PM (#45843387)
Thanks! We are down to 14 disagreements between OSH and busybox ash/bash on Alpine Linux main

https://op.oils.pub/aports-build/published.html

We also don't appear to be unreasonably far away from running ~~ "all shell scripts"

Now the problem after that will be motivating authors of foundational shell programs to maintain compatibility ... if that's even possible. (Often the authors are gone, and the nominal maintainers don't know shell.)

As I said, the state of affairs is pretty sorry and sad. Some of it I attribute to this phenomenon: https://news.ycombinator.com/item?id=17083976

Either way, YSH benefits from all this work

Re:You Should Write An Agent by zahlman on Thursday November 06, 2025 @05:35PM (#45841347)
As it happens, I have a prototype for this, but the syntax is honestly rather unwieldy. Maybe there's a way to make it more like natural human language....
Re:You Should Write An Agent by imiric on Thursday November 06, 2025 @05:46PM (#45841422)
I can't tell whether any comment in this thread is a parody or not.
Re:You Should Write An Agent by zahlman on Thursday November 06, 2025 @06:07PM (#45841642)
(Mine was intended as ironic, suggesting that a circle of development ideas would eventually complete. I interpreted the previous comments as satirically pointing at the fact that the notion of "UNIX-like tools" owes to the fact that there is actually such a thing as UNIX.)
Re:You Should Write An Agent by AdieuToLogic on Thursday November 06, 2025 @09:15PM (#45842877)
When in doubt, there's always the option of rewriting an existing interactive shell in Rust.
Re:You Should Write An Agent by utopiah on Friday November 07, 2025 @03:24AM (#45844537)
Hmmm but how would you name that? Agent skills? Meta cognition agentic tooling? Intelligence driven self improving partial building blocks?

Oh... oh I know how about... UNIX Philosophy? No... no that'd never work.

/s

Re:You Should Write An Agent by danpalmer on Thursday November 06, 2025 @05:56PM (#45841533)
Doing one thing well means you need a lot more tools to achieve outcomes, and more tools means more context and potentially more understanding of how to string them together.

I suspect the sweet spot for LLMs is somewhere in the middle, not quite as small as some traditional unix tools.

Re:You Should Write An Agent by tinodb on Saturday November 08, 2025 @02:54AM (#45854952)
Indeed. I have a tiny wrapper around the llm cli that gives it 3 tools: read these docs for program X, read its config and search-replace in said config. I use it for adopting Ghostty for example. I can now ask it: “how do I switch between window panes?” Then: “change that shortcut to …”