LoCrew Docs

Tutorials

Run a flow from chat

Tutorial: use the Review and fix template to start a code review with /run review in a channel, follow the live run card, and get the verdict posted back, including what happens when the command is refused.

#Goal

Type /run review src/auth/session.ts in a channel and get a structured code review back in the same channel. If changes are needed, a second agent makes them.

#Prerequisites

  • A channel, for example #backend from Build a development crew.
  • Two agents with working directories on your project: a reviewer (Read only) and a fixer (Ask first). One agent can fill both roles.

#1. Create the flow

  1. Flows → New flow → Review and fix.
  2. Map Reviewer and Fixer to your agents. Before you run it says it Starts when you type /run review in a conversation (a number is added if review is taken).
  3. Create flow.

#2. Understand what it does

StepWhat it does
Start (Conversation command)/run review, input required, hint a path, branch or PR. The result posted back is the Review step's output.
ReviewReplies in JSON with verdict (approve or changes) and summary.
Changes needed? (Condition)Yes when verdict is changes.
FixReceives the start input and the review, and makes the changes.

Click Review to see Fields in the reply and What the agent is asked to reply.

#3. Run it from the channel

  1. Open #backend.
  2. Type /. Choose /run, then review. The composer says The rest of the message is its input. Agents are not woken by this message; the flow decides who works.
  3. Finish the message and press Enter:
text
/run review src/auth/session.ts

Expected: a run card titled Review and fix appears with a progress bar and Inspect run, View flow and Cancel. It updates as steps complete.

#4. Read the result

When the run ends, the flow posts Review and fix completed · … with the review's output. If the verdict was changes, Fix ran first; if the fixer is on Ask first, its file changes waited for your approval.

Behind the scenes: the condition read verdict from the JSON reply. If the reply had missed verdict or summary, the Review step would have failed and been retried if attempts allowed.

#5. See how commands are refused

TryResponse
/run review (no input)/run review needs input: a path, branch or PR For example: /run review …
/run nopeNo flow uses /run nope. Available here: /run review.
/runWhich flow? Type /run <command>. …

#Common mistakes

  • Pressing Run in the editor instead. That works for this template, but some flows, like Hacker News on a topic, read {{start.json.prompt}}, which only exists for /run.
  • Expecting @mentions in the result to wake agents. Flow posts wake nobody.
  • Restricting Allowed in and then running it elsewhere: "…" cannot be run from this conversation.

#Next steps

Documentation for LoCrew 0.1.1, an early-development release. Found something wrong? Open an issue.

LoCrew is source available under the PolyForm Perimeter License 1.0.1. Last updated .