Skip to main content

Make AI Agents Collaborate: Drag, Drop, and Orchestrate with Waldiez.

Project description

Waldiez

CI Build Coverage Status PyPI version npm 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

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 needed to convert or run flows (that functionality is handled by the Python package).

Quick install:

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
  • 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 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
    

See also

Contributors ✨

Thanks goes to these wonderful people (emoji key):

Panagiotis Kasnesis
Panagiotis Kasnesis

📆 🔬
Stella Ioannidou
Stella Ioannidou

📣 🎨
Lazaros Toumanidis
Lazaros Toumanidis

💻
Add your contributions

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


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.4.5.tar.gz (111.0 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.4.5-py3-none-any.whl (184.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: waldiez-0.4.5.tar.gz
  • Upload date:
  • Size: 111.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for waldiez-0.4.5.tar.gz
Algorithm Hash digest
SHA256 94ff163def3feba4e23cbe04b255ed2499605caf1388781aaee5818610c1f94b
MD5 c7fd65ecf0e99f7e0d9bf39f9de23706
BLAKE2b-256 5d9c1517d62b1dd56c93887677df5e96774454335a2d1532f6007d83685dd8f8

See more details on using hashes here.

Provenance

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

Publisher: publish.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.4.5-py3-none-any.whl.

File metadata

  • Download URL: waldiez-0.4.5-py3-none-any.whl
  • Upload date:
  • Size: 184.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for waldiez-0.4.5-py3-none-any.whl
Algorithm Hash digest
SHA256 a63e86869daa2211593e25a012770e5474c99bb0feca6d0f53dcb45d2b2ecbc8
MD5 b48d8bb40432c67dc6314a3375bc1a17
BLAKE2b-256 e15a06dc50a4e943261519e98e3fe8f5db54aeaea92b2ccffa3f2a82c0e5489a

See more details on using hashes here.

Provenance

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

Publisher: publish.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