Cori
Guides

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:

ValueClassificationReason
Input CSV file pathParameterDifferent files each run
Target language (fr)ConstantAlways French for this workflow
Google Sheets spreadsheet IDParameterMay vary by customer/project
Model name (gpt-4o-mini)ConstantFixed for this workflow
dry_run flagParameterCaller decides each run
Output sheet tab name (FR)ConstantFixed 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

TypeCLI exampleNotes
stringspreadsheet_id=1BxiM...General text value
numbermax_rows=500Numeric value
booleandry_run=truetrue or false
enumlang=frOne of a fixed set (declare options)
pathinput_file=./products.csvFile 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 file

This 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=true

See Reference: Manifest for the full parameter object schema.

On this page