Documentation

Build a workflow

Create a complete AI workflow in minutes: select providers, configure fallbacks, attach structured outputs, and define cache fields.

Create a new workflow

  1. Open Workflows in your project sidebar and click Create Workflow. The create page is one screen.
  2. Start from a template: Chat, Summarize, Structured, Test mock or Blank. A template fills in the name and the mode. Summarize also sets instructions for the AI; the page says so under the templates, and you can change them on the Response tab after you create the workflow.
  3. Enter a name. Your code sends it as model, so use letters, numbers and underscores (spaces become underscores). Choose a consistent convention such as team_purpose_environment (e.g. support_summarizer_prod). The name can't be changed later. Add a description if you like.
  4. Under Connect your backend, choose what the workflow does (see below). For Run fixed steps, name the first step here. Then pick Production or Testing mode; an agent always runs in Production, so choosing the Test mock template after Let the AI call my endpoints switches the workflow to Just answer. An agent starts with session memory on when the project logs request bodies (session memory needs them); you can turn it off on the editor's Advanced tab after you create the workflow.
  5. Select the provider and model. Only providers set up in the project are listed. To add a backup now, click Add a backup model; you can also add backups later on the Model tab.
  6. Click Create workflow, or Create and test to open it in the Playground. The editor then opens on the tab you need next: Tools for an agent, Backend pipeline for a pipeline, General otherwise. If something is missing, the page goes to the field to fix.

In Testing mode the page asks for a response format instead of a model, because a test-mode workflow returns that format's sample data. See Test mode.

Everything else starts with its default and is set after you create the workflow: the response format and instructions (Response tab), cost guardrails on each model (Model tab, see Spending limits), cache fields and other settings (Advanced tab), and the tools or pipeline steps themselves.

Use the connected nodes icon in the sidebar to open Workflows; the form repeats the provider (server glyph) and model (chip icon) selectors so you recognise them from other views.

Choose what the workflow does

When you create a workflow, and later on the General tab, Connect your backend sets what it does:

OptionTypeWhat runs
Just answerAnswerOne model call. Your app sends the request and gets the reply.
Let the AI call my endpointsAgentHosted tools: the AI picks which of your endpoints to call, and asks before changing anything. The Tools tab appears.
Run fixed stepsPipelineThe backend pipeline: your backend and other workflows run in the order you set, every time. The Backend pipeline tab appears.

Choosing a type is the one place that turns tools or the pipeline on or off. The other type's settings are kept, only switched off: saved tools stay on the workflow, and so do pipeline steps that have a name (a step without a name is removed when you save). When the type you leave has something set up, the editor switches at once and says under the cards that those settings are kept, switched off.

With Let the AI call my endpoints, the response format on the Response tab is off, because tools and a structured output can't be combined yet. A workflow saved with both tools and steps on, from before they had to be separate, shows a notice on General: pick one type to save it.

The editor's tabs are General, Model (the primary model, then its Backups), Response, Tools or Backend pipeline for the type that uses it, and Advanced.

Edit a workflow as JSON

When you edit a workflow, the Form | JSON switch in the editor's header shows the whole workflow as the JSON that is saved. Edit it in place: the editor checks it as you type and marks the line of each problem. Your changes reach the form when you switch back to Form or save; JSON with problems is never applied or saved. The name can't be changed, and editors can't add or rename tools or change a tool's endpoint (owners and admins can). The editor remembers which view you used last.

Configure fallback behaviour

ModelRiver automatically retries with the backups you configure when the primary provider fails or times out. Set them on the Model tab, under Backups.

  • Every attempt appears in meta.attempts, including reasons for failures when available.
  • Use backups to mix vendors (for example, primary OpenAI, fallback Anthropic) or to tier model sizes.
  • Provider timeouts are fixed and can't be changed. For most providers, ModelRiver waits up to 120 seconds for a response before moving to the next backup.

Workflow naming conventions

ConventionExampleBest for
team_purpose_envsupport_summarizer_prodMulti-team organisations
feature_variantonboarding_v2A/B testing workflows
product_tierenterprise_analysisTiered service levels

Test a workflow

  1. Open the Playground from the project sidebar (Projects → Playground).
  2. Pick a workflow from the dropdown.
  3. Provide a JSON payload containing the fields your workflow expects: commonly a messages array and optional metadata.
  4. Click Send Request. ModelRiver executes the workflow without persisting a log entry, and the response appears inline.
  5. Iterate on prompts, cache fields, or structured outputs based on the preview without impacting production analytics.

The play button icon in the sidebar marks the Playground entry point; inside you'll see the same connected nodes icon on the workflow selector so you know you're running an existing configuration.

Next steps