---
title: "Event stream reference: every stream-json event and field"
url: "https://tryreynolds.com/docs/reference/event-stream"
description: "The newline-delimited JSON that openreynolds --output-format stream-json writes and reads: the envelope, every event type and field with a sample line, message input, ordering guarantees, and schema versioning."
---

**[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/reference/event-stream. It lives at https://tryreynolds.com/docs/reference/event-stream.md, and
[tryreynolds.com/llms.txt](https://tryreynolds.com/llms.txt) indexes every one of them.

From code

# Event stream

The newline-delimited JSON that openreynolds --output-format stream-json writes and reads: the envelope, every event type and field with a sample line, message input, ordering guarantees, and schema versioning.

`--output-format stream-json` writes the session to stdout as one JSON object per line, and nothing else. Without `-p` it also reads messages from stdin.

## The envelope

Every object has these four fields.

| Field | Type | Meaning |
|---|---|---|
| `v` | number | Schema version. `1`. |
| `type` | string | The event type. |
| `at` | number | Seconds since the session's stream began. |
| `study` | string | The study id. Empty before it is known. |

Adding a field or a type does not change `v`; renaming or removing one does. Ignore what you do not recognise. An object that could not be serialised is replaced by the envelope and an `unserialisable` field naming its type.

## Order

- `session_start` is first. A failure before the session exists is a single `session_end`.
- `workspace` follows, then `mode`, `solver` (if known) and `model`.
- `session_end` is last, exactly once, after the close-down has finished.
- Events from the mirror, the progress tracker and side questions arrive from other threads, between any two others. Lines are never interleaved.

## Session

| Type | Fields | Meaning |
|---|---|---|
| `session_start` | `study_id`, `instance_id`, `model`, `dir` | `instance_id` may be empty while the solver is still to be chosen. `dir` is the local study directory. |
| `session_end` | `outcome`, `error`? | See [Exit codes](https://tryreynolds.com/docs/reference/exit-codes.md). `error` is present for `config`, `unreachable` and `refused`. |
| `error` | `message` | An exception escaped. `session_end` follows with `crashed`. |
| `prompt` | none | It is your turn. Conversations only. |
| `mode` | `mode`, `label` | At the start and at every switch. |
| `model` | `model`, `effort`, `provider` | At the start and at every switch. |
| `solver` | `solver` | `openfoam` or `felix`, once settled. |

```json
{"v":1,"type":"session_start","at":0.0,"study":"20261120-091500-3f1c","study_id":"20261120-091500-3f1c","instance_id":"f4a8e8f8-...","model":"claude-opus-5","dir":"/home/you/cfd/studies/20261120-091500-3f1c"}
{"v":1,"type":"mode","at":0.31,"study":"20261120-091500-3f1c","mode":"auto","label":"Full auto"}
{"v":1,"type":"model","at":0.31,"study":"20261120-091500-3f1c","model":"claude-opus-5","effort":"high","provider":"anthropic"}
{"v":1,"type":"session_end","at":1840.7,"study":"20261120-091500-3f1c","outcome":"ok"}
```

## Workspace

| Type | Fields | Meaning |
|---|---|---|
| `workspace` | `home` | The study's directory on the workspace. |
| `workspace_starting` | none | A start that failed is being tried again. |
| `workspace_ready` | `instance_id`, `seconds` | Tools answer at once from here. |
| `workspace_failed` | `reason` | It will not come up until something changes. |

```json
{"v":1,"type":"workspace","at":0.3,"study":"20261120-091500-3f1c","home":"/work/20261120-091500-3f1c"}
{"v":1,"type":"workspace_ready","at":21.4,"study":"20261120-091500-3f1c","instance_id":"f4a8e8f8-...","seconds":21.1}
{"v":1,"type":"workspace_failed","at":9.8,"study":"20261120-091500-3f1c","reason":"account_volume_full: ..."}
```

## What the model says

| Type | Fields | Meaning |
|---|---|---|
| `thinking_begin` | none | The model started thinking. |
| `thinking` | `text` | Thinking, a line or up to about 240 characters at a time. |
| `text` | `text` | Reply text, coalesced the same way. |
| `message` | `role`, `text`, `thinking` | The whole of what was said, once the model's message ends. |

Read `text` to stream and `message` to have the answer. Everything in `text` and `thinking` is repeated in the `message` that follows.

```json
{"v":1,"type":"text","at":5.2,"study":"20261120-091500-3f1c","text":"I'll start with a coarse mesh so the wake length is known before refining.\n"}
{"v":1,"type":"message","at":6.0,"study":"20261120-091500-3f1c","role":"assistant","text":"I'll start with a coarse mesh...","thinking":""}
```

## What it does

| Type | Fields | Meaning |
|---|---|---|
| `tool` | `name`, `summary` | A tool call started. See [Agent tools](https://tryreynolds.com/docs/reference/agent-tools.md). |
| `tool_error` | `message` | A tool call went wrong. The agent sees it too. |
| `step` | `number`, `seconds`, `tool_calls` | One round of thinking and acting finished. |
| `stage` | `text` | What is happening, in a line. |
| `working` | `text` | Something takes a while, such as a model call being retried. |
| `desk_step` | `desk`, `kind`, `step`, `text`, `cmd`, `exit_code`, `seconds`, `output`, `image` | One step of the CAD desk. `kind` is `review` for the independent reviewer. `cmd` and `output` are clipped to 600 characters. |
| `usage` | `tokens`, `fraction` | Thread size, and its share of the model's window. |

```json
{"v":1,"type":"tool","at":7.9,"study":"20261120-091500-3f1c","name":"job_start","summary":"simpleFoam"}
{"v":1,"type":"step","at":8.4,"study":"20261120-091500-3f1c","number":3,"seconds":2.318,"tool_calls":1}
{"v":1,"type":"usage","at":8.4,"study":"20261120-091500-3f1c","tokens":41210,"fraction":0.041}
```

## Jobs and progress

| Type | Fields | Meaning |
|---|---|---|
| `jobs` | `jobs` | Every job and its state, whenever any changes. |
| `watching` | `names` | The session is waiting on these jobs. |
| `progress` | `phase`, `headline`, `detail`, `fraction`, `busy` | How far the running work is. Sent when the phase, the headline or the percentage changes. `fraction` is null when there is no end to measure against. |
| `narration` | `text` | A plain line about what is going on. |

Each job has `id`, `name`, `status`, `exit_code`, `end_reason`, `cmd` and `cwd`.

```json
{"v":1,"type":"jobs","at":8.3,"study":"20261120-091500-3f1c","jobs":[{"id":"7b1c...","name":"sphere_medium","status":"running","exit_code":null,"end_reason":null,"cmd":"simpleFoam","cwd":"/work/20261120-091500-3f1c/case"}]}
{"v":1,"type":"progress","at":95.0,"study":"20261120-091500-3f1c","phase":"solving","headline":"solving sphere_medium · Time 820 / 2000","detail":"Ux 3.1e-04 p 8.7e-03","fraction":0.41,"busy":true}
```

## Files and pictures

| Type | Fields | Meaning |
|---|---|---|
| `mirrored` | `pulled`, `bytes`, `unchanged`, `seconds`, `local_dir`, `warnings` | One sync of files to this machine. |
| `delivered` | `lines`, `images`, `videos` | New pictures and assembled animations, as local paths. |
| `files` | `path`, `depth`, `entries`, `notice`?, `error`? | Answer to `/files`. Each entry has `name`, `is_dir`, `size`, `line`. |
| `renders` | `dir`, `files` | Answer to `/renders`, newest first. |

```json
{"v":1,"type":"mirrored","at":112.6,"study":"20261120-091500-3f1c","pulled":["/home/you/.../case/log.simpleFoam"],"bytes":48211,"unchanged":37,"seconds":1.204,"local_dir":"/home/you/.../files","warnings":[]}
{"v":1,"type":"delivered","at":113.0,"study":"20261120-091500-3f1c","lines":["1 new render"],"images":["/home/you/.../renders/wake.png"],"videos":[]}
```

## Questions

| Type | Fields | Meaning |
|---|---|---|
| `approval` | `id`, `kind`, `title`, `detail`, `choices` | The session is waiting for an answer. `kind` is `job`, `checkpoint` or `ceiling`. |
| `approval_done` | `id`, `outcome`, `note` | `outcome` is `approved`, `approved_all` or `declined`. |

```json
{"v":1,"type":"approval","at":40.2,"study":"20261120-091500-3f1c","id":"9f2a11c0","kind":"job","title":"Start a job: sphere_medium","detail":"cmd: simpleFoam
cwd: /work/20261120-091500-3f1c/case","choices":["approve","decline","approve all"]}
{"v":1,"type":"approval_done","at":51.7,"study":"20261120-091500-3f1c","id":"9f2a11c0","outcome":"declined","note":"use the coarse mesh first"}
```

Answer with a user line: `/yes`, `/no` and a reason, or `/all`. Until then the session waits. [Modes](https://tryreynolds.com/docs/modes.md) explains each kind.

## Talking back

| Type | Fields | Meaning |
|---|---|---|
| `receipt` | `text` | A message typed mid-turn was received, and when it will be read. |
| `interjection` | `text` | The message reached the agent. |
| `side_question` | `text` | A `/btw` question was taken. |
| `side_answer` | `text`, `forwarded` | Its answer. `forwarded` is true when your words were passed on to the agent. |
| `status` | `lines` | Answer to `/status`, `/help`, `/mode`, `/model` and the like. |
| `notice`, `warn`, `info` | `message` | What a terminal would have shown as a line. |

## Cost events

Rows of type `cost` carry `kind` (`turn`, `tool` or `mirror`), `ts` (wall clock, UTC) and the fields of that kind.

| Kind | Fields |
|---|---|
| `turn` | `seconds`, `model`, `messages`, `stop`, `input`, `output`, `cache_read`, `cache_write`. Anthropic-family models only. |
| `tool` | `tool`, `seconds`, `cmd` (first 200 characters), `tool_use_id`, `result` with `ok` and `bytes`. |
| `mirror` | `background`, `pulled`, `bytes`, `skipped`, `unchanged`, `round_trips`, `seconds`, `gate_wait_seconds`, `warnings`. |

Set `OPENREYNOLDS_TRACE=<file>` to append the same rows to a file from any session, with or without the stream.

```json
{"v":1,"type":"cost","kind":"tool","at":8.2,"ts":"2026-11-20T09:15:08Z","study":"20261120-091500-3f1c","tool":"bash","seconds":1.9,"cmd":"checkMesh","tool_use_id":"toolu_01...","result":{"ok":true,"bytes":3120}}
```

## Input

Without `-p`, each line of stdin is one message.

| Accepted | Example |
|---|---|
| `text` | `{"type": "user", "text": "refine the wake"}` |
| `content` as a string | `{"type": "user", "content": "refine the wake"}` |
| `content` as text blocks | `{"type": "user", "content": [{"type": "text", "text": "refine the wake"}]}` |
| a nested `message` | `{"type": "message", "message": {"content": "refine the wake"}}` |

`type` may be `user`, `message` or `say`, and defaults to `user`. Anything else on a line is ignored, plain text included. End of input ends the session.

## Robustness

A reader that goes away ends the stream, not the study. Stdout is flushed after every line. A `message` can be long, since it carries a whole reply.

## Related

[From a program](https://tryreynolds.com/docs/from-a-program.md), [Webhooks](https://tryreynolds.com/docs/reference/webhooks.md), [Exit codes](https://tryreynolds.com/docs/reference/exit-codes.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.
