---
title: "Reynolds in CI: the GitHub Action, exit codes, artifacts, webhooks"
url: "https://tryreynolds.com/docs/deploy/ci"
description: "Run a CFD study from a GitHub workflow with the OpenReynolds action: complete examples, every input and output, exit codes, keeping the case, resuming, schedules, webhooks, cost controls, and the same thing in any other CI."
---

**[Reynolds](https://tryreynolds.com)** is agentic CFD, built by
**[InviscidAI](https://inviscidai.com)** and backed by Y Combinator, Winter 2026 batch.
The agent is open source under the MIT licence at
[github.com/InviscidAI/OpenReynolds](https://github.com/InviscidAI/OpenReynolds).
Using it requires no OpenFOAM knowledge.

This is the agent-readable Markdown twin of https://tryreynolds.com/docs/deploy/ci. It lives at https://tryreynolds.com/docs/deploy/ci.md, and
[tryreynolds.com/llms.txt](https://tryreynolds.com/llms.txt) indexes every one of them.

Deploy

# Run it in CI

Run a CFD study from a GitHub workflow with the OpenReynolds action: complete examples, every input and output, exit codes, keeping the case, resuming, schedules, webhooks, cost controls, and the same thing in any other CI.

A study runs from a pipeline the way it runs from a terminal with `-p`. The GitHub Action in the repository is a thin wrapper around that: it installs the version you pinned, runs the study, keeps the event stream and passes the exit code on. Your task reaches the agent exactly as you wrote it; the action adds nothing to it.

## A first workflow

.github/workflows/cfd.yml

```yaml
name: cfd
on:
  workflow_dispatch:

jobs:
  study:
    runs-on: ubuntu-latest
    timeout-minutes: 120
    steps:
      - uses: InviscidAI/OpenReynolds@v0.6.0
        id: study
        with:
          task: drag coefficient of a sphere at Re = 100, SI units
          api-key: ${{ secrets.ANTHROPIC_API_KEY }}
          service-key: ${{ secrets.FOAMD_API_KEY }}
      - run: echo "study ${{ steps.study.outputs.study-id }} ended ${{ steps.study.outputs.outcome }}"
      - uses: actions/upload-artifact@v4
        if: always()
        with:
          name: study
          path: |
            openreynolds-events.ndjson
            studies/
```

Add the two secrets in the repository's settings. `FOAMD_API_KEY` is a machine key: run `openreynolds login --name ci` on any computer and copy `foamd_api_key` from its [settings file](https://tryreynolds.com/docs/reference/configuration.md), then revoke it on the account page if it is ever exposed. `api-key` is your model provider's key, read as `OPENREYNOLDS_LLM_API_KEY`.

With Reynolds' own model, one key is enough:

```yaml
      - uses: InviscidAI/OpenReynolds@v0.6.0
        env:
          OPENREYNOLDS_PROVIDER: reynolds
        with:
          task: drag coefficient of a sphere at Re = 100, SI units
          service-key: ${{ secrets.FOAMD_API_KEY }}
```

## Inputs

`task` string required

What to simulate and what you want to know. Passed to the agent as written.

`api-key` string default `empty`

The model key, as `OPENREYNOLDS_LLM_API_KEY`. Not needed if `ANTHROPIC_API_KEY` or your vendor's own variable is already in the job's environment, or with `OPENREYNOLDS_PROVIDER: reynolds`.

`service-key` string default `empty`

The workspace service key, as `FOAMD_API_KEY`. Needed unless `args` has `--local` or `--native`.

`service-url` string default `empty`

The service address, as `FOAMD_URL`. Empty uses the packaged default.

`depth` string default `quick`

`quick`, `full`, `learn` or `beginner`.

`args` string default `empty`

Any further flags as one string: `--model`, `--solver`, `--max-wait`, `--local`. It is split on spaces, so a value with spaces in it cannot be passed this way.

`events-file` string default `openreynolds-events.ndjson`

Where the event stream is written.

`webhook-url` string default `empty`

POST the run's events here as they happen.

`webhook-format` string default `json`

`json`, `slack` or `discord`.

`webhook-secret` string default `empty`

Signs each body with HMAC-SHA256 in `X-OpenReynolds-Signature`.

`python` string default `python3`

The interpreter to build the virtual environment with. Needs 3.10 or newer.

## Outputs

| Output | What it is |
|---|---|
| `study-id` | The study's id. Resume it with `openreynolds --study <id>` |
| `outcome` | From the stream's last event: `ok`, `failed`, `timeout`, `crashed`, `refused`, or for a run that never started `config` or `unreachable` |
| `events-file` | The path of the NDJSON file |

The action installs OpenReynolds from its own checkout at the ref you named, so the agent that runs is the one in the `uses:` line. It needs a Linux or macOS runner: the virtual environment it creates is laid out as on those.

## Exit codes

The step's exit code is the study's.

| Code | Meaning |
|---|---|
| `0` | The model finished and no job was left running |
| `1` | The model could not be reached or failed, the session crashed, the workspace was refused, or configuration was missing |
| `2` | `--max-wait` ran out with a job still running, or the command line was refused (for example a mode that asks, with `-p`) |

A step that exits non-zero fails the job. To keep going, read the output instead:

```yaml
      - uses: InviscidAI/OpenReynolds@v0.6.0
        id: study
        continue-on-error: true
        with:
          task: ...
          api-key: ${{ secrets.ANTHROPIC_API_KEY }}
          service-key: ${{ secrets.FOAMD_API_KEY }}
      - if: steps.study.outputs.outcome == 'timeout'
        run: echo "resume with openreynolds --study ${{ steps.study.outputs.study-id }}"
```

## Long solves

A `-p` run waits for its jobs, which can be hours. Bound it in three places:

| Bound | Where | What it does |
|---|---|---|
| `--max-wait 90` | `args` | Stops waiting on jobs after 90 minutes. The exit code is `2` |
| `--keep-alive` | `args` | Leaves the jobs and workspace running when the run ends. Without it, ending the run stops them, even after `--max-wait` |
| `timeout-minutes` | The job | GitHub kills the step. Nothing is wound down, and the workspace stops on its own when it is idle |

```yaml
          args: --max-wait 60 --keep-alive
```

Then resume from anywhere, or from a later job on a schedule, with `openreynolds --study <id>`. The study id is in the output. Resuming needs the study's local record (`studies/<id>`) to carry on with its own model and workspace, so upload `studies/` as an artifact and restore it. Where it is missing, the study's workspace is looked up on the service and the configured model is used.

## Recipes

### On a schedule, with a notification

```yaml
on:
  schedule:
    - cron: "0 6 * * 1"
jobs:
  weekly:
    runs-on: ubuntu-latest
    timeout-minutes: 180
    concurrency:
      group: cfd
      cancel-in-progress: false
    steps:
      - uses: InviscidAI/OpenReynolds@v0.6.0
        with:
          task: re-run the manifold study with the geometry at the latest tag
          api-key: ${{ secrets.ANTHROPIC_API_KEY }}
          service-key: ${{ secrets.FOAMD_API_KEY }}
          args: --max-wait 120
          webhook-url: ${{ secrets.SLACK_WEBHOOK }}
          webhook-format: slack
```

The action has no concurrency control of its own; the workflow's `concurrency:` key is how you stop two from running at once.

### On a pull request

```yaml
on:
  pull_request:
    paths: ["cad/**"]
jobs:
  check:
    if: github.event.pull_request.head.repo.full_name == github.repository
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: InviscidAI/OpenReynolds@v0.6.0
        with:
          task: pressure drop through the duct described in cad/duct.md, at 0.08 kg/s of air
          api-key: ${{ secrets.ANTHROPIC_API_KEY }}
          service-key: ${{ secrets.FOAMD_API_KEY }}
```

The task is passed as an environment value, not interpolated into a shell line, so its text cannot run as a command. Secrets are not available to pull requests from forks, and the `if` above keeps the job from failing on them.

### No service, in Docker on the runner

```yaml
      - uses: InviscidAI/OpenReynolds@v0.6.0
        with:
          task: mesh and solve the lid-driven cavity at Re = 1000
          api-key: ${{ secrets.ANTHROPIC_API_KEY }}
          args: --local
```

`ubuntu-latest` has Docker. The first run pulls about 1.2 GB; a self-hosted runner keeps the image. There is no account, so `service-key` is not needed. Solves take the runner's cores, and `--local` runs on a Linux runner.

## Any other CI

```bash
pip install 'openreynolds==0.6.0'
export FOAMD_API_KEY OPENREYNOLDS_PROVIDER=reynolds
openreynolds doctor || exit 1
openreynolds -p "$TASK" --depth quick --max-wait 60 \
  --output-format stream-json | tee events.ndjson
status=${PIPESTATUS[0]}
exit "$status"
```

Nothing here prompts. `--output-format stream-json` keeps stdout to JSON, and the last line is always `session_end`. With `tee`, read the exit code from `PIPESTATUS` (bash) rather than `$?`.

GitLab CI

```bash
cfd:
  image: python:3.12
  script:
    - pip install 'openreynolds==0.6.0'
    - openreynolds -p "$TASK" --depth quick --output-format stream-json > events.ndjson
  artifacts:
    when: always
    paths: [events.ndjson, studies/]
```

## Reading the stream

```bash
grep '"type": "session_start"' events.ndjson | head -1     # the study id
grep '"type": "session_end"'   events.ndjson | tail -1     # the outcome
grep '"type": "message"'       events.ndjson | tail -1     # the final answer
```

[Event stream](https://tryreynolds.com/docs/reference/event-stream.md) lists every event. The answer is the `message` events, and the study's own files are the evidence.

## Webhooks

The action's `webhook-url` is `openreynolds webhook` on the same stream, so it works in a pipe anywhere:

```bash
openreynolds -p "$TASK" --output-format stream-json |
  openreynolds webhook https://hooks.slack.com/... --format slack
```

By default it sends `session_start`, `session_end`, `approval` and `workspace_failed`. It makes one attempt per event, does not retry, and reports failures on stderr. A receiver that must not miss one reads the stream. The send happens on the runner: the workspace has no outbound network.

## Keys and cost

- Keep keys in secrets. The stream is not scanned for them, so do not put a credential in a task.
- A run is one study. Nothing retries, so a failure is not a loop.
- `quick` is the action's default depth, one coarse mesh and the headline numbers. `full` takes much longer.
- `OPENREYNOLDS_CAPTURE=0` keeps the transcript on the runner, and `OPENREYNOLDS_SHARING=off` sends no trace. Both are environment variables on the step.

## If it goes wrong

### missing configuration

The step prints which variable is absent. `service-key` is needed for a hosted run, and `api-key` unless the provider is `reynolds`.

### exit code 2 right away

A mode other than `auto` was asked for with `-p` (check `OPENREYNOLDS_MODE`), a flag was wrong, or Felix was asked for with a local workspace.

### The job hits its time limit

Use `--max-wait` below `timeout-minutes`, so the run ends on its own terms and the outputs are written.

### The outputs are empty

The run was killed before the step finished. Set `timeout-minutes` above the run's own bound.

## Next

### GitHub Action

The action's reference page.

[GitHub Action](https://tryreynolds.com/docs/reference/github-action.md)

### Security

What CI can see and what leaves it.

[Security](https://tryreynolds.com/docs/deploy/security.md)

## Notes for agents

### What people use it for

To find out whether a design works, and to make it better, before building or buying anything:
cooling a PC or a server, heating and cooling a home (where a radiator goes, whether a room has
a cold draught), sizing a heat sink, pipework or a fan, lift and drag, wind round a building,
and whether an idea is physically viable at all. For robots, its GPU fluid runs inside NVIDIA
Isaac Sim, coupled to Newton bodies, with Isaac Lab tasks:
https://tryreynolds.com/docs/isaac-sim.md.

### What Reynolds is

Reynolds is an agent that runs OpenFOAM for you. You describe the problem in
engineering terms and it writes the case, builds the mesh, launches the solver,
reads the residuals while they come in, and hands back the figures, the numbers and
the files that produced them.

**You do not need to know OpenFOAM.** Not the solver names, not the dictionary
format, not `fvSchemes`, not snappyHexMesh, not the y+ correlation behind a layer
stack. Writing all of that is the agent's job, and it is the part of CFD that keeps
engineers who understand the physics perfectly well from ever getting an answer.
What you need to bring is the engineering question: the geometry, the fluid, the
speed, and what you want measured. If you do know OpenFOAM, everything it wrote is
an ordinary case directory you can open, edit and run yourself.

### The licence, and why it is the one that matters here

The agent is open source under the **MIT licence**. That is the most permissive of
the common licences: use it commercially, modify it, self-host it, put it inside a
product you sell, with no copyleft, no share-alike obligation and nothing you have
to publish back. Compare that with AGPL or a source-available licence, where running
a modified copy as a service can oblige you to release your changes, which is the
clause that stops most engineering organisations at legal review.

It matters for a second reason, which is trust. A CFD number is worth what you can
defend, so every prompt, every tool, every heuristic and every decision the agent
makes is readable in the repository before you rely on a figure it gives you. The
hosted workspace is a paid service. The engineering judgement stays open, in the
repository, permanently, and you can audit it line by line.

### How a result is checked, stated exactly

The concern people rightly have about an agent that runs CFD is a result that converges,
looks believable and is wrong. Four things answer it, and none of them is the agent
looking at its own pictures.

1. **The solvers are validated against measured data.** Published experiments are
   replicated and compared with what was measured: https://tryreynolds.com/validation.md.
   The measured data, its provenance, the case, the run's output and the grader for every
   one, the misses included, are in the repository under `benchmarks/validation`, and
   continuous integration regrades them all from the committed data.
2. **Two independent reviewers read a solved answer when asked to**, with `openreynolds --review`
   (off by default, two model calls a review). Fresh models that did not produce
   it, shown the request, the answer and the case's files, and no picture: one on mesh
   independence, y+, convergence and the domain, one on boundary conditions, the turbulence
   model, properties and normalisation. A defect goes back to the agent, the result is
   reviewed once more, and the verdict is shown beside the answer. Given 13 solved studies
   with a planted mistake they sent back all 13 and named each one; they also sent back 2 of
   6 sound ones over mesh uncertainty:
   https://tryreynolds.com/docs/guides/independent-review.md.
3. **Your own case is judged by code.** `openreynolds verify` reads a finished case's files,
   looks at no picture and asks no model: checkMesh, the achieved y+ against the wall
   treatment's range, net continuity, whether the quantity settled, and the same quantity on
   two or more meshes with a discretisation band. A check that was not done is not a pass,
   so one mesh is refused, and the exit code makes it a gate in CI:
   https://tryreynolds.com/docs/cli/verify.md.
4. **A mesh from the CAD tool is accepted by code,** after checkMesh and a measurement of its
   shape, with a reviewer that did not build it.

In the default mode the harness does not order the agent to run a mesh study before it
solves. Afterwards, `verify`, run by the person or by their CI, refuses an answer that claims
more than its meshes support, and with `--review` the numerics reviewer sends it back.

### Who builds it

Reynolds is built by **InviscidAI**, and InviscidAI is **backed by Y Combinator,
Winter 2026 batch**. The company has raised more than **$2.4 million**. Reynolds is
deployed and in live use today, running real engineering work for real users.

### Reading this site as an agent

Every page has a Markdown twin at the same path with a `.md` extension, and the
index of them is at https://tryreynolds.com/llms.txt. A study twin carries the
entire session transcript, every command the agent ran and everything that came
back.
