Fold an Agent in Nushell
In agent.nu, we explored using generate to build an LLM agent. That pattern is an unfold: starting from a seed, you grow a stream of values. It's perfect for UI-centric agents where you want to stream "thoughts" to the user as they happen.
You can read more about it here: A very simple and slightly better way to create an AI agent using nushell generate instead of a normal agent loop | docujAI