Serve and run your Waldiez flows in isolated environments and stream logs/input/output via Redis
Project description
Waldiez Runner
Run your Waldiez flows in isolated environments and stream AG2 logs/input/output via Redis.
Overview
Waldiez Runner enables executing flows in isolated Python virtual environments or containers, with full I/O streaming via Redis and task management via FastAPI + Taskiq.
Backed by:
- FastAPI for the HTTP API
- Taskiq for async task queuing and scheduling
- Redis for messaging and log/input/output streaming
- PostgreSQL for task and client persistence
- Waldiez + ag2 + FastStream for defining, executing, and streaming interactive flows in isolation
Getting Started
Follow these steps to get Waldiez Runner up and running in your development environment.
🐳 Quickstart (Docker/Podman Compose)
To launch the full development stack (API + Redis + Postgres + Nginx):
!!!Note This could take some minutes on the first run, as it installs all dependencies.
docker compose -f compose.dev.yaml up --build
This setup includes:
- API server (waldiez-runner)
- Redis + PostgreSQL
- Taskiq worker + scheduler
- Nginx reverse proxy
- A simple static example in
examples/html
Once started, you can access:
- Static example UI: http://localhost
- API: http://localhost/docs (Swagger UI)
!!!Note Alternatively, you can open this project in VS Code with Dev Containers enabled — it uses most of the services (not nginx) via .devcontainer/compose.yaml.
🔑 Authenticating with the API or Example UI
When the server starts, it automatically generates a clients.json file in the project root.
This file contains two API clients:
- One for the
clients-apiaudience (managing clients) - One for the
tasks-apiaudience (creating and interacting with tasks)
You'll need the tasks-api credentials to:
- Use the Swagger UI (try out endpoints under
/api/v1/tasks) - Submit tasks via curl or HTTP clients
- Use the example UI at http://localhost
!!!INFO
On the example page, you’ll be asked to paste the base URL, client ID, and secret.
Use the values from clients.json (specifically the tasks-api entry).
🔐 See Clients & Authentication for more details.
🧪 Local Mode (Advanced)
You can also run the server without any external dependencies (Redis/Postgres):
- SQLite for storage
- FakeRedis for message streams
make dev-no-reload
!!!Warning Do expect limitations in this mode, [Fake]Redis messages might not work as expected.
Or manually (what make dev-no-reload does):
# drop all tables and remove the .env file if it exists
python scripts/drop.py
# switch to local mode if not already
python scripts/toggle.py --mode local
# make sure the .env file is created and the database is initialized
python scripts/pre_start.py --dev
# make sure the first two Clients are created
python scripts/initial_data.py --dev
# start the server, the broker and the scheduler
python -m waldiez_runner --trusted-origins http://localhost:3000,http://localhost:8000 --trusted-hosts localhost --debug --no-force-ssl --no-redis --no-postgres --dev --all
You can now either use the Swagger UI at http://localhost:8000/docs or you can also serve the example on another port terminal:
cd examples/plain
python -m http.server 3000
Calling python -m http.server will start a simple HTTP server on port 3000, serving the files in the current directory.
You can now access the example UI at http://localhost:3000.
📤 Submitting and Managing Tasks
Once the server is running, you can create and interact with tasks:
-
Submit a task by uploading a
.waldiezfile via:- the example UI at http://localhost
- or the Swagger UI at http://localhost/docs (
POST /api/v1/tasks)
-
Monitor task progress via:
- the Swagger
GET /api/v1/tasks/{task_id} - or the WebSocket endpoint
/ws/{task_id}(see WebSocket)
- the Swagger
-
Send input if the task requests it:
- Use the input box in the example UI
- Or call
POST /api/v1/tasks/{task_id}/input
-
Cancel or delete tasks using:
POST /api/v1/tasks/{task_id}/cancelDELETE /api/v1/tasks/{task_id}
You can explore all available routes via the interactive API docs at /docs.
Contributors ✨
Thanks goes to these wonderful people (emoji key):
Panagiotis Kasnesis 📆 🔬 |
Lazaros Toumanidis 💻 |
Stella Ioannidou 📣 🎨 |
Amalia Contiero 💻 🐛 |
Christos Chatzigeorgiou 💻 |
||
|
|
||||||
This project follows the all-contributors specification. Contributions of any kind welcome!
License
This project is licensed under the Apache License, Version 2.0 (Apache-2.0).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file waldiez_runner-0.5.4.tar.gz.
File metadata
- Download URL: waldiez_runner-0.5.4.tar.gz
- Upload date:
- Size: 99.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
330a8ebbdda67c8c4875b55993990185cacaf9b88d555b7f5c4aea1e3799ff64
|
|
| MD5 |
0f954ea1d0110f0d55031be158699d00
|
|
| BLAKE2b-256 |
be1900ac74cadadf6be6a997d267876eaa031a606f2cd5b01d1dba535f3a74de
|
Provenance
The following attestation bundles were made for waldiez_runner-0.5.4.tar.gz:
Publisher:
publish.yaml on waldiez/runner
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
waldiez_runner-0.5.4.tar.gz -
Subject digest:
330a8ebbdda67c8c4875b55993990185cacaf9b88d555b7f5c4aea1e3799ff64 - Sigstore transparency entry: 304896763
- Sigstore integration time:
-
Permalink:
waldiez/runner@93cdcb341ed81efe2c184a04d2cbb82b103577fd -
Branch / Tag:
refs/tags/v0.5.4 - Owner: https://github.com/waldiez
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@93cdcb341ed81efe2c184a04d2cbb82b103577fd -
Trigger Event:
push
-
Statement type:
File details
Details for the file waldiez_runner-0.5.4-py3-none-any.whl.
File metadata
- Download URL: waldiez_runner-0.5.4-py3-none-any.whl
- Upload date:
- Size: 150.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
90b24c93b71bad47280824a590e23936890677017425229303db90e1335c3e0e
|
|
| MD5 |
01ca5aebabd013d8d6b8a1ad5a00bf89
|
|
| BLAKE2b-256 |
da601aa4de0a4ca2290ba3e05de2e0afd9010bd116b6cb6128b28928a77fe467
|
Provenance
The following attestation bundles were made for waldiez_runner-0.5.4-py3-none-any.whl:
Publisher:
publish.yaml on waldiez/runner
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
waldiez_runner-0.5.4-py3-none-any.whl -
Subject digest:
90b24c93b71bad47280824a590e23936890677017425229303db90e1335c3e0e - Sigstore transparency entry: 304896778
- Sigstore integration time:
-
Permalink:
waldiez/runner@93cdcb341ed81efe2c184a04d2cbb82b103577fd -
Branch / Tag:
refs/tags/v0.5.4 - Owner: https://github.com/waldiez
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@93cdcb341ed81efe2c184a04d2cbb82b103577fd -
Trigger Event:
push
-
Statement type: