Metadata-Version: 2.4
Name: waldiez
Version: 0.4.7
Dynamic: Keywords
Summary: Make AG2 Agents Collaborate: Drag, Drop, and Orchestrate with Waldiez.
Project-URL: Homepage, https://waldiez.io
Project-URL: Bug Tracker, https://github.com/waldiez/waldiez/issues
Project-URL: Repository, https://github.com/waldiez/waldiez.git
Author-email: Panagiotis Kasnesis <pkasnesis@waldiez.io>, Lazaros Toumanidis <laztoum@waldiez.io>, Stella Ioannidou <stella@waldiez.io>
License-File: LICENSE
License-File: NOTICE.md
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: <3.14,>=3.10
Requires-Dist: ag2[openai]==0.8.7
Requires-Dist: aiocsv==1.3.2
Requires-Dist: aiofiles==24.1.0
Requires-Dist: aiosqlite==0.21.0
Requires-Dist: asyncer==0.0.8
Requires-Dist: graphviz==0.20.3
Requires-Dist: httpx<1
Requires-Dist: jupytext
Requires-Dist: nest-asyncio==1.6.0
Requires-Dist: numpy<=2.2.5
Requires-Dist: pandas>=2
Requires-Dist: parso==0.8.4
Requires-Dist: pillow>=10.0.0
Requires-Dist: pydantic<3,>=2.10.2
Requires-Dist: typer<0.16,>=0.9
Provides-Extra: ag2-extras
Requires-Dist: ag2[anthropic]==0.8.7; extra == 'ag2-extras'
Requires-Dist: ag2[bedrock]==0.8.7; extra == 'ag2-extras'
Requires-Dist: ag2[cohere]==0.8.7; extra == 'ag2-extras'
Requires-Dist: ag2[gemini]==0.8.7; (sys_platform != 'win32') and extra == 'ag2-extras'
Requires-Dist: ag2[gemini]==0.8.7; (sys_platform == 'win32' and platform_machine != 'arm64' and platform_machine != 'aarch64' and platform_machine != 'ARM64' and platform_machine != 'AARCH64') and extra == 'ag2-extras'
Requires-Dist: ag2[groq]==0.8.7; extra == 'ag2-extras'
Requires-Dist: ag2[interop-crewai]==0.8.7; extra == 'ag2-extras'
Requires-Dist: ag2[interop-langchain]==0.8.7; extra == 'ag2-extras'
Requires-Dist: ag2[lmm]==0.8.7; extra == 'ag2-extras'
Requires-Dist: ag2[mistral]==0.8.7; extra == 'ag2-extras'
Requires-Dist: ag2[neo4j]==0.8.7; (sys_platform != 'win32') and extra == 'ag2-extras'
Requires-Dist: ag2[neo4j]==0.8.7; (sys_platform == 'win32' and platform_machine != 'arm64' and platform_machine != 'aarch64' and platform_machine != 'ARM64' and platform_machine != 'AARCH64') and extra == 'ag2-extras'
Requires-Dist: ag2[ollama]==0.8.7; extra == 'ag2-extras'
Requires-Dist: ag2[together]==0.8.7; (sys_platform != 'win32') and extra == 'ag2-extras'
Requires-Dist: ag2[together]==0.8.7; (sys_platform == 'win32' and platform_machine != 'arm64' and platform_machine != 'aarch64' and platform_machine != 'ARM64' and platform_machine != 'AARCH64') and extra == 'ag2-extras'
Requires-Dist: ag2[websurfer]==0.8.7; extra == 'ag2-extras'
Requires-Dist: beautifulsoup4; extra == 'ag2-extras'
Requires-Dist: chromadb>=0.5.10; (sys_platform != 'win32') and extra == 'ag2-extras'
Requires-Dist: chromadb>=0.5.10; (sys_platform == 'win32' and platform_machine != 'arm64' and platform_machine != 'aarch64' and platform_machine != 'ARM64' and platform_machine != 'AARCH64') and extra == 'ag2-extras'
Requires-Dist: embedchain; (sys_platform != 'win32') and extra == 'ag2-extras'
Requires-Dist: embedchain; (sys_platform == 'win32' and platform_machine != 'arm64' and platform_machine != 'aarch64' and platform_machine != 'ARM64' and platform_machine != 'AARCH64') and extra == 'ag2-extras'
Requires-Dist: google-api-python-client<3.0,>=2.163.0; extra == 'ag2-extras'
Requires-Dist: google-auth-httplib2<0.3,>=0.2.0; extra == 'ag2-extras'
Requires-Dist: google-auth-oauthlib<2.0,>=1.2.1; extra == 'ag2-extras'
Requires-Dist: huggingface-hub; extra == 'ag2-extras'
Requires-Dist: ipython; extra == 'ag2-extras'
Requires-Dist: langchain-community<1,>=0.3.12; extra == 'ag2-extras'
Requires-Dist: markdownify; extra == 'ag2-extras'
Requires-Dist: mcp<1.6,>=1.4.0; extra == 'ag2-extras'
Requires-Dist: pgvector>=0.4.0; extra == 'ag2-extras'
Requires-Dist: protobuf>=4.25.3; extra == 'ag2-extras'
Requires-Dist: psycopg==3.2.6; (sys_platform == 'linux') and extra == 'ag2-extras'
Requires-Dist: psycopg==3.2.6; (sys_platform == 'win32' and platform_machine == 'AARCH64') and extra == 'ag2-extras'
Requires-Dist: psycopg==3.2.6; (sys_platform == 'win32' and platform_machine == 'ARM64') and extra == 'ag2-extras'
Requires-Dist: psycopg==3.2.6; (sys_platform == 'win32' and platform_machine == 'aarch64') and extra == 'ag2-extras'
Requires-Dist: psycopg==3.2.6; (sys_platform == 'win32' and platform_machine == 'arm64') and extra == 'ag2-extras'
Requires-Dist: psycopg>=3.2.6; (sys_platform == 'win32') and extra == 'ag2-extras'
Requires-Dist: psycopg[binary]==3.2.6; (sys_platform != 'linux' and platform_machine != 'arm64' and platform_machine != 'ARM64' and platform_machine != 'aarch64' and platform_machine != 'AARCH64') and extra == 'ag2-extras'
Requires-Dist: psycopg[binary]>=3.2.6; (sys_platform != 'win32') and extra == 'ag2-extras'
Requires-Dist: pydantic-ai>=0.0.21; extra == 'ag2-extras'
Requires-Dist: pymongo>=4.11; extra == 'ag2-extras'
Requires-Dist: pypdf; extra == 'ag2-extras'
Requires-Dist: pysqlite3-binary==0.5.4; (sys_platform == 'linux' and platform_machine != 'arm64' and platform_machine != 'aarch64' and platform_machine != 'ARM64' and platform_machine != 'AARCH64') and extra == 'ag2-extras'
Requires-Dist: qdrant-client[fastembed]; (sys_platform != 'win32') and extra == 'ag2-extras'
Requires-Dist: qdrant-client[fastembed]; (sys_platform == 'win32' and platform_machine != 'arm64' and platform_machine != 'aarch64' and platform_machine != 'ARM64' and platform_machine != 'AARCH64') and extra == 'ag2-extras'
Requires-Dist: sentence-transformers; (sys_platform == 'linux') and extra == 'ag2-extras'
Requires-Dist: wikipedia-api<1.0,>=0.8.1; extra == 'ag2-extras'
Provides-Extra: dev
Requires-Dist: autoflake==2.3.1; extra == 'dev'
Requires-Dist: bandit==1.8.3; extra == 'dev'
Requires-Dist: black[jupyter]==25.1.0; extra == 'dev'
Requires-Dist: flake8==7.2.0; extra == 'dev'
Requires-Dist: hatchling==1.27.0; extra == 'dev'
Requires-Dist: jupyter-server==2.15.0; extra == 'dev'
Requires-Dist: jupyterlab>=4.3.0; extra == 'dev'
Requires-Dist: mypy==1.15.0; extra == 'dev'
Requires-Dist: pandas-stubs==2.2.3.250308; extra == 'dev'
Requires-Dist: pre-commit==4.2.0; extra == 'dev'
Requires-Dist: pydocstyle==6.3.0; extra == 'dev'
Requires-Dist: pylint==3.3.6; extra == 'dev'
Requires-Dist: python-dotenv==1.1.0; extra == 'dev'
Requires-Dist: ruff==0.11.8; extra == 'dev'
Requires-Dist: toml==0.10.2; (python_version <= '3.10') and extra == 'dev'
Requires-Dist: types-pyyaml==6.0.12.20250402; extra == 'dev'
Requires-Dist: types-requests==2.32.0.20250328; extra == 'dev'
Requires-Dist: types-toml==0.10.8.20240310; extra == 'dev'
Requires-Dist: yamllint==1.37.1; extra == 'dev'
Provides-Extra: docs
Requires-Dist: mdx-include==1.4.2; extra == 'docs'
Requires-Dist: mdx-truly-sane-lists==1.3; extra == 'docs'
Requires-Dist: mkdocs-awesome-nav; extra == 'docs'
Requires-Dist: mkdocs-jupyter==0.25.1; extra == 'docs'
Requires-Dist: mkdocs-macros-plugin==1.3.7; extra == 'docs'
Requires-Dist: mkdocs-material==9.6.12; extra == 'docs'
Requires-Dist: mkdocs-minify-html-plugin==0.3.1; extra == 'docs'
Requires-Dist: mkdocs-open-in-new-tab==1.0.8; extra == 'docs'
Requires-Dist: mkdocs==1.6.1; extra == 'docs'
Requires-Dist: mkdocstrings-python==1.16.10; extra == 'docs'
Requires-Dist: mkdocstrings[crystal,python]==0.29.1; extra == 'docs'
Provides-Extra: jupyter
Requires-Dist: jupyter-server==2.15.0; extra == 'jupyter'
Requires-Dist: jupyterlab>=4.3.0; extra == 'jupyter'
Requires-Dist: waldiez-jupyter==0.4.7; extra == 'jupyter'
Provides-Extra: runner
Requires-Dist: waldiez-runner==0.4.7; (python_version >= '3.11') and extra == 'runner'
Provides-Extra: studio
Requires-Dist: waldiez-studio==0.4.7; extra == 'studio'
Provides-Extra: test
Requires-Dist: pytest-asyncio==0.26.0; extra == 'test'
Requires-Dist: pytest-cov==6.1.1; extra == 'test'
Requires-Dist: pytest-html==4.1.1; extra == 'test'
Requires-Dist: pytest-sugar==1.0.0; extra == 'test'
Requires-Dist: pytest-timeout==2.4.0; extra == 'test'
Requires-Dist: pytest-xdist==3.6.1; extra == 'test'
Requires-Dist: pytest==8.3.5; extra == 'test'
Description-Content-Type: text/markdown

# Waldiez

![CI Build](https://github.com/waldiez/python/actions/workflows/main.yaml/badge.svg) [![Coverage Status](https://coveralls.io/repos/github/waldiez/python/badge.svg)](https://coveralls.io/github/waldiez/python) [![PyPI Downloads](https://static.pepy.tech/badge/waldiez)](https://pepy.tech/projects/waldiez) [![PyPI version](https://badge.fury.io/py/waldiez.svg?icon=si%3Apython)](https://badge.fury.io/py/waldiez) [![npm version](https://badge.fury.io/js/@waldiez%2Freact.svg)](https://badge.fury.io/js/@waldiez%2Freact)

## Make AG2 Agents Collaborate: Drag, Drop, and Orchestrate with Waldiez

Design AI Agents and translate a Waldiez flow to AG2:


https://github.com/user-attachments/assets/71d4b8d1-a24b-45ab-ab53-dfc193e8fcaa

To a python script or a jupyter notebook with the corresponding [ag2](https://github.com/ag2ai/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:

```shell
python -m pip install waldiez
```

From the repository:

```shell
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](https://github.com/waldiez/waldiez/blob/main/README.npm.md).

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

```shell
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](https://github.com/waldiez/jupyter)
- You also can use the vscode extension:
  - [repo](https://github.com/waldiez/vscode)
  - [marketplace](https://marketplace.visualstudio.com/items?itemName=Waldiez.waldiez-vscode)
- Finally, you can use [waldiez-studio](https://github.com/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.

```shell
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

```bash
# 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

```shell
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]
```

```shell
# 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

```python
# 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

```python
# 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

- [ag2 (formerly AutoGen)](https://github.com/ag2ai/ag2)
- [juptytext](https://github.com/mwouts/jupytext)
- [pydantic](https://github.com/pydantic/pydantic)
- [typer](https://github.com/fastapi/typer)
- [asyncer](https://github.com/fastapi/asyncer)

## Known Conflicts

- **autogen-agentchat**: This package conflicts with `ag2`. Ensure that `autogen-agentchat` is uninstalled before installing `waldiez`. If you have already installed `autogen-agentchat`, you can uninstall it with the following command:

  ```shell
  pip uninstall autogen-agentchat -y
  ```

  If already installed waldiez you might need to reinstall it after uninstalling `autogen-agentchat`:

  ```shell
  pip install --force --no-cache waldiez ag2
  ```

## See also

- [Waldiez Playground](https://waldiez.github.io)
- [React Component](https://github.com/waldiez/waldiez/blob/main/README.npm.md)
- [Waldiez Studio](https://github.com/waldiez/studio)
- [Waldiez JupyterLab Extension](https://github.com/waldiez/jupyter)
- [Waldiez VSCode Extension](https://github.com/waldiez/vscode)

## Contributors ✨

Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):

<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
<table>
  <tbody>
    <tr>
      <td align="center" valign="top" width="14.28%"><a href="https://scholar.google.com/citations?user=JmW9DwkAAAAJ"><img src="https://avatars.githubusercontent.com/u/29335277?v=4?s=100" width="100px;" alt="Panagiotis Kasnesis"/><br /><sub><b>Panagiotis Kasnesis</b></sub></a><br /><a href="#projectManagement-ounospanas" title="Project Management">📆</a> <a href="#research-ounospanas" title="Research">🔬</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://humancentered.gr/"><img src="https://avatars.githubusercontent.com/u/3456066?v=4?s=100" width="100px;" alt="Stella Ioannidou"/><br /><sub><b>Stella Ioannidou</b></sub></a><br /><a href="#promotion-siioannidou" title="Promotion">📣</a> <a href="#design-siioannidou" title="Design">🎨</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/lazToum"><img src="https://avatars.githubusercontent.com/u/4764837?v=4?s=100" width="100px;" alt="Lazaros Toumanidis"/><br /><sub><b>Lazaros Toumanidis</b></sub></a><br /><a href="https://github.com/waldiez/react/commits?author=lazToum" title="Code">💻</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/amaliacontiero"><img src="https://avatars.githubusercontent.com/u/29499343?v=4?s=100" width="100px;" alt="Amalia Contiero"/><br /><sub><b>Amalia Contiero</b></sub></a><br /><a href="https://github.com/waldiez/vscode/commits?author=amaliacontiero" title="Code">💻</a> <a href="https://github.com/waldiez/vscode/issues?q=author%3Aamaliacontiero" title="Bug reports">🐛</a></td>
    </tr>
  </tbody>
  <tfoot>
    <tr>
      <td align="center" size="13px" colspan="7">
        <img src="https://raw.githubusercontent.com/all-contributors/all-contributors-cli/1b8533af435da9854653492b1327a23a4dbd0a10/assets/logo-small.svg">
          <a href="https://all-contributors.js.org/docs/en/bot/usage">Add your contributions</a>
        </img>
      </td>
    </tr>
  </tfoot>
</table>

<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->

<!-- ALL-CONTRIBUTORS-LIST:END -->

This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!

## License

This project is licensed under the [Apache License, Version 2.0 (Apache-2.0)](https://github.com/waldiez/waldiez/blob/main/LICENSE).
