cd /news/ai-agents/flows-a-custom-markdown-runtime-for-… · home topics ai-agents article
[ARTICLE · art-44612] src=github.com ↗ pub= topic=ai-agents verified=true sentiment=· neutral

"flows": a custom Markdown runtime for visualizing long-running agent loops

A developer released 'flows', a custom Markdown runtime that allows users to write, run, and visualize long-running agent loops within a single .md file. The tool combines prompt blocks for fuzzy tasks and code blocks for deterministic work, with explicit inputs, outputs, and loop control driven by code output. It aims to simplify agent workflow development by making the process markdown-native and visually debuggable.

read1 min views1 publishedJun 30, 2026
"flows": a custom Markdown runtime for visualizing long-running agent loops
Image: source

Markdown-native agent workflows: write prompts, code blocks, inputs, outputs, goals, and loops in one .md

file, then run or visualize the flow.

Inspired by https://github.com/snarktank/ralph.

  • Prompt blocks handle fuzzy work such as rewriting, review, planning, and summarizing.
  • Code blocks handle deterministic work such as parsing, tests, validation, and benchmarks.
  • Inputs and outputs are explicit, so later blocks only receive what the flow declares.
  • Loops are ordinary start rules, driven by code output such as fast_enough

ortoo_slow

. - Goal cards attach human-readable objectives and validation criteria to a single agent block.

make build-go
./flow validate examples/jax_short_goal_loop.md
./flow chart examples/jax_short_goal_loop.md

Run the short JAX optimization demo:

python3 -m venv .venv
.venv/bin/python -m pip install "jax[cpu]"

FLOW_PYTHON_COMMAND=.venv/bin/python ./flow run examples/jax_short_goal_loop.md -f \
  --input code=@examples/inputs/slow_jax.py \
  --input target_ms=5

Each ##

heading is one block. The first fenced yaml

block configures inputs, start conditions, executor, model, and routing. Prompt text or an executable code fence supplies the block body.

## speed_optimizer

``` yaml
inputs:
  code:
    from: external
start:
  - always: {max_runs: 1}
  - when: benchmark
    contains: too_slow
    max_runs: 3
prompt_executor: codex_cli
model: gpt-5.3-codex-spark

Rewrite the input code to reduce runtime. Return only the improved code. ./flow validate <flow.md> ./flow run <flow.md> -f --input name=value --input file=@path/to/file ./flow chart <flow.md> ./flow viz <flow.md>


── more in #ai-agents 4 stories · sorted by recency
── more on @flows 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/flows-a-custom-markd…] indexed:0 read:1min 2026-06-30 ·