# Pi Workflows Control Flow

> Control flow inside Pi — not a CI orchestrator. TypeScript graphs with y/n branches, implement/verify loops, and a live graph widget mid-conversation. Extension + example workflows already installed.

- Agent: Pi
- Plan: Starter (1 vCPU, 2 GiB RAM, 10 GiB disk)
- Forks: 0 · Stars: 0
- Creator: https://www.jurniti.com/creator-ca0ff2
- Tags: control-flow, graphs, multi-step, pi, pi-workflows, workflows
- Requires config (you provide): ANTHROPIC_API_KEY, GEMINI_API_KEY, OPENAI_API_KEY

**To fork:** open https://www.jurniti.com/templates/pi-workflows-control-flow and use the Fork action — it starts a Stripe Checkout for a new VM seeded with this template's persist disk (same flat plan price, no fork fee).

## README

# Stop leaving Pi for a workflow engine

You already have the long conversation.

What you want next is control flow: propose → holy grail → y/n → implement — **without** opening n8n, a CI runner, or another harness.

This fork hands you that. Pi boots with [osolmaz/pi-workflows](https://github.com/osolmaz/pi-workflows) installed and the example graphs seeded. Type `/workflow` and the boxed widget is already there.

## The undeniable demo

```bash
export ANTHROPIC_API_KEY=sk-ant-...   # or OPENAI_API_KEY / GEMINI_API_KEY
pi
/workflow
/workflow echo summarize this repository
```

Or discuss a real problem first, then:

```
/workflow elegant-solution
```

Watch the graph advance above the editor: propose → holy grail → decision → implement **or** human checkpoint. Same conversation. No external orchestrator.

## What lands in your fork

- **pi-workflows extension** — `pi install git:github.com/osolmaz/pi-workflows` already run (package under `~/.pi/agent/git/…`, registered in `settings.json`)
- **Seeded graphs** ready as `/workflow …`:
  - `echo` — smallest end-to-end graph
  - `elegant-solution` — Socratic propose → holy grail → y/n → implement
  - `autoimplement` — implement → verify → review loop
  - `branch`, `two-turn`, `shell`, `autoresearch`
- **Runtime deps in persist** (`jiti`, `typebox`) so imports resolve on a fresh fork
- **Native in-pi widget** — the graph lives in the terminal, not a separate web viewer

## BYOK — your keys, your VM

Model keys stay in **your** environment. They are never part of the template.

```bash
export ANTHROPIC_API_KEY=sk-ant-...
# export OPENAI_API_KEY=sk-...
# export GEMINI_API_KEY=...
pi
```

Then `/workflow list` (or `/workflow` alone) to see every seeded graph.

## Who this is for

- You run **Pi** and keep hitting multi-step sequences that need conditionals
- You tried bolting an orchestrator *outside* the harness and lost conversation context
- You want a forkable box, not a weekend of package wiring

## Who this is not for

- You need Claude Code / Codex / OpenClaw specifically (this harness is **Pi only**)
- You want someone else to hold your model keys (jurniti is BYOK — you export them)

## Provenance

Built from [osolmaz/pi-workflows](https://github.com/osolmaz/pi-workflows) by [Onur Solmaz](https://x.com/onusoz/status/2079263963670544694). Pi: [pi.dev](https://pi.dev).

Fork it. Own the box. Keep the conversation.

## Risk note

jurniti **30-day money-back** on first purchase. Model keys are yours (BYOK).
