Make AG2 Agents Collaborate: Drag, Drop, and Orchestrate with Waldiez.
Project description
Waldiez
Make AG2 Agents Collaborate: Drag, Drop, and Orchestrate with Waldiez
Design AI Agents and translate a Waldiez flow to AG2:
Features
- Convert .waldiez flows to .py or .ipynb
- Run a .waldiez flow
- Store the runtime logs of a flow to csv for further analysis
Installation
Python
On PyPI:
python -m pip install waldiez
From the repository:
python -m pip install git+https://github.com/waldiez/waldiez.git
React Component
If you’re looking for the React component, please refer to README.npm.
Note: The React component is only for creating and editing flows — it is not used for converting or running flows (that functionality is handled by the Python package).
To add the waldiez library to your app:
npm install @waldiez/react
# or
yarn add @waldiez/react
# or
pnpm add @waldiez/react
# or
bun add @waldiez/react
Usage
UI Options
- For creating-only (no exporting or running) waldiez flows, you can use the playground at https://waldiez.github.io.
- There is also a jupyterlab extension here: waldiez/jupyter
- You also can use the vscode extension:
- Finally, you can use waldiez-studio, which includes a FastAPI app to handle the conversion and running of waldiez flows.
The jupyterlab extension and waldiez studio are also provided as extras in the main package.
pip install waldiez[studio] # or pip install waldiez_studio
pip install waldiez[jupyter] # or pip install waldiez_jupyter
# or both
pip install waldiez[studio,jupyter]
CLI
# Convert a Waldiez flow to a python script or a jupyter notebook
waldiez convert --file /path/to/a/flow.waldiez --output /path/to/an/output/flow[.py|.ipynb]
# Convert and run the script, optionally force generation if the output file already exists
waldiez run --file /path/to/a/flow.waldiez --output /path/to/an/output/flow[.py|.ipynb] [--force]
Using docker/podman
🪟 Windows (PowerShell with Docker or Podman Desktop)
$hostInputFile = "C:\Users\YourName\Documents\flow.waldiez"
$containerInputFile = "/home/waldiez/workspace/flow.waldiez"
$hostOutputDir = "C:\Users\YourName\Documents\waldiez_output"
$containerOutputDir = "/home/waldiez/output"
$containerOutputFile = "/home/waldiez/output/flow.ipynb"
# Convert a flow to Jupyter Notebook
docker run --rm `
-v "$hostInputFile:$containerInputFile" `
-v "$hostOutputDir:$containerOutputDir" `
waldiez/waldiez convert --file $hostInputFile --output $containerOutputFile
# Convert and run it
docker run --rm `
-v "$flow:/home/waldiez/workspace/flow.waldiez" `
-v "$output:/output" `
waldiez/waldiez run --file $hostInputFile --output $containerOutputFile
Note If using Hyper-V mode, make sure your files are in a shared folder Docker Desktop has access to.
More info: https://docs.docker.com/desktop/settings/windows/#file-sharing
🐧 Linux/macOS/WSL (Docker or Podman)
CONTAINER_COMMAND=docker # or podman
# Assuming ./flow.waldiez exists
HOST_INPUT="$(pwd)/flow.waldiez"
CONTAINER_INPUT="/home/waldiez/workspace/flow.waldiez"
HOST_OUTPUT_DIR="$(pwd)/output"
CONTAINER_OUTPUT_DIR="/home/waldiez/output"
mkdir -p ${HOST_OUTPUT_DIR}
# Convert a flow to a Python script
$CONTAINER_COMMAND run --rm \
-v ${HOST_INPUT}:${CONTAINER_INPUT} \
-v ${HOST_OUTPUT_DIR}:${CONTAINER_OUTPUT_DIR} \
waldiez/waldiez convert --file $HOST_INPUT --output ${CONTAINER_OUTPUT_DIR}/flow.py
# Convert to a Jupyter Notebook instead
$CONTAINER_COMMAND run --rm \
-v ${HOST_INPUT}:${CONTAINER_INPUT} \
-v ${HOST_OUTPUT_DIR}:${CONTAINER_OUTPUT_DIR} \
waldiez/waldiez convert --file $HOST_INPUT --output ${CONTAINER_OUTPUT_DIR}/flow.ipynb
# Convert and run it (force override generated file if it exists)
$CONTAINER_COMMAND run --rm -it \
-v ${HOST_INPUT}:${CONTAINER_INPUT} \
-v ${HOST_OUTPUT_DIR}:${CONTAINER_OUTPUT_DIR} \
waldiez/waldiez run --file $HOST_INPUT --force
As a library
Generate a script or a notebook from a flow
# Export a Waldiez flow to a python script or a jupyter notebook
from pathlib import Path
from waldiez import WaldiezExporter
flow_path = "/path/to/a/flow.waldiez"
output_path = "/path/to/an/output.py" # or .ipynb
exporter = WaldiezExporter.load(Path(flow_path))
exporter.export(output_path)
Run a flow
# Run a flow
from pathlib import Path
from waldiez import WaldiezRunner
flow_path = "/path/to/a/flow.waldiez"
output_path = "/path/to/an/output.py"
runner = WaldiezRunner.load(Path(flow_path))
runner.run(output_path=output_path)
Known Conflicts
-
autogen-agentchat: This package conflicts with
ag2. Ensure thatautogen-agentchatis uninstalled before installingwaldiez. If you have already installedautogen-agentchat, you can uninstall it with the following command:pip uninstall autogen-agentchat -y
If already installed waldiez you might need to reinstall it after uninstalling
autogen-agentchat:pip install --force --no-cache waldiez ag2
See also
- Waldiez Playground
- React Component
- Waldiez Studio
- Waldiez JupyterLab Extension
- Waldiez VSCode Extension
Contributors ✨
Thanks goes to these wonderful people (emoji key):
|
Panagiotis Kasnesis 📆 🔬 |
Lazaros Toumanidis 💻 |
Stella Ioannidou 📣 🎨 |
Amalia Contiero 💻 🐛 |
Christos Chatzigeorgiou 💻 |
||
|
Kunal Mhaske 🐛 |
||||||
|
|
||||||
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-0.6.11.tar.gz.
File metadata
- Download URL: waldiez-0.6.11.tar.gz
- Upload date:
- Size: 311.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8fd416caf6cc33d563fcf54c6f2731f43907f93e912434ec216037a2fe96c20a
|
|
| MD5 |
a122ca624c0c49dfd77c0deec1d4cfd7
|
|
| BLAKE2b-256 |
d4e0955edcdb5b05360faef055d04e3ada54666c61fa38f3c851daed07356f8d
|
Provenance
The following attestation bundles were made for waldiez-0.6.11.tar.gz:
Publisher:
publish.yaml on waldiez/waldiez
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
waldiez-0.6.11.tar.gz -
Subject digest:
8fd416caf6cc33d563fcf54c6f2731f43907f93e912434ec216037a2fe96c20a - Sigstore transparency entry: 761902282
- Sigstore integration time:
-
Permalink:
waldiez/waldiez@0acd08e77cf9f5c027dbea8205aba1fcdc2d8632 -
Branch / Tag:
refs/tags/v0.6.11 - Owner: https://github.com/waldiez
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@0acd08e77cf9f5c027dbea8205aba1fcdc2d8632 -
Trigger Event:
push
-
Statement type:
File details
Details for the file waldiez-0.6.11-py3-none-any.whl.
File metadata
- Download URL: waldiez-0.6.11-py3-none-any.whl
- Upload date:
- Size: 465.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f17c5723992987d711e35aa7901dd5de6803db52a7abd79d4671189466af933c
|
|
| MD5 |
1ea505c399b4c92d49029ffd4f8473a2
|
|
| BLAKE2b-256 |
de82deff0cb710459afece4fd2a5b87fdbb0802a5e1ff7ed63d6a02f5487c2e1
|
Provenance
The following attestation bundles were made for waldiez-0.6.11-py3-none-any.whl:
Publisher:
publish.yaml on waldiez/waldiez
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
waldiez-0.6.11-py3-none-any.whl -
Subject digest:
f17c5723992987d711e35aa7901dd5de6803db52a7abd79d4671189466af933c - Sigstore transparency entry: 761902292
- Sigstore integration time:
-
Permalink:
waldiez/waldiez@0acd08e77cf9f5c027dbea8205aba1fcdc2d8632 -
Branch / Tag:
refs/tags/v0.6.11 - Owner: https://github.com/waldiez
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@0acd08e77cf9f5c027dbea8205aba1fcdc2d8632 -
Trigger Event:
push
-
Statement type: