Render Tutorials
Localhost Part 2: Run AI agents as Render Workflows

Run workflows locally (Optional)

⏱ 5 min

The hosted deploy proves Pattern 3 works in production. Before you author anything, set up the local loop, because a fast edit-run cycle beats a deploy between every change. Render Workflows run under a local dev runtime that gives each task the same isolation, retries, and fan-out you saw in the Dashboard.

1. Install the Render CLI

You need the CLI to run tasks under the local dev runtime. Version 2.11.0 or newer has the workflow subcommands.

Terminal
brew install render
brew upgrade render
Terminal
curl -fsSL https://raw.githubusercontent.com/render-oss/cli/main/bin/install.sh | sh

Download the executable from the CLI releases page and put it on your PATH.

Terminal
$render --version
render version 2.11.0 (or newer)

After installing, confirm you’re on the latest CLI: render --version. If it’s below 2.20, run brew upgrade render. If which render points at ~/.local/bin/render, put Homebrew earlier in your PATH or remove the old install.

2. Start the local workflow runtime

From your fork:

Terminal A
npm ci
cd packages/workflow-agents
cp .env.example .env
npm run dev:workflows
Terminal A
uv sync
cp .env.example .env
cd packages/workflow_agents
render workflows dev -- uv run python -m workflow_agents.workflow

The terminal may look like it hangs after the last command — that’s expected. The workflow server is running and listening for tasks. You’ll see output once you trigger a task in the next step.

This starts the local Render task runtime. Each task runs in isolation, with real retries and fan-out, against your machine. No database or API key is required: telemetry falls back to in-memory and the agent falls back to the mock model. Set OPENAI_API_KEY in .env for real findings.

3. List and run a task

Open a second terminal (keep Terminal A running) and list the registered tasks. The loader auto-discovers the workflow modules for your track, so you’ll see the workflows and the per-agent tasks with no registration step:

Terminal B
render workflows tasks list --local

You should see the task names printed. Now run the built-in code-review task against the LlamaIndex baseline PR. The trace shows the review tasks fan out and rejoin before judge returns the verdict:

Terminal B
render workflows tasks start code-review --local \
--input='[{"url":"https://github.com/run-llama/LlamaIndexTS/pull/2234","labels":[]}]'
Terminal B
render workflows tasks start code_review --local \
--input='[{"url":"https://github.com/run-llama/LlamaIndexTS/pull/2234","labels":[]}]'

Watch the render workflows dev output. You get the same tree you read in the hosted Dashboard trace, now on your laptop:

flowchart TB
  cr["code-review<br/>task"]
  cr --> sec["security<br/>task"]
  cr --> perf["performance<br/>task"]
  cr --> ux["ux<br/>task (frontend diff)"]
  sec --> judge["judge<br/>task"]
  perf --> judge
  ux --> judge

Each task runs in its own isolated process, with its retries and timeouts applied, exactly like production. That’s what makes this a real loop and not a toy: what you see locally is what ships.

This page uses the CLI path because it keeps the task fan-out visible in the terminal. The gateway dashboard you deployed in the previous step is the same UI; running it locally is optional and takes its own terminal (npm run dev for TypeScript, uv run python -m workflow_agents.server for Python), since the dev command above runs only the task runtime.

What does the local workflow runtime give you that a plain script of the same logic would not?
Troubleshooting

Find the symptom that matches what you’re seeing, then apply the fix.

render workflows is an unknown command. Your CLI is older than 2.11. Run brew upgrade render (not just install), or reinstall from the releases page, then confirm render --version.

connection refused on localhost:8120. Terminal A is not running. Start npm run dev:workflows (TypeScript) or render workflows dev -- ... (Python) in the workflow-agents package, leave it open, then retry --local commands in Terminal B.


bind: address already in use on port 8120. A previous render workflows dev is still holding the local runtime port. Kill it with lsof -ti:8120 | xargs kill (macOS/Linux) or start on another port with render workflows dev --port 8121 -- ... and pass --port 8121 to the tasks start / tasks list commands too.


--input='[...]' fails to parse on Windows. cmd.exe and PowerShell handle single quotes differently. Put the JSON in a file and use --input-file: create input.json containing [{"url":"https://github.com/run-llama/LlamaIndexTS/pull/2234","labels":[]}], then render workflows tasks start <task> --local --input-file=input.json.


tasks list --local shows nothing, or tasks start says task not found. Two causes. First, the slug differs by track: TypeScript uses code-review (hyphen), Python uses code_review (underscore). Run tasks list --local and copy the exact name printed. Second, the runtime may not have started cleanly (see the Python note below).


The review is bland and always approves. That’s the mock model, the expected fallback with no key. The point of this page is the trace and fan-out, not the review text. For real findings, set OPENAI_API_KEY (or ANTHROPIC_API_KEY) in .env and restart Terminal A: the runtime reads env once at launch and doesn’t reload .env.


npm ci / uv sync errors. Run the install from the repo root (where package.json / pyproject.toml and packages/ live), then cd into the package. Installing inside a subdirectory installs the wrong workspace.


A browser login opens mid-exercise. The first non---local CLI call resolves your workspace. Run render login and render workspace set before Step 2 so you don’t get a surprise tab during the timed exercise.


The dev runtime starts but the child dies with ModuleNotFoundError: No module named 'workflow_agents'. You dropped the uv run from the dev command. Keep it: render workflows dev -- uv run python -m workflow_agents.workflow. Bare python uses the system interpreter, which can’t see the uv workspace packages. Also run cp .env.example .env from the repo root (the Python repo’s .env.example is at the root, not in the package).

A task you add later doesn’t show up in tasks list --local. The runtime discovers tasks once at startup, so restart Terminal A (Ctrl-C, then npm run dev:workflows) after adding a task folder. dev:workflows wraps the canonical workflow entrypoint (src/workflow.ts), which registers every discovered task before the runtime starts serving, so a restart is all it takes.

What you learned

  • Installed the Render CLI 2.11+ for the local workflow runtime
  • Started the local workflow runtime (no database or key required)
  • Listed the auto-discovered tasks and ran the built-in code-review task locally
  • Saw the same per-task fan-out trace locally that you read in the hosted Dashboard