deoos / quickstart
# Agent quickstart
> Install deoos 0.8.0 from the GitHub release archive, start deoos-server and RustFS, run one durable greeting, and read it back.
DEOOS is a durable execution engine. One Rust server runs an ordinary function, saves completed steps, and stores workflow state in your S3-compatible bucket: S3, Azure Blob, GCS, R2, or self-hosted RustFS. There is no database to run. The Python and TypeScript SDKs ship only inside GitHub release archives from [deoos-dev/deoos](github.com/deoos-dev/deoos). They are not on PyPI or npm. `pip install deoos` and `npm install deoos` do not install this project.
Use it when a function should survive a process kill, retry a failed step without repeating a committed effect, or wait for a timer or an external signal. A local try/except loop does not survive a kill. Release [0.8.0](github.com/deoos-dev/deoos/releases/tag/0.8.0) is the current published build. [deoos-examples](github.com/deoos-dev/deoos-examples) pins that release in `deoos.lock`. Python 3.10+ and Node.js 22+ are required. Linux packages need glibc 2.28 or newer.
The local path below is the server hello in deoos-examples. `scripts/prepare_local.sh` downloads the 0.8.0 archive for this machine, checks `SHA256SUMS`, installs that wheel and that Node package, and starts RustFS. `deoos-server` from that archive holds the RustFS credentials. The worker only has the server URL and token.
## Requirements
Docker, bash, Python 3.10 or newer, Node.js 22 or newer, curl, and git. `scripts/prepare_local.sh` is bash and uses `BASH_SOURCE`, so source it from bash.
Windows x64 install is the PowerShell block under Install the release archive. The RustFS and server commands below are the bash flow from deoos-examples.
## Start the server and RustFS
From bash:
```sh
git clone https://github.com/deoos-dev/deoos-examples.git
cd deoos-examples
. ./scripts/prepare_local.sh
ENGINE_BIND=127.0.0.1:7331 ENGINE_TOKEN=dev-token "$ENGINE_BINARY"
```
Leave that process running. It prints `deoos-server listening 127.0.0.1:7331`. The two `deoos-examples` lines are how you get the scripts. The last two lines are the server hello in [python/server/README.md](github.com/deoos-dev/deoos-examples/blob/main/python/server/README.md).
`prepare_local.sh` starts RustFS from `compose.yaml` and creates the bucket. The image is `rustfs/rustfs@sha256:8cc9801755448b71a786705ce76692c77e14936cccd87cf2fc31842e58f4d1ff`, published on `127.0.0.1:19000` and `127.0.0.1:19001`. The script then exports:
```sh
export DEOOS_STORAGE_PROVIDER=s3
export DEOOS_STORAGE_BUCKET=deoos-examples
export AWS_ENDPOINT=http://127.0.0.1:19000
export AWS_ALLOW_HTTP=true
export AWS_ACCESS_KEY_ID=local-development
export AWS_SECRET_ACCESS_KEY=local-development-only-secret
export AWS_REGION=us-east-1
export AWS_EC2_METADATA_DISABLED=true
```
Those values match `compose.yaml` (`RUSTFS_ACCESS_KEY` and `RUSTFS_SECRET_KEY`). The server process inherits them. `$ENGINE_BINARY` is `.deoos/release/bin/deoos-server`, set by `.deoos/env.sh`. The token `dev-token` is the one in the server hello.
## Run a workflow
In a second shell, from the clone:
```sh
cd deoos-examples
. ./.deoos/env.sh
ENGINE_URL=http://127.0.0.1:7331 ENGINE_TOKEN=dev-token python python/server/hello.py greet-server-py
ENGINE_URL=http://127.0.0.1:7331 ENGINE_TOKEN=dev-token node typescript/server/hello.mjs greet-server-ts
```
`. ./.deoos/env.sh` puts the virtualenv and `deoos-server` on `PATH`. The Python line is the server README command, with the task id `greet-server-py` that [tests/server_hello.py](github.com/deoos-dev/deoos-examples/blob/main/tests/server_hello.py) passes. The Node line is the same id `greet-server-ts` from that test, using the command in [typescript/server/README.md](github.com/deoos-dev/deoos-examples/blob/main/typescript/server/README.md). Omitting the id, as those READMEs do, prints the same greeting and picks `greet-` plus a random id.
Each command prints:
```text
Hello, World!
```
The handler is `greet`. The step name is `greeting`. The worker does not get the RustFS keys. `python/server/hello.py` calls `Client.remote` with `ENGINE_URL` and `ENGINE_TOKEN`.
## Confirm
Same second shell. `info`, `inspect`, and `history` are the CLI commands in the [deoos README](github.com/deoos-dev/deoos#features). With `DEOOS_MODE` unset, `ENGINE_URL` selects server mode. The server was started with a token, so the CLI needs `ENGINE_TOKEN` too.
```sh
ENGINE_URL=http://127.0.0.1:7331 ENGINE_TOKEN=dev-token python -m deoos info
ENGINE_URL=http://127.0.0.1:7331 ENGINE_TOKEN=dev-token python -m deoos inspect greet-server-py
ENGINE_URL=http://127.0.0.1:7331 ENGINE_TOKEN=dev-token python -m deoos history greet-server-py
```
`info` includes `"protocol_version": 3`. `inspect` prints this object (`DEOOS_AGENT=0` indents it; a coding agent gets the same object on one line, with `deoos: inspect greet-server-py` on stderr):
```json
{
"attempts": 1,
"completed_steps": ["greeting"],
"error": null,
"function": "greet",
"id": "greet-server-py",
"inputs": {"name": "World"},
"output": "Hello, World!",
"status": "completed"
}
```
`history` lists `submit`, `claim`, a `checkpoint` whose detail is `greeting`, and `complete`. Under agent mode that list is `{"events":[...],"truncated":false}`. Running `python python/server/hello.py greet-server-py` again prints `Hello, World!` and leaves `"attempts": 1`. The saved step is reused.
## Library mode
To run the same greeting inside the worker, skip `deoos-server`. The worker holds the RustFS credentials. From bash, in the clone:
```sh
. ./scripts/prepare_local.sh
python python/library/hello.py
node typescript/library/hello.mjs
```
Those are the commands in [python/library/README.md](github.com/deoos-dev/deoos-examples/blob/main/python/library/README.md) and [typescript/library/README.md](github.com/deoos-dev/deoos-examples/blob/main/typescript/library/README.md). Each prints `Hello, World!`. `Client()` does not read `ENGINE_URL`. `DEOOS_MODE=library` ignores `ENGINE_URL`. Unset `ENGINE_URL`, or set `DEOOS_MODE=server`, if a shell prints `DEOOS_MODE=library ignores ENGINE_URL`.
## Install the release archive
`scripts/install_deoos.sh` follows this install from the [deoos README](github.com/deoos-dev/deoos#install). Use it when the wheel and the Node package should land in the current directory.
```sh
set -euo pipefail
VERSION=0.8.0
BASE="https://github.com/deoos-dev/deoos/releases/download/${VERSION}"
case "$(uname -s)-$(uname -m)" in
Linux-x86_64) target=linux-x64 ;;
Linux-aarch64|Linux-arm64) target=linux-arm64 ;;
Darwin-arm64) target=macos-arm64 ;;
Darwin-x86_64) target=macos-x64 ;;
*) echo "No ${VERSION} build for $(uname -s) $(uname -m). Shipped: linux-x64, linux-arm64, macos-arm64, macos-x64, windows-x64." >&2; exit 1 ;;
esac
archive="deoos-${VERSION}-${target}.tar.gz"
curl -fL --retry 3 -o "$archive" "$BASE/$archive"
curl -fsSL --retry 3 -o SHA256SUMS "$BASE/SHA256SUMS"
if command -v sha256sum >/dev/null 2>&1; then
grep " ${archive}\$" SHA256SUMS | sha256sum -c -
else
grep " ${archive}\$" SHA256SUMS | shasum -a 256 -c -
fi
rm -rf "deoos-${VERSION}-${target}"
tar -xzf "$archive"
python3 -m venv .venv
. .venv/bin/activate
python -m pip install --disable-pip-version-check "deoos-${VERSION}-${target}/python/"*.whl
"deoos-${VERSION}-${target}/bin/deoos-server" --version
python -m deoos --help
mkdir -p deoos-node-app
(
cd deoos-node-app
npm init -y
npm install "$PWD/../deoos-${VERSION}-${target}/node/deoos-0.8.0.tgz"
node --input-type=module -e "import { Client } from 'deoos'; console.log(typeof Client)"
)
```
Windows x64, from the same README:
```powershell
$Version = "0.8.0"
$Target = "windows-x64"
$Archive = "deoos-$Version-$Target.tar.gz"
$Base = "https://github.com/deoos-dev/deoos/releases/download/$Version"
$ErrorActionPreference = "Stop"
Invoke-WebRequest -Uri "$Base/$Archive" -OutFile $Archive
Invoke-WebRequest -Uri "$Base/SHA256SUMS" -OutFile SHA256SUMS
$line = Select-String -Path SHA256SUMS -Pattern ([regex]::Escape($Archive)) | Select-Object -First 1
if (-not $line) { throw "SHA256SUMS has no entry for $Archive" }
$expected = ($line.Line -split '\s+')[0].ToLower()
$actual = (Get-FileHash -Algorithm SHA256 -Path $Archive).Hash.ToLower()
if ($actual -ne $expected) { throw "checksum mismatch for $Archive" }
if (Test-Path "deoos-$Version-$Target") { Remove-Item -Recurse -Force "deoos-$Version-$Target" }
tar -xzf $Archive
python -m venv .venv
.\.venv\Scripts\python -m pip install --disable-pip-version-check (Get-Item "deoos-$Version-$Target\python\*.whl").FullName
& ".\deoos-$Version-$Target\bin\deoos-server.exe" --version
.\.venv\Scripts\python -m deoos --help
New-Item -ItemType Directory -Force deoos-node-app | Out-Null
Push-Location deoos-node-app
npm init -y
npm install (Resolve-Path "..\deoos-$Version-$Target\node\deoos-0.8.0.tgz")
node --input-type=module -e "import { Client } from 'deoos'; console.log(typeof Client)"
Pop-Location
```
Shipped archives are `linux-x64`, `linux-arm64`, `macos-arm64`, `macos-x64`, and `windows-x64`. There is no Windows arm64 archive. Checksums for the archives are at `https://github.com/deoos-dev/deoos/releases/download/0.8.0/SHA256SUMS`.
The archive contains `bin/deoos-server` (or `bin/deoos-server.exe`), the Python wheel, `node/deoos-0.8.0.tgz`, `LICENSE`, `README.md`, `compose.yaml`, and `SHA256SUMS`. For a local server, use `scripts/prepare_local.sh` from deoos-examples. That script starts the `compose.yaml` RustFS service and creates the bucket. The README's server line for a bucket that already exists is:
```sh
DEOOS_STORAGE_BUCKET=my-workflows AWS_REGION=us-east-1 \
ENGINE_BIND=127.0.0.1:7331 ENGINE_TOKEN=your-token \
/path/to/release/bin/deoos-server
```
## Your own application
Workers talk to that server with the constructors from the README:
```python
engine = Client.remote("http://127.0.0.1:7331", token="your-token")
```
```javascript
const engine = Client.remote("http://127.0.0.1:7331", "your-token");
```
This Python program is the library-mode sample from the README. It uses a cloud bucket and region, not the local RustFS endpoint above:
```python
from deoos import Client
with Client(bucket="my-workflows", region="us-east-1") as engine:
def greet(ctx, inputs):
return ctx.step("greeting", lambda: f"Hello, {inputs['name']}!")
engine.submit("greeting-001", "greet", {"name": "World"})
engine.run_once({"greet": greet})
print(engine.view("greeting-001"))
```
The TypeScript sample from the same section:
```typescript
import { Client } from "deoos";
const engine = new Client({bucket: "my-workflows", region: "us-east-1"});
await engine.submit("greeting-002", "greet", {name: "World"});
await engine.runOnce({greet: async (ctx, inputs) =>
ctx.step("greeting", () => `Hello, ${inputs.name}!`)
});
console.log(await engine.view("greeting-002"));
```
`run_once` / `runOnce` polls once. `run_worker` / `runWorker` is the continuous worker. Reusing a task id with the same handler and inputs returns the same task. A different definition on that id conflicts.
## CLI and MCP
Release 0.8.0 CLI commands are `list`, `info`, `mcp`, `inspect`, `history`, `summary`, `explain`, `retry`, `cancel`, `schedule`, `submit`, `signal`, and `feedback`. `submit`, `signal`, and `feedback` are in the 0.8.0 wheel.
`python -m deoos mcp` serves MCP over stdio. Default tools are `task_list`, `task_summary`, `task_history`, and `feedback`. `--allow-actions` adds `task_submit`, `task_signal`, `task_retry`, and `task_cancel`. The action tools do not run a worker. The README registers it like this for a git checkout:
```json
{
"mcpServers": {
"deoos": {
"command": "python",
"args": ["-m", "deoos", "mcp", "--allow-actions"],
"env": {"ENGINE_URL": "http://127.0.0.1:7331", "PYTHONPATH": "clients/python"}
}
}
}
```
From a published install, drop `PYTHONPATH` and run `python` from the virtualenv that has the wheel. This quickstart's server was started with `ENGINE_TOKEN=dev-token`, so add `"ENGINE_TOKEN": "dev-token"` to that env. `CURSOR_AGENT`, `CLAUDECODE`, `CODEX`, `DEOOS_AGENT=1`, or `--agent` selects agent mode: one JSON line on stdout and progress on stderr. `DEOOS_AGENT=0` keeps the human layout.
## Feedback
Release 0.8.0 has a feedback command. When the error text is wrong, a tool is missing, or a run failed in a way the docs do not explain:
```sh
python -m deoos feedback --tried "what you tried" --happened "what happened"
```
With `GITHUB_TOKEN` or `GH_TOKEN`, that files a GitHub issue in `deoos-dev/deoos` labeled `agent-feedback`. Without a token it prints a prefilled issue URL. Optional `--repro` is sent only when you set it. Secret-like text is refused unless you pass `--include-secrets`. The report is the text you pass, the deoos version, and whether the engine responded. The same action is the MCP tool `feedback`. Existing reports are the [agent-feedback issues](github.com/deoos-dev/deoos/issues?q=label%3Aagent-feedback).
## Troubleshooting
The error text names the next command. Stable codes and the fix for each one are in the [error catalog](/errors). Each code has an anchor, such as [/errors#STORAGE_CREDENTIALS](/errors#STORAGE_CREDENTIALS) and [/errors#ENGINE_WRONG_URL](/errors#ENGINE_WRONG_URL). Cases from [agents/SKILL.md](github.com/deoos-dev/deoos/blob/main/agents/SKILL.md):
- `cannot reach engine` — the server is not running, or `ENGINE_URL` is wrong. Start it with the command in Start the server and RustFS, then export `ENGINE_URL=http://127.0.0.1:7331`. `make dev` is the command in a clone of deoos, not in the release archive.
- `authentication required` — set `ENGINE_TOKEN` to the token the server was started with. This page uses `dev-token`.
- `task ... not found` — `python -m deoos list`, or submit that id.
- `invalid task id` or `invalid name` — use 1-128 ASCII letters, digits, `.`, `_`, or `-`. `.` and `..` are not names.
- `only failed or cancelled tasks can be retried` — inspect the status. Waiting work resumes when a worker polls after its signal or timer.
- `cannot signal a terminal task` — the task already finished. Retry it first if it failed or was cancelled, or submit a new id.
- `task changed since inspection` — read the revision again and retry with that revision.
- `task ID already used with different definition` — resubmit the same handler and inputs, or choose a new id.
- `protocol_version 3 required` — upgrade the SDK so it matches the server. `info` prints `"protocol_version": 3` when they match.
Install and local setup:
- `pip install deoos` and `npm install deoos` do not install this project. Use the release archive.
- `ensurepip is not available` — Debian and Ubuntu split `venv` out of the Python package. `python3 -m venv` prints that and tells you to install `python3-venv`. GitHub Actions' `setup-python` already includes it.
- `No 0.8.0 build for <os> <arch>` — the shipped targets are `linux-x64`, `linux-arm64`, `macos-arm64`, `macos-x64`, and `windows-x64`.
- `SHA256SUMS has no entry` or a checksum mismatch — download the archive and `SHA256SUMS` again. The check is the `grep` line in the install block.
- `RustFS did not become ready on port 19000` — Docker did not start the image from `compose.yaml`. Ports `19000` and `19001` have to be free on `127.0.0.1`.
- `DEOOS_MODE=server requires ENGINE_URL` — export `ENGINE_URL`, or unset `DEOOS_MODE` and set `ENGINE_URL`.
- `DEOOS_MODE=library ignores ENGINE_URL` — unset `ENGINE_URL`, or set `DEOOS_MODE=server`.
- `bucket or DEOOS_STORAGE_BUCKET is required for library mode` — source `scripts/prepare_local.sh` from bash in that shell, or set `ENGINE_URL` for server mode.
- `DEOOS_STORAGE_BUCKET required` — `deoos-server` was started in a shell that did not source `scripts/prepare_local.sh`. The server has to inherit the exports from that script.
- Sourcing `prepare_local.sh` from `sh` or `zsh` fails on `BASH_SOURCE`. Run it from bash.
## More workflows
[deoos-examples](github.com/deoos-dev/deoos-examples) has crash-and-resume workflows on the same RustFS and `deoos-server`. From the clone, after RustFS is up:
```sh
docker compose run --build --rm hacker-news
```
That command is the one in the examples README and the deoos README. The release itself is [deoos 0.8.0](github.com/deoos-dev/deoos/releases/tag/0.8.0). The agent skill is [agents/SKILL.md](github.com/deoos-dev/deoos/blob/main/agents/SKILL.md).