Recipes

Elf0: YAML-defined multi-step AI agent workflows run from the CLI

Suggested by runchr · today

Software & DevOpsWork & Operations

Draft — a suggested stack, not yet verified by a member.

A CLI for iterating on small multi-step agents defined in YAML specs.

What they did

The author built Elf0, a command-line tool for defining and running AI agent workflows as YAML specs, motivated by tasks where a single prompt isn't enough — their example being extracting quote data from an insurance PDF. They drew on Anthropic's 'Building effective agents' article for agent patterns and Nvidia's AgentIQ YAML spec for the file format. The rationale: putting the workflow in YAML makes prompts, parameters and logic easy to version, and lets you feed the whole spec back to an LLM to improve it. The tool runs single- or multi-step agents from a spec, supports @file and @dir references inside prompts so files or directories can be pulled into context, ships a built-in command to improve a workflow, works against OpenAI or Anthropic APIs or locally via Ollama, includes an optional MCP server example (a YouTube transcript analyser), and offers an interactive mode for step-by-step runs. The author framed it as a way to iterate on small agents without scaffolding a whole codebase, and asked HN for improvement ideas.

How it went

Shipped as a working open-source CLI with a published Show HN post. The author reports it has been 'a lot of fun and really useful' in their own work, and the feature set is fairly complete for the stated scope: multi-step runs, file/dir prompt refs, a self-improvement command, three model backends including local Ollama, an MCP example, and interactive mode. No benchmark numbers, user counts, or third-party validation were shared.

Worth knowing

The post is a launch announcement, so there is no independent evaluation of output quality or reliability. Setup details are thin: no install instructions, no example YAML shown, and no guidance on how the improve command feeds specs back to a model or what it costs. The MCP server is only an optional example (YouTube transcripts), not a general integration. API keys for OpenAI/Anthropic or a local Ollama install are implied prerequisites.

Wiring

Workflows live as YAML files on disk, versioned alongside prompts and parameters. The CLI reads a spec and executes its steps in order, resolving @file and @dir references in prompts against the local filesystem before calling the model. Model access is pluggable: OpenAI or Anthropic APIs via keys, or a local Ollama endpoint. An interactive mode pauses between steps for step-by-step runs, and a built-in improve command takes the spec and asks a model to propose a revised version. An optional MCP server example wires in a YouTube transcript analyser as a tool source. Typical loop: edit YAML, run the CLI, inspect step output, run improve, repeat.

Try it yourself

Clone or open the Elf0 repo and help me get productive with it. First, read the README and any example YAML specs, then summarize the spec schema: what keys define steps, how prompts are declared, and how @file and @dir references resolve. Next, write a new two-step workflow for my use case — extracting structured quote data from an insurance PDF — where step one pulls the relevant text via @file and step two returns JSON with fields for insurer, premium, excess and coverage dates. Show me the exact command to run it, how to run it in interactive mode, and how to point it at a local Ollama model instead of OpenAI or Anthropic. Finally, run the built-in improve command on my spec and show me the diff it proposes.

Source

Tools in this stack

Run this stack

Install the stack into this project. It writes AGENTS.md and the manifest, merges the MCP servers into .mcp.json, and — with --yes — runs the tool installs.

npx runchr install runchr/show-hn-elf0-build-and-run-ai-agent-workflows-in-yaml-cl
No CLI?curl -s https://api.runchr.com/api/recipes/runchr/show-hn-elf0-build-and-run-ai-agent-workflows-in-yaml-cl/manifest
System prompt
You are a hands-on guide for Elf0, a CLI that runs multi-step AI agent workflows defined in YAML specs. Help the user read and write specs, run them against OpenAI, Anthropic or a local Ollama model, and iterate using the built-in improve command, staying strictly within the tools available to you.

This system prompt was generated from this stack's copy and tools. A person has not reviewed it.

The manifest is also at api.runchr.com/api/recipes/runchr/show-hn-elf0-build-and-run-ai-agent-workflows-in-yaml-cl/manifest.