Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
178 changes: 133 additions & 45 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,92 +1,180 @@
# CrewAI-GUI
crewai frontend gui.
# 🤖 CrewAI-GUI

This is node based gui for crewai frontend. that will export to json for better decoupling.
<div align="center">

![](./frontend.webp)
*A Node-Based Frontend for CrewAI: Revolutionizing AI Workflow Creation*

### video introduce
[https://www.youtube.com/P5tkYJ-AgSc](https://youtu.be/P5tkYJ-AgSc)
![CrewAI-GUI Frontend](./frontend.webp)

### Limitation
[![GitHub stars](https://img.shields.io/github/stars/LangGraph-GUI/CrewAI-GUI.svg?style=for-the-badge&logo=github&color=gold)](https://github.com/LangGraph-GUI/CrewAI-GUI)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg?style=for-the-badge)](https://opensource.org/licenses/MIT)
[![Python 3.7+](https://img.shields.io/badge/python-3.7+-blue.svg?style=for-the-badge&logo=python&logoColor=white)](https://www.python.org/downloads/)

Current node types and slots are limited.
[Features](#-features) • [Installation](#️-installation) • [Usage](#-usage) • [Build](#️-build) • [Documentation](#-documentation) • [Contributing](#-contributing)

Not all crewai var or features have imp the path.
</div>

## Environment
---

### front-end GUI
```
## 🌟 Features

CrewAI-GUI empowers you to create sophisticated AI workflows with ease:

- 🖱️ **Intuitive Node-Based Interface**: Design complex AI agent interactions through a user-friendly drag-and-drop interface
- 🔗 **JSON Export**: Seamlessly export your CrewAI designs to JSON, enhancing modularity and reusability
- 🧠 **Flexible AI Backend**: Full support for both GPT-4 API and Ollama, catering to various AI needs
- 💻 **Cross-Platform Compatibility**: Create AI workflows on Windows, Linux, or macOS with equal efficiency

---

## 🎥 Video Introduction

<div align="center">

[![CrewAI-GUI Introduction](https://img.youtube.com/vi/P5tkYJ-AgSc/0.jpg)](https://www.youtube.com/watch?v=P5tkYJ-AgSc)

*Click to watch our comprehensive video guide*

</div>

---

## 🛠️ Installation

<details>
<summary><b>Frontend GUI</b></summary>

Install the required dependencies:
```bash
pip install PySide6
```
</details>

### back-end
<details>
<summary><b>Backend</b></summary>

* Linux
```
Install the necessary packages:

For Linux:
```bash
pip install 'crewai[tools]' langchain crewai networkx
```

* Windows
without symbol
```
For Windows:
```bash
pip install crewai[tools] langchain crewai networkx
```
</details>

This is crewai's problem

## Usage
---

### front-end GUI
## 🚀 Usage

run
<details>
<summary><b>Frontend GUI</b></summary>

```
Launch the CrewAI-GUI interface:
```bash
python frontend.py
```
and you can read and write json file as DAG graph for crewai.
Create, manipulate, save, and load Directed Acyclic Graph (DAG) structures for CrewAI as JSON files.
</details>

### back-end
<details>
<summary><b>Backend</b></summary>

base on gpt4 api key or ollama
Run the backend with different configurations:

if gpt4 run

```
For GPT-4:
```bash
python backend.py --graph example.json --keys credentials.ini --tee output.log
```

if local run such mistral

```
For Ollama (e.g., Mistral):
```bash
python backend.py --graph example.json --llm mistral --tee output.log
```
it will parse json file into crewai tasks and agents
The backend seamlessly converts JSON files into CrewAI tasks and agents.
</details>

---

## Build
### front-end GUI
remember hook
## 🏗️ Build

```
pip install pyinstaller
<details>
<summary><b>Frontend GUI</b></summary>

Create a standalone executable with PyInstaller:
```bash
pip install pyinstaller
cd src
pyinstaller --onefile --additional-hooks-dir=. frontend.py
```
### back-end
```
</details>

<details>
<summary><b>Backend</b></summary>

Package the backend with cx_Freeze:
```bash
pip install cx_Freeze
cd src
python .\setup-backend.py build
python setup-backend.py build
```
</details>

---

## 📚 Documentation

Explore CrewAI-GUI in-depth with our comprehensive [GitHub Pages Documentation](https://LangGraph-GUI.github.io/CrewAI-GUI/).

---

## 🧪 Examples

Discover real-world applications of CrewAI-GUI in our [example graph source](https://github.com/HomunMage/AI_Agents/blob/main/crewAI/gpt/agents.py).

---

## ⚠️ Limitations

- 🔒 The current version supports a limited set of node types and slots
- 🚧 Some advanced CrewAI variables and features are planned for future releases

---

## 🤝 Contributing

We welcome contributions to CrewAI-GUI! Please refer to our [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines on:
- Submitting pull requests
- Reporting issues
- Requesting new features

Join our community and help shape the future of AI workflow design!

---

## 📄 License

CrewAI-GUI is open-source software, released under the MIT License. For full details, see the [LICENSE](LICENSE) file.

---

## 📬 Contact

Have questions, suggestions, or want to collaborate? [Open an issue](https://github.com/LangGraph-GUI/CrewAI-GUI/issues) on our GitHub repository.

---

<div align="center">

Crafted with ❤️ by the `LangGraph-GUI` Team

<br>

## crewai example
[⬆ Back to Top](#-crewai-gui)

example graph source
</div>

https://github.com/HomunMage/AI_Agents/blob/main/crewAI/gpt/agents.py
<!-- Keywords: CrewAI, GUI, Node-Based Interface, AI Workflows, GPT-4, Ollama, Python, Drag-and-Drop, JSON Export, Cross-Platform, AI Agents, Workflow Automation -->
96 changes: 96 additions & 0 deletions docgen.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
import os
import sys
import shutil
import pdoc
from pathlib import Path

# Add the src directory to the Python path
sys.path.insert(0, os.path.abspath('src'))

def create_docs_folder():
if os.path.exists('docs'):
shutil.rmtree('docs')
os.makedirs('docs')

def copy_non_python_files(src_dir, dest_dir):
for root, dirs, files in os.walk(src_dir):
for file in files:
if not file.endswith('.py'):
src_path = os.path.join(root, file)
rel_path = os.path.relpath(src_path, src_dir)
dest_path = os.path.join(dest_dir, rel_path)
os.makedirs(os.path.dirname(dest_path), exist_ok=True)
shutil.copy2(src_path, dest_path)

def generate_documentation():
# Specify the modules to document
modules = [
'Tee',
'ExecCommandDialog',
'Edge',
'NodeLayout',
'CustomGraphicsView',
'MainWindow',
'WorkFlow',
'file_operations',
'MapView',
'NodeData',
'Node',
'frontend',
'backend'
]

# Generate the documentation
pdoc.pdoc(*modules, output_directory=Path('docs'))

def generate_main_readme():
with open('docs/index.html', 'w') as f:
f.write("""
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CrewAI-GUI Documentation</title>
<style>
body { font-family: Arial, sans-serif; line-height: 1.6; padding: 20px; }
h1 { color: #333; }
ul { padding-left: 20px; }
li { margin-bottom: 10px; }
a { color: #0066cc; text-decoration: none; }
a:hover { text-decoration: underline; }
</style>
</head>
<body>
<h1>CrewAI-GUI Documentation</h1>
<p>This documentation provides an overview of the CrewAI-GUI project structure and components.</p>
<h2>Project Structure</h2>
<ul>
<li><a href="Tee.html">Tee</a></li>
<li><a href="ExecCommandDialog.html">ExecCommandDialog</a></li>
<li><a href="Edge.html">Edge</a></li>
<li><a href="NodeLayout.html">NodeLayout</a></li>
<li><a href="CustomGraphicsView.html">CustomGraphicsView</a></li>
<li><a href="MainWindow.html">MainWindow</a></li>
<li><a href="WorkFlow.html">WorkFlow</a></li>
<li><a href="file_operations.html">file_operations</a></li>
<li><a href="MapView.html">MapView</a></li>
<li><a href="NodeData.html">NodeData</a></li>
<li><a href="Node.html">Node</a></li>
<li><a href="frontend.html">frontend</a></li>
<li><a href="backend.html">backend</a></li>
</ul>
</body>
</html>
""")

# Main execution
if __name__ == "__main__":
create_docs_folder()
generate_documentation()
generate_main_readme()
copy_non_python_files('src', 'docs/src')
copy_non_python_files('example', 'docs/example')
shutil.copy2('CHANGELOG.md', 'docs/CHANGELOG.md')
shutil.copy2('README.md', 'docs/project_README.md')
print("Enhanced HTML documentation generated successfully in the 'docs' folder.")
26 changes: 26 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.4.3] - 2024-06-01
### Feature
- hierarchical with task after topological sort
- red when cursor on item

### Fixed
- cannot remove node
- remove process, use default

## [0.3.2] - 2024-05-31
### Feature
- Make space + left drag to right click drag

### Fixed
- Fixed an issue with node read/write JSON causing duplicate node IDs.

## [0.2.0] - 2024-05-31
### Fixed
- Fixed some syntax errors.
1,232 changes: 1,232 additions & 0 deletions docs/CustomGraphicsView.html

Large diffs are not rendered by default.

812 changes: 812 additions & 0 deletions docs/Edge.html

Large diffs are not rendered by default.

1,237 changes: 1,237 additions & 0 deletions docs/ExecCommandDialog.html

Large diffs are not rendered by default.

1,243 changes: 1,243 additions & 0 deletions docs/MainWindow.html

Large diffs are not rendered by default.

705 changes: 705 additions & 0 deletions docs/MapView.html

Large diffs are not rendered by default.

1,543 changes: 1,543 additions & 0 deletions docs/Node.html

Large diffs are not rendered by default.

766 changes: 766 additions & 0 deletions docs/NodeData.html

Large diffs are not rendered by default.

1,323 changes: 1,323 additions & 0 deletions docs/NodeLayout.html

Large diffs are not rendered by default.

435 changes: 435 additions & 0 deletions docs/Tee.html

Large diffs are not rendered by default.

887 changes: 887 additions & 0 deletions docs/WorkFlow.html

Large diffs are not rendered by default.

326 changes: 326 additions & 0 deletions docs/backend.html

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions docs/example/credentials.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[OpenAI]
api_key = sk-proj-<your_key>

Loading