# Example programs

> The programs of the ormaos-examples repository that every output on this site was recorded from, one page per program.

Every command output on this site is the output of the real `ormaos` command line on one of these programs, at the commits pinned in `sources.json`, on Python 3.14 on Linux. [`scripts/generate.py`](https://github.com/ormaos/docs/blob/main/scripts/generate.py) copies each program to a new folder, runs it as its README says, records it, and runs the reading commands. Durations, times, sizes and process ids change from run to run and are written `…`.

| Program | Kind | Needs | Guide |
|---|---|---|---|
| [order-sync](/examples/order-sync.md) | a job that applies orders to an inventory in SQLite | standard library | [Scheduled job](/python/guides/scheduled-job.md) |
| [web-backend](/examples/web-backend.md) | a FastAPI service over SQLite, called through its test client | fastapi, httpx | [Web backend](/python/guides/web-backend.md) |
| [data-pipeline](/examples/data-pipeline.md) | a pandas report from two CSV files | pandas | [Data pipeline](/python/guides/data-pipeline.md) |
| [notebook](/examples/notebook.md) | a Jupyter notebook with `with ormaos.record():` in its cells | nbclient, nbformat, ipykernel | [Notebook](/python/guides/notebook.md) |
| [ml-training](/examples/ml-training.md) | a PyTorch training loop on CPU | torch | [ML training](/python/guides/ml-training.md) |
| [rl-env](/examples/rl-env.md) | an environment with a reward and an episode loop | standard library | [RL environment](/python/guides/rl-environment.md) |
| [ai-app](/examples/ai-app.md) | an app that calls a model API over HTTP, here a local stand-in | standard library | [LLM app](/python/guides/llm-app.md) |
| [agent-change](/examples/agent-change.md) | a git repository and a change a coding agent made to it | standard library, git | [Agent checking a change](/python/guides/agent-change.md) |

The source of each is in [ormaos-examples](https://github.com/ormaos/ormaos-examples/tree/6e27be59220856263a6a5905400d8630dafe73dd). Each program prints one ordinary line, and in each execution something happened that the line does not say.

## Run one yourself

In a Python 3.12 or newer with Ormaos and the folder's `requirements.txt`:

```bash
git clone https://github.com/ormaos/ormaos-examples && cd ormaos-examples/use-cases
python3 -m venv .venv && .venv/bin/pip install git+https://github.com/ormaos/ormaos-python -r web-backend/requirements.txt
cd web-backend && ../.venv/bin/ormaos run -- ../.venv/bin/python main.py
```

For `ml-training`, the CPU build of torch is enough: add `--extra-index-url https://download.pytorch.org/whl/cpu` to the `pip install`.

## The benchmark

The same programs are the tasks of the agent benchmark of ormaos-examples. See [Benchmarks](/examples/benchmarks.md).

---

Source: https://docs.ormaos.com/examples/ · ormaos 0.0.1 · ormaos-python 968f69776c · ormaos-examples 6e27be5922
