> ## Documentation Index
> Fetch the complete documentation index at: https://docs.joystream.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# From Simulation to a real Run

> Check a version in Simulation, run it for real, and set a schedule pinned to that version.

A real Run is a decision, not a default. This guide takes one built version from Simulation to a real Run, and says what to look at before each step.

## Prerequisites

* An agent with at least one built version that has completed a Simulation. See [Build your first agent](https://docs.joystream.ai/guides/build-your-first-agent.md).
* Real credentials connected for the services it uses. See [Connect a service](https://docs.joystream.ai/guides/connect-a-service.md).

**1. Pick the version**

```bash theme={null}
jstm agent version list failed-payment-digest
```

Versions are listed newest first, with when each was built, how many triggers run it, and its latest review. Every command below names the version, so you run exactly what you checked even if someone builds again in between.

**2. Check the Simulation evidence**

```bash theme={null}
jstm agent run list failed-payment-digest --mode simulation --version 0.0.3
jstm agent run show failed-payment-digest/runs/3
```

Ask the outcome question, not the execution question. Not "did every story complete?" but "would this have produced the right result?"

In a Simulation, outside services return made-up responses, so check the shape of what the agent would have sent — the right channel, the right fields, the right accounts — rather than the data. A Simulation that finishes green while targeting the wrong payments is a failure that looks like a success.

To try the version once more with real-looking input:

```bash theme={null}
jstm agent simulate failed-payment-digest --version 0.0.3 --input '{"date":"2026-08-03"}'
```

**3. Check readiness**

```bash theme={null}
jstm agent readiness failed-payment-digest
```

A Simulation needs no connected services, so it can pass when a real Run would be refused. Readiness checks the connections and skills themselves.

For an extra check against the real service:

```bash theme={null}
jstm connection test stripe --workspace acme-corp/finance
jstm connection test slack --workspace acme-corp/finance
```

**4. Ask for a review (optional)**

```bash theme={null}
jstm agent review request failed-payment-digest --version 0.0.3 --reviewer 5b8f1c3e-2a47-4d90-8e61-7c3a9b0d2f14 --title "Ready to run for real?"
```

The reviewer signs off on, or declines, that version. A review is advice: it doesn't start or block anything. See [Reviews](https://docs.joystream.ai/features/reviews.md).

**5. Run it for real**

```bash theme={null}
jstm agent run failed-payment-digest --mode run --version 0.0.3 --input '{"date":"2026-08-03"}' --verbose
```

> [!WARNING]
>
> A Run has real side effects. The agent will post to Slack and read real Stripe data. The command shows what it will run and asks first; `--yes` skips the question.

If a service the version uses is not connected, the Run is refused before it starts, with a message naming the service.

Watch this one. It is the first time this version changes something outside JoyStream. Start with a test channel or a single account before pointing it at everything.

**6. Review the Run evidence**

```bash theme={null}
jstm agent run list failed-payment-digest --mode run
jstm ticket list --agent-id failed-payment-digest --mode run
```

Give it enough Runs to see variation — a day with no failed payments, a day with an unusual one, a day when Stripe is slow. The interesting evidence is in the edge cases, not the happy path.

Check the tickets for exceptions and escalations. An agent that never escalated may handle everything well, or may not have met anything hard yet.

**7. Set it running**

Agents usually run on a schedule or a trigger rather than by hand. A trigger is pinned to one version and has its own mode:

```bash theme={null}
jstm trigger add routine failed-payment-digest --name "Weekday digest" --when weekdays --at 08:00 --timezone America/New_York --mode run --version 0.0.3
```

Without `--version`, the trigger is pinned to the latest version when it is created. Either way it keeps running that version: building again does not move it.

See [Schedule an agent](https://docs.joystream.ai/guides/schedule-an-agent.md) and [Trigger an agent](https://docs.joystream.ai/guides/trigger-an-agent.md).

## Checking in a script

`jstm agent readiness` exits non-zero when there are blockers, so it composes:

```bash theme={null}
jstm agent readiness failed-payment-digest \
  && jstm agent conform ./failed-payment-digest --fail-on error \
  && jstm agent run failed-payment-digest --mode run --version 0.0.3 --yes
```

## Moving to a new version, and back

After you build a new version, check it in Simulation, then re-pin the trigger to it:

```bash theme={null}
jstm trigger list --agent-id failed-payment-digest
jstm trigger update 8c41f2b9-77de-4a30-b0c5-2e1f6a9d4b77 --version 0.0.4
```

The command prints the old version and the new one. To go back to a known-good version while you fix a problem, re-pin it to the earlier one:

```bash theme={null}
jstm trigger update 8c41f2b9-77de-4a30-b0c5-2e1f6a9d4b77 --version 0.0.3
```

To stop scheduled Runs without deleting anything:

```bash theme={null}
jstm trigger update 8c41f2b9-77de-4a30-b0c5-2e1f6a9d4b77 --disabled
```

## See also

* [The lifecycle](https://docs.joystream.ai/concepts/lifecycle.md) — why every run names its version.
* [Evidence, memory, and metrics](https://docs.joystream.ai/concepts/evidence-and-memory.md) — what counts as proof.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.