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

samleeney1 pts0 comments

GitHub - samleeney/flows: Inspired by https://github.com/snarktank/ralph · GitHub

/" data-turbo-transient="true" />

Skip to content

Search or jump to...

Search code, repositories, users, issues, pull requests...

-->

Search

Clear

Search syntax tips

Provide feedback

--><br>We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Cancel

Submit feedback

Saved searches

Use saved searches to filter your results more quickly

-->

Name

Query

To see all available qualifiers, see our documentation.

Cancel

Create saved search

Sign in

/;ref_cta:Sign up;ref_loc:header logged out"}"<br>Sign up

Appearance settings

Resetting focus

You signed in with another tab or window. Reload to refresh your session.<br>You signed out in another tab or window. Reload to refresh your session.<br>You switched accounts on another tab or window. Reload to refresh your session.

Dismiss alert

{{ message }}

samleeney

flows

Public

Notifications<br>You must be signed in to change notification settings

Fork

Star

main

BranchesTags

Go to file

CodeOpen more actions menu

Folders and files<br>NameNameLast commit message<br>Last commit date<br>Latest commit

History<br>34 Commits<br>34 Commits

.codex/skills/flows

.codex/skills/flows

cmd/flow

cmd/flow

docs/assets

docs/assets

e2e

e2e

examples

examples

pkg

pkg

ui

ui

.gitignore

.gitignore

Makefile

Makefile

README.md

README.md

go.mod

go.mod

go.sum

go.sum

View all files

Repository files navigation

Flows

Markdown-native agent workflows: write prompts, code blocks, inputs, outputs,<br>goals, and loops in one .md file, then run or visualize the flow.

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

What It Does

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 or too_slow.

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

Quick Start

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

Run the short JAX optimization demo:

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

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

Flow Shape

Each ## heading is one block. The first fenced yaml block configures inputs,<br>start conditions, executor, model, and routing. Prompt text or an executable<br>code fence supplies the block body.

## speed_optimizer

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

Rewrite the input code to reduce runtime. Return only the improved code.

CLI

./flow run -f --input name=value --input file=@path/to/file<br>./flow chart<br>./flow viz ">./flow validate flow.md><br>./flow run flow.md> -f --input name=value --input file=@path/to/file<br>./flow chart flow.md><br>./flow viz flow.md>

About

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

Resources

Readme

Uh oh!

There was an error while loading. Please reload this page.

Activity

Stars

stars

Watchers

watching

Forks

forks

Report repository

Releases

No releases published

Packages

Uh oh!

There was an error while loading. Please reload this page.

Contributors

Uh oh!

There was an error while loading. Please reload this page.

Languages

Go<br>58.2%

TypeScript<br>41.3%

Other<br>0.5%

You can’t perform that action at this time.

flow code input flows reload file

Related Articles