Skip to main content

waldiez

Project description

Waldiez

CI Build Coverage Status PyPI version

Translate a Waldiez flow:

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/waldiez.git

Usage

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]

UI

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.
We are currently working on waldiez-studio to provide a visual interface for creating and running Waldiez flows (you can find more here).
Until then, you can use our Jupyter or the VSCode extension to create and run Waldiez flows.

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 that autogen-agentchat is uninstalled before installing waldiez. If you have already installed autogen-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 MIT License - see the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

waldiez-0.1.19.tar.gz (61.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

waldiez-0.1.19-py3-none-any.whl (97.2 kB view details)

Uploaded Python 3

File details

Details for the file waldiez-0.1.19.tar.gz.

File metadata

  • Download URL: waldiez-0.1.19.tar.gz
  • Upload date:
  • Size: 61.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for waldiez-0.1.19.tar.gz
Algorithm Hash digest
SHA256 af01493b0bc67be54c89805afcf38d711b01bcc0b3401288c8ce483cee6395f0
MD5 676f615b44d468fe9a2f08aeb69597db
BLAKE2b-256 c2cae419e1d58d03e7b77413cbca009632920ac0d732b77d664f9e16f872e19a

See more details on using hashes here.

Provenance

The following attestation bundles were made for waldiez-0.1.19.tar.gz:

Publisher: release.yaml on waldiez/waldiez

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file waldiez-0.1.19-py3-none-any.whl.

File metadata

  • Download URL: waldiez-0.1.19-py3-none-any.whl
  • Upload date:
  • Size: 97.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for waldiez-0.1.19-py3-none-any.whl
Algorithm Hash digest
SHA256 1a0d12ee427a22bb15d94dd6b93f4675f9a1c77392ac51172b171ad80947c343
MD5 b508e4a31a28f5f146e9b2b63b716076
BLAKE2b-256 ae0bdfe518f0c5ca406b079d5d21c7fa4fa29dfe499b3d013bc3f0f710b92eb2

See more details on using hashes here.

Provenance

The following attestation bundles were made for waldiez-0.1.19-py3-none-any.whl:

Publisher: release.yaml on waldiez/waldiez

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page