Define parameters
How to decide what becomes a parameter vs. a constant, and how to declare parameters in the manifest.
Parameter vs. constant
For each value your workflow uses, ask: would this value change on the next run?
- Yes → make it a parameter. The caller passes it on the CLI.
- No → make it a constant. Hardcode it in the step.
Examples:
| Value | Classification | Reason |
|---|---|---|
| Input CSV file path | Parameter | Different files each run |
Target language (fr) | Constant | Always French for this workflow |
| Google Sheets spreadsheet ID | Parameter | May vary by customer/project |
Model name (gpt-4o-mini) | Constant | Fixed for this workflow |
dry_run flag | Parameter | Caller decides each run |
Output sheet tab name (FR) | Constant | Fixed by the workflow's purpose |
Don't over-parameterize
Every parameter adds friction. A caller has to pass it, your tests have to cover it, and your manifest has to document it. Constants that rarely change should stay constants. You can always promote a constant to a parameter later when the need arises.
Parameter types
| Type | CLI example | Notes |
|---|---|---|
string | spreadsheet_id=1BxiM... | General text value |
number | max_rows=500 | Numeric value |
boolean | dry_run=true | true or false |
enum | lang=fr | One of a fixed set (declare options) |
path | input_file=./products.csv | File path; Cori resolves it relative to cwd |
Declaring parameters in the manifest
---
parameters:
- name: input_file
type: path
description: Path to the source CSV file
- name: spreadsheet_id
type: string
description: Google Sheets spreadsheet ID to write results to
- name: dry_run
type: boolean
default: false
description: If true, skip the write step
- name: target_lang
type: enum
options: [fr, de, es]
default: fr
description: Target language for translation
---Parameters with default are optional on the CLI. Parameters without default are required.
Defaults derived from the original run
When an agent captures a workflow, it uses the values from the original conversation as defaults where appropriate. A path like ./products.csv that was used in the conversation becomes:
- name: input_file
type: path
default: ./products.csv
description: Path to the source CSV fileThis makes the workflow immediately runnable with cori run ./my_workflow (no args needed) while still being flexible for future runs.
Passing parameters on the CLI
Parameters are passed as name=value after the path:
cori run ./translate_product_sheets_fr \
input_file=products.csv \
spreadsheet_id=1BxiM... \
dry_run=trueSee Reference: Manifest for the full parameter object schema.