Recipes are reusable, shareable BioRouter configurations. A recipe packages instructions, prompts, extension requirements, parameters, and model settings into a single file that anyone can load to launch a reproducible, pre-configured BioRouter session.
Common use cases: automated analysis pipelines, code review workflows, data processing routines, multi-step research tasks, scheduled jobs.
Recipes are written in YAML (recommended) or JSON.
my-recipe.yaml ← recommended
my-recipe.yml ← supported by Desktop only
my-recipe.json ← supported
BioRouter discovers recipes from:
- The current working directory
- Paths listed in the
BIOROUTER_RECIPE_PATHenvironment variable - A configured GitHub repository (
BIOROUTER_RECIPE_GITHUB_REPO) — requires theghCLI to be installed and authenticated
| Field | Required | Description |
|---|---|---|
title |
Yes | Short title for the recipe |
description |
Yes | What the recipe does |
instructions |
Yes* | System-level instructions for the agent (Jinja template supported) |
prompt |
Yes* | The initial prompt sent to the agent (required for headless/automated mode) |
parameters |
No | Dynamic parameters users fill in at launch |
extensions |
No | MCP servers and extensions the recipe needs |
settings |
No | Provider/model overrides for this recipe |
activities |
No | Clickable prompt buttons shown in Desktop (Desktop only) |
sub_recipes |
No | Subrecipes this recipe calls |
response |
No | Enforce structured JSON output |
retry |
No | Auto-retry logic with success validation |
version |
No | Recipe format version (defaults to "1.0.0") |
*At least one of instructions or prompt is required.
version: "1.0.0"
title: "Summarize Research Paper"
description: "Reads a PDF and produces a structured summary"
instructions: "You are a biomedical research assistant."
prompt: "Please summarize the key findings, methods, and conclusions of the attached paper."Parameters make recipes dynamic. Users fill in values at launch time; values are substituted into instructions, prompt, and activities using {{ parameter_name }} syntax.
parameters:
- key: gene_name
input_type: string
requirement: required
description: "Gene symbol to analyze (e.g. BRCA1)"
- key: output_format
input_type: select
requirement: required
description: "Output format"
options:
- markdown
- json
- csv
- key: max_results
input_type: number
requirement: optional
default: "10"
description: "Maximum number of results to return"
- key: data_file
input_type: file
requirement: required
description: "Path to the input data file (contents will be included)"Input types: string, number, boolean, date, file, select
Requirement values:
required— must be provided at launchoptional— can be omitted if adefaultis specifieduser_prompt— interactively prompts the user if not pre-filled
Template syntax:
prompt: "Analyze {{ gene_name }} and return {{ max_results }} results in {{ output_format }} format."Recipes can declare which MCP extensions they need:
extensions:
- type: stdio
name: github-mcp
cmd: github-mcp-server
args: []
env_keys:
- GITHUB_PERSONAL_ACCESS_TOKEN
timeout: 60
description: "GitHub operations"
- type: builtin
name: developer
bundled: true
- type: inline_python
name: data_processor
code: |
import pandas as pd
# ... processing logic
dependencies:
- pandas
timeout: 120If an extension requires a secret (listed in env_keys) that is not in the system keyring, BioRouter will prompt the user to enter it at launch and store it securely.
Override the default provider and model for a specific recipe:
settings:
biorouter_provider: "anthropic"
biorouter_model: "claude-sonnet-4-20250514"
temperature: 0.7Activities create clickable prompt bubbles in the Desktop UI when a recipe is opened:
activities:
- "message: **Welcome!** Select an analysis to begin."
- "Run differential expression analysis for {{ gene_name }}"
- "Generate pathway enrichment report"
- "Export results as {{ output_format }}"The message: prefix creates an info box. All other activities become clickable buttons that send their text as the first user message.
Use response to enforce a specific JSON output structure — useful for automation pipelines:
response:
json_schema:
type: object
properties:
summary:
type: string
description: "Brief summary of findings"
genes_identified:
type: array
items:
type: string
description: "List of gene symbols identified"
confidence_score:
type: number
description: "Confidence score 0-1"
required:
- summary
- genes_identifiedRecipes can retry automatically if success criteria are not met:
retry:
max_retries: 3
timeout_seconds: 30
checks:
- type: shell
command: "test -f /tmp/output.json"
- type: shell
command: "python -c \"import json; json.load(open('/tmp/output.json'))\""
on_failure: "rm -f /tmp/output.json"Retry flow:
- Recipe runs.
- All
checksshell commands are executed. - If any check fails and retries remain,
on_failureruns, message history resets, and the recipe restarts. - Stops when all checks pass or
max_retriesis exhausted.
A recipe can delegate sub-tasks to other recipes:
sub_recipes:
- name: "data_cleaning"
path: "./subrecipes/clean-data.yaml"
values:
input_format: "csv"
- name: "statistical_analysis"
path: "./subrecipes/stats.yaml"
sequential_when_repeated: false # allow parallel executionSet sequential_when_repeated: false to allow multiple instances of a subrecipe to run in parallel.
Recipes support Jinja-style template inheritance so you can share common structure across related recipes:
base.yaml:
version: "1.0.0"
title: "Base Analysis"
instructions: |
{% block instructions %}
You are a biomedical data analyst.
{% endblock %}
prompt: |
{% block prompt %}
Analyze the provided data.
{% endblock %}specialized.yaml:
{% extends "base.yaml" %}
{% block prompt %}
Perform a survival analysis on the provided clinical dataset.
{% endblock %}Desktop:
- Open a recipe file via File > Open Recipe, or load from the Recipe Library in the sidebar.
- Saved recipes appear in the Recipe Library panel.
CLI:
biorouter run --recipe my-recipe.yaml
biorouter run --recipe my-recipe.yaml --param gene_name=BRCA1BioRouter validates recipes on load. Common errors:
- Missing required
titleordescription - Optional parameters without a
defaultvalue - Template variables (
{{ name }}) with no matching parameter definition - Unused parameter definitions
- Invalid JSON schema in the
responsefield
Validate a recipe explicitly:
biorouter recipe validate my-recipe.yaml