waldiez
Project description
Waldiez
Translate a Waldiez flow:
To a python script or a jupyter notebook with the corresponding ag2 agents and chats.
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
On PyPI:
python -m pip install waldiez
From the repository:
python -m pip install git+https://github.com/waldiez/python.git
Usage
UI Options
- For creating-only (no exporting or running) waldiez flows, you can use the playground at https://waldiez.github.io. The repo for the js library is here.
- There is also a jupyterlab extension here
- 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] [--force]
Using docker/podman
CONTAINER_COMMAND=docker # or podman
# pull the image
$CONTAINER_COMMAND pull waldiez/waldiez
# Convert a Waldiez flow to a python script or a jupyter notebook
$CONTAINER_COMMAND run \
--rm \
-v /path/to/a/flow.waldiez:/flow.waldiez \
-v /path/to/an/output:/output \
waldiez/waldiez convert --file /flow.waldiez --output /output/flow[.py|.ipynb] [--force]
# with selinux and/or podman, you might get permission (or file not found) errors, so you can try:
$CONTAINER_COMMAND run \
--rm \
-v /path/to/a/flow.waldiez:/flow.waldiez \
-v /path/to/an/output:/output \
--userns=keep-id \
--security-opt label=disable \
waldiez/waldiez convert --file /flow.waldiez --output /output/flow[.py|.ipynb] [--force]
# Convert and run the script
$CONTAINER_COMMAND run \
--rm \
-v /path/to/a/flow.waldiez:/flow.waldiez \
-v /path/to/an/output:/output \
waldiez/waldiez run --file /flow.waldiez --output /output/output[.py]
As a library
Export a flow
# Export a Waldiez flow to a python script or a jupyter notebook
from waldiez import WaldiezExporter
flow_path = "/path/to/a/flow.waldiez"
output_path = "/path/to/an/output.py" # or .ipynb
exporter = WaldiezExporter.load(flow_path)
exporter.export(output_path)
Run a flow
# Run a flow
from waldiez import WaldiezRunner
flow_path = "/path/to/a/flow.waldiez"
output_path = "/path/to/an/output.py"
runner = WaldiezRunner.load(flow_path)
runner.run(output_path=output_path)
Tools
Known Conflicts
-
autogen-agentchat: This package conflicts with
ag2/pyautogen. 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 pyautogen
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.3.1.tar.gz.
File metadata
- Download URL: waldiez-0.3.1.tar.gz
- Upload date:
- Size: 93.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4cc88323450b7a37b7c50a5a60f7b58efb54b3300761a0934942313d200c6787
|
|
| MD5 |
d011700f43372293c393fce82dc8ad98
|
|
| BLAKE2b-256 |
83a991463c1ff67c2fa0aa9133dd358170da6dff8320b5b0da456130f7810754
|
Provenance
The following attestation bundles were made for waldiez-0.3.1.tar.gz:
Publisher:
release.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.3.1.tar.gz -
Subject digest:
4cc88323450b7a37b7c50a5a60f7b58efb54b3300761a0934942313d200c6787 - Sigstore transparency entry: 164097162
- Sigstore integration time:
-
Permalink:
waldiez/waldiez@8ef51186eb5c6f8f0cf2f454751114e7d1a9e872 -
Branch / Tag:
refs/tags/v0.3.1 - Owner: https://github.com/waldiez
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@8ef51186eb5c6f8f0cf2f454751114e7d1a9e872 -
Trigger Event:
push
-
Statement type:
File details
Details for the file waldiez-0.3.1-py3-none-any.whl.
File metadata
- Download URL: waldiez-0.3.1-py3-none-any.whl
- Upload date:
- Size: 155.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d407d6d627a0cebaf2ac499e8829950c167adac727b914cfbd8d9ba99f465474
|
|
| MD5 |
9983235b61533c182d929ddfcd90c227
|
|
| BLAKE2b-256 |
a63e404e106c04b3633b9e1cb9548613dcb231963634222ad79010ec1d1a3493
|
Provenance
The following attestation bundles were made for waldiez-0.3.1-py3-none-any.whl:
Publisher:
release.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.3.1-py3-none-any.whl -
Subject digest:
d407d6d627a0cebaf2ac499e8829950c167adac727b914cfbd8d9ba99f465474 - Sigstore transparency entry: 164097164
- Sigstore integration time:
-
Permalink:
waldiez/waldiez@8ef51186eb5c6f8f0cf2f454751114e7d1a9e872 -
Branch / Tag:
refs/tags/v0.3.1 - Owner: https://github.com/waldiez
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@8ef51186eb5c6f8f0cf2f454751114e7d1a9e872 -
Trigger Event:
push
-
Statement type: