agent-generator


Nameagent-generator JSON
Version 0.1.2 PyPI version JSON
download
home_pageNone
SummaryTurn plain‑English requirements into fully‑configured multi‑agent AI teams (CrewAI, LangGraph, ReAct, WatsonX Orchestrate).
upload_time2025-07-23 10:13:14
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9
licenseCopyright 2025 ruslanmv.com Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
keywords llm crew-ai langchain multi-agent orchestrate watsonx-ai
VCS
bugtrack_url
requirements pydantic typer jinja2 requests rich structlog fastapi uvicorn pyyaml
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 🔧 agent‑generator

*From one plain‑English sentence to a production‑ready multi‑agent workflow.*

[![PyPI Version](https://img.shields.io/pypi/v/agent-generator.svg)](https://pypi.org/project/agent-generator/)
[![Python 3.9+](https://img.shields.io/pypi/pyversions/agent-generator.svg)](https://pypi.org/project/agent-generator/)
[![CI Status](https://github.com/ruslanmv/agent-generator/actions/workflows/ci.yml/badge.svg)](https://github.com/ruslanmv/agent-generator/actions/workflows/ci.yml)
[![Documentation](https://img.shields.io/static/v1?label=docs&message=mkdocs&color=blue&logo=mkdocs)](https://ruslanmv.github.io/agent-generator/)
[![License Apache-2.0](https://img.shields.io/badge/license-Apache%202.0-blue)](https://github.com/ruslanmv/agent-generator/blob/master/LICENSE)


---

## ✨ Why agent‑generator?

Designing multi‑agent systems is powerful yet verbose—boilerplate, framework quirks, deployment plumbing.  
`agent‑generator` turns intent (“*I need an AI team that …*”) into runnable artefacts:

| Output                             | Where it runs                             |
|------------------------------------|-------------------------------------------|
| **Python scripts** for CrewAI, CrewAI Flow, LangGraph, ReAct | Any Python 3.9+ environment |
| **YAML skill** for WatsonX Orchestrate | IBM WatsonX Orchestrate |
| **FastAPI MCP server** (wrapper)    | MCP Gateway / Kubernetes |
| **JSON spec + Mermaid/DOT**         | Docs, audits, architecture diagrams |

---

## 🚀 Features

| Category            | Details                                                                                       |
|---------------------|------------------------------------------------------------------------------------------------|
| **Multi‑framework** | WatsonX Orchestrate · CrewAI · CrewAI Flow · LangGraph · ReAct                                  |
| **Provider‑agnostic** | IBM WatsonX *(default)* · OpenAI *(extra)*                                                   |
| **MCP integration** | Python outputs include a FastAPI `/invoke` endpoint ready for MCP Gateway registration         |
| **Web UI (Flask)**  | Form‑based generator with live diagram preview & code download                                 |
| **Cost estimator**  | Token counts & USD approximation before you run the prompt                                    |
| **Pluggable**       | Add providers / frameworks via a single subclass & registry                                    |
| **Typed models**    | Pydantic schemas for Agents · Tasks · Workflow                                                 |
| **CI / CD**         | Ruff · Mypy · Pytest in GitHub Actions + automatic PyPI publish                                |
| **Docker‑ready**    | Alpine image with Gunicorn server                                                              |

---

## 📦 Installation

```bash
# Core (WatsonX only)
pip install agent-generator

# + OpenAI provider
pip install "agent-generator[openai]"

# + Flask Web UI and dev tools
pip install "agent-generator[dev,web]"
````

*Requires Python ≥ 3.9.*

---

## ⚡ Quick Start

### 1 Export WatsonX credentials (or put them in .env)

```bash
export WATSONX_API_KEY=...
export WATSONX_PROJECT_ID=...
export WATSONX_URL=https://us-south.ml.cloud.ibm.com
export AGENTGEN_PROVIDER=watsonx                   
````

---

### 2 Generate a **WatsonX Orchestrate YAML** skill

```bash
agent-generator "I need a research assistant that summarises papers" --framework watsonx_orchestrate 
```
![](assets/2025-07-22-00-50-38.png)

or

```bash
agent-generator \
  "I need a research assistant that summarises papers" \
  --framework watsonx_orchestrate \
  --output research_assistant.yaml
```
You will get

```bash
✓ Written to research_assistant.yaml
```

*Import the resulting `research_assistant.yaml` via:*

```bash
orchestrate agents import -f research_assistant.yaml
```

---

### 3 Generate a **CrewAI Python** skill with MCP wrapper
```bash
agent-generator \
  "I need a research assistant that summarises papers" \
  --framework crewai  
```
![](assets/2025-07-22-00-59-33.png)

or

```bash
agent-generator \
  "I need a research assistant that summarises papers" \
  --framework crewai --mcp \
  --output research_team.py
```

```bash
✓ Written to research_team.py
```

#### 4 Run the Python skill locally

```bash
python research_team.py          # one‑off execution
python research_team.py serve    # FastAPI /invoke on :8080
```

---

## 🖥 CLI Reference

```text
agent-generator [OPTIONS] "requirement sentence"
```

| Option / Flag        | Default          | Description                                                      |
| -------------------- | ---------------- | ---------------------------------------------------------------- |
| `-f, --framework` \* | —                | watsonx\_orchestrate · crewai · crewai\_flow · langgraph · react |
| `-p, --provider`     | watsonx          | watsonx (default) \| openai                                      |
| `--model`            | provider default | Override LLM model                                               |
| `--mcp / --no-mcp`   | off              | Append FastAPI MCP wrapper (Python only)                         |
| `-o, --output PATH`  | stdout           | Write artefact to file                                           |
| `--dry-run`          |                  | Build spec & code skeleton, no LLM calls                         |
| `--show-cost`        |                  | Print token usage + USD estimate                                 |

*See the full [Usage guide](./docs/usage.md) for examples.*

---

## 🌐 Web UI

```bash
FLASK_APP=agent_generator.web FLASK_ENV=development flask run
```



Navigate to **[http://localhost:5000](http://localhost:5000)** → fill the form → generate → download code/YAML.

![](assets/2025-07-22-01-24-31.png)

Deployed via Docker:

```bash
docker build -t agent-genenerator .
docker run -e WATSONX_API_KEY=... -p 8000:8000 agent-genenerator
```
![](assets/2025-07-22-01-26-31.png)
---

## 🛠 Extending

* **New provider** → subclass `BaseProvider`, register in `providers/__init__.py`.
* **New framework** → subclass `BaseFrameworkGenerator`, register in `frameworks/__init__.py`.
  The MCP wrapper is added automatically for any Python output.

---

## 🧑‍💻 Development

```bash
git clone https://github.com/ruslanmv/agent-generator.git
cd agent-generator
pip install -e ".[dev,web,openai]"
pre-commit install
make lint test
mkdocs serve        # live docs
```

## Documentation

[https://ruslanmv.com/agent-generator/](https://ruslanmv.com/agent-generator/)


---

## 🗺️ Roadmap

* Azure OpenAI provider
* MCP Gateway dashboard helper
* VS Code “Generate agent” command
* Real‑time collaborative flow editor

---

## 📄 License

**Apache License, Version 2.0** © 2025 Ruslan M. V. – contributions are welcome, PRs + issues encouraged!

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "agent-generator",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "LLM, crew-ai, langchain, multi-agent, orchestrate, watsonx-ai",
    "author": null,
    "author_email": "\"Ruslan M. V.\" <contact@ruslanmv.com>",
    "download_url": "https://files.pythonhosted.org/packages/db/fc/f43ad28242fe1d2d29a595243833dcc132f1d41d4989bc09bae4f3de9e5f/agent_generator-0.1.2.tar.gz",
    "platform": null,
    "description": "# \ud83d\udd27\u00a0agent\u2011generator\n\n*From one plain\u2011English sentence to a production\u2011ready multi\u2011agent workflow.*\n\n[![PyPI Version](https://img.shields.io/pypi/v/agent-generator.svg)](https://pypi.org/project/agent-generator/)\n[![Python 3.9+](https://img.shields.io/pypi/pyversions/agent-generator.svg)](https://pypi.org/project/agent-generator/)\n[![CI Status](https://github.com/ruslanmv/agent-generator/actions/workflows/ci.yml/badge.svg)](https://github.com/ruslanmv/agent-generator/actions/workflows/ci.yml)\n[![Documentation](https://img.shields.io/static/v1?label=docs&message=mkdocs&color=blue&logo=mkdocs)](https://ruslanmv.github.io/agent-generator/)\n[![License Apache-2.0](https://img.shields.io/badge/license-Apache%202.0-blue)](https://github.com/ruslanmv/agent-generator/blob/master/LICENSE)\n\n\n---\n\n## \u2728\u00a0Why agent\u2011generator?\n\nDesigning multi\u2011agent systems is powerful yet verbose\u2014boilerplate, framework quirks, deployment plumbing.  \n`agent\u2011generator` turns intent (\u201c*I need an AI team that\u00a0\u2026*\u201d) into runnable artefacts:\n\n| Output                             | Where it runs                             |\n|------------------------------------|-------------------------------------------|\n| **Python scripts**\u00a0for CrewAI, CrewAI\u00a0Flow, LangGraph, ReAct | Any Python\u00a03.9+ environment |\n| **YAML skill**\u00a0for WatsonX\u00a0Orchestrate | IBM\u00a0WatsonX\u00a0Orchestrate |\n| **FastAPI MCP server**\u00a0(wrapper)    | MCP\u00a0Gateway\u00a0/ Kubernetes |\n| **JSON spec\u00a0+ Mermaid/DOT**         | Docs, audits, architecture diagrams |\n\n---\n\n## \ud83d\ude80\u00a0Features\n\n| Category            | Details                                                                                       |\n|---------------------|------------------------------------------------------------------------------------------------|\n| **Multi\u2011framework** | WatsonX\u00a0Orchestrate \u00b7 CrewAI \u00b7 CrewAI\u00a0Flow \u00b7 LangGraph \u00b7 ReAct                                  |\n| **Provider\u2011agnostic** | IBM\u00a0WatsonX\u00a0*(default)* \u00b7 OpenAI *(extra)*                                                   |\n| **MCP integration** | Python outputs include a FastAPI `/invoke` endpoint ready for MCP\u00a0Gateway registration         |\n| **Web\u00a0UI (Flask)**  | Form\u2011based generator with live diagram preview & code download                                 |\n| **Cost estimator**  | Token counts & USD approximation before you run the prompt                                    |\n| **Pluggable**       | Add providers / frameworks via a single subclass & registry                                    |\n| **Typed models**    | Pydantic schemas for Agents \u00b7 Tasks \u00b7 Workflow                                                 |\n| **CI / CD**         | Ruff \u00b7 Mypy \u00b7 Pytest in GitHub\u00a0Actions + automatic PyPI publish                                |\n| **Docker\u2011ready**    | Alpine image with Gunicorn server                                                              |\n\n---\n\n## \ud83d\udce6\u00a0Installation\n\n```bash\n# Core (WatsonX only)\npip install agent-generator\n\n# + OpenAI provider\npip install \"agent-generator[openai]\"\n\n# + Flask Web\u00a0UI and dev tools\npip install \"agent-generator[dev,web]\"\n````\n\n*Requires Python\u00a0\u2265\u202f3.9.*\n\n---\n\n## \u26a1\u00a0Quick\u00a0Start\n\n### 1\u00a0Export\u202fWatsonX\u202fcredentials (or put them in\u00a0.env)\n\n```bash\nexport WATSONX_API_KEY=...\nexport WATSONX_PROJECT_ID=...\nexport WATSONX_URL=https://us-south.ml.cloud.ibm.com\nexport AGENTGEN_PROVIDER=watsonx                   \n````\n\n---\n\n### 2\u202fGenerate a **WatsonX\u00a0Orchestrate YAML** skill\n\n```bash\nagent-generator \"I need a research assistant that summarises papers\" --framework watsonx_orchestrate \n```\n![](assets/2025-07-22-00-50-38.png)\n\nor\n\n```bash\nagent-generator \\\n  \"I need a research assistant that summarises papers\" \\\n  --framework watsonx_orchestrate \\\n  --output research_assistant.yaml\n```\nYou will get\n\n```bash\n\u2713\u00a0Written to research_assistant.yaml\n```\n\n*Import the resulting `research_assistant.yaml` via:*\n\n```bash\norchestrate agents import -f research_assistant.yaml\n```\n\n---\n\n### 3\u202fGenerate a **CrewAI Python** skill with MCP wrapper\n```bash\nagent-generator \\\n  \"I need a research assistant that summarises papers\" \\\n  --framework crewai  \n```\n![](assets/2025-07-22-00-59-33.png)\n\nor\n\n```bash\nagent-generator \\\n  \"I need a research assistant that summarises papers\" \\\n  --framework crewai --mcp \\\n  --output research_team.py\n```\n\n```bash\n\u2713\u00a0Written to research_team.py\n```\n\n#### 4\u202fRun the Python skill locally\n\n```bash\npython research_team.py          # one\u2011off execution\npython research_team.py serve    # FastAPI /invoke on :8080\n```\n\n---\n\n## \ud83d\udda5\u00a0CLI Reference\n\n```text\nagent-generator [OPTIONS] \"requirement sentence\"\n```\n\n| Option / Flag        | Default          | Description                                                      |\n| -------------------- | ---------------- | ---------------------------------------------------------------- |\n| `-f, --framework`\u202f\\* | \u2014                | watsonx\\_orchestrate \u00b7 crewai \u00b7 crewai\\_flow \u00b7 langgraph \u00b7 react |\n| `-p, --provider`     | watsonx          | watsonx\u00a0(default) \\| openai                                      |\n| `--model`            | provider default | Override LLM model                                               |\n| `--mcp / --no-mcp`   | off              | Append FastAPI MCP wrapper (Python only)                         |\n| `-o, --output PATH`  | stdout           | Write artefact to file                                           |\n| `--dry-run`          |                  | Build spec & code skeleton, no LLM calls                         |\n| `--show-cost`        |                  | Print token usage + USD estimate                                 |\n\n*See the full [Usage guide](./docs/usage.md) for examples.*\n\n---\n\n## \ud83c\udf10\u00a0Web\u00a0UI\n\n```bash\nFLASK_APP=agent_generator.web FLASK_ENV=development flask run\n```\n\n\n\nNavigate to **[http://localhost:5000](http://localhost:5000)** \u2192 fill the form \u2192 generate \u2192 download code/YAML.\n\n![](assets/2025-07-22-01-24-31.png)\n\nDeployed via Docker:\n\n```bash\ndocker build -t agent-genenerator .\ndocker run -e WATSONX_API_KEY=... -p 8000:8000 agent-genenerator\n```\n![](assets/2025-07-22-01-26-31.png)\n---\n\n## \ud83d\udee0\u00a0Extending\n\n* **New provider** \u2192 subclass `BaseProvider`, register in `providers/__init__.py`.\n* **New framework** \u2192 subclass `BaseFrameworkGenerator`, register in `frameworks/__init__.py`.\n  The MCP wrapper is added automatically for any Python output.\n\n---\n\n## \ud83e\uddd1\u200d\ud83d\udcbb\u00a0Development\n\n```bash\ngit clone https://github.com/ruslanmv/agent-generator.git\ncd agent-generator\npip install -e \".[dev,web,openai]\"\npre-commit install\nmake lint test\nmkdocs serve        # live docs\n```\n\n## Documentation\n\n[https://ruslanmv.com/agent-generator/](https://ruslanmv.com/agent-generator/)\n\n\n---\n\n## \ud83d\uddfa\ufe0f\u00a0Roadmap\n\n* Azure\u00a0OpenAI provider\n* MCP\u00a0Gateway dashboard helper\n* VS\u00a0Code \u201cGenerate agent\u201d command\n* Real\u2011time collaborative flow editor\n\n---\n\n## \ud83d\udcc4\u00a0License\n\n**Apache License, Version 2.0** \u00a9\u00a02025\u00a0Ruslan\u00a0M.\u00a0V. \u2013 contributions are welcome, PRs + issues encouraged!\n",
    "bugtrack_url": null,
    "license": "Copyright 2025 ruslanmv.com\n        \n        Licensed under the Apache License, Version 2.0 (the \"License\");\n        you may not use this file except in compliance with the License.\n        You may obtain a copy of the License at\n        \n            http://www.apache.org/licenses/LICENSE-2.0\n        \n        Unless required by applicable law or agreed to in writing, software\n        distributed under the License is distributed on an \"AS IS\" BASIS,\n        WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n        See the License for the specific language governing permissions and\n        limitations under the License.",
    "summary": "Turn plain\u2011English requirements into fully\u2011configured multi\u2011agent AI teams (CrewAI, LangGraph, ReAct, WatsonX\u00a0Orchestrate).",
    "version": "0.1.2",
    "project_urls": {
        "Homepage": "https://github.com/ruslanmv/agent-generator",
        "Issues": "https://github.com/ruslanmv/agent-generator/issues",
        "Repository": "https://github.com/ruslanmv/agent-generator"
    },
    "split_keywords": [
        "llm",
        " crew-ai",
        " langchain",
        " multi-agent",
        " orchestrate",
        " watsonx-ai"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "238ddb0988c69be987da83e70ba16ec2fa649df556edaf4aeb6e61fedf42d232",
                "md5": "759b8359b50ee270026ff557274f55f2",
                "sha256": "03f9335bd152f40fccedb6f7155adf72002244797cff481a58a9513d4ca45fd1"
            },
            "downloads": -1,
            "filename": "agent_generator-0.1.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "759b8359b50ee270026ff557274f55f2",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 43709,
            "upload_time": "2025-07-23T10:13:13",
            "upload_time_iso_8601": "2025-07-23T10:13:13.224776Z",
            "url": "https://files.pythonhosted.org/packages/23/8d/db0988c69be987da83e70ba16ec2fa649df556edaf4aeb6e61fedf42d232/agent_generator-0.1.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "dbfcf43ad28242fe1d2d29a595243833dcc132f1d41d4989bc09bae4f3de9e5f",
                "md5": "558f6074455e0007259734508c78e41d",
                "sha256": "d206e8d592d802a1e973ffb549e6bf22a8fccf8d4d0f6f1020da6933af166e6c"
            },
            "downloads": -1,
            "filename": "agent_generator-0.1.2.tar.gz",
            "has_sig": false,
            "md5_digest": "558f6074455e0007259734508c78e41d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 1005347,
            "upload_time": "2025-07-23T10:13:14",
            "upload_time_iso_8601": "2025-07-23T10:13:14.816974Z",
            "url": "https://files.pythonhosted.org/packages/db/fc/f43ad28242fe1d2d29a595243833dcc132f1d41d4989bc09bae4f3de9e5f/agent_generator-0.1.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-23 10:13:14",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ruslanmv",
    "github_project": "agent-generator",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "pydantic",
            "specs": [
                [
                    ">=",
                    "2.6"
                ]
            ]
        },
        {
            "name": "typer",
            "specs": [
                [
                    ">=",
                    "0.12"
                ]
            ]
        },
        {
            "name": "jinja2",
            "specs": [
                [
                    ">=",
                    "3.1"
                ]
            ]
        },
        {
            "name": "requests",
            "specs": [
                [
                    ">=",
                    "2.31"
                ]
            ]
        },
        {
            "name": "rich",
            "specs": [
                [
                    ">=",
                    "13.7"
                ]
            ]
        },
        {
            "name": "structlog",
            "specs": [
                [
                    ">=",
                    "23.2"
                ]
            ]
        },
        {
            "name": "fastapi",
            "specs": [
                [
                    ">=",
                    "0.110"
                ]
            ]
        },
        {
            "name": "uvicorn",
            "specs": [
                [
                    ">=",
                    "0.29"
                ]
            ]
        },
        {
            "name": "pyyaml",
            "specs": [
                [
                    ">=",
                    "6.0"
                ]
            ]
        }
    ],
    "lcname": "agent-generator"
}
        
Elapsed time: 1.05907s