-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0ff31f6
commit d0c0cf8
Showing
2 changed files
with
40 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,53 +3,68 @@ | |
OrchestrAI is a Python-based system that orchestrates interactions between multiple instances of OpenAI's GPT-4 model to execute complex tasks. It uses the `networkx` library to manage dependencies between various AI modules, and YAML to define and manage task pipelines. | ||
|
||
A couple of things to bear in mind | ||
1. Autonomous Agents are still toys, and you're likely to come across several issues, breaks and associated problems the more complex your pipeline / task is. | ||
2. This project aims to demonstrate a scalable framework for experimenting with autonomous agents. Instead of a fixed execution order, OrchestrAI offers flexibility to define and compare variations of strategies and settings, to find the best approach for your use case. | ||
3. Be nice to your agents, or you might regret it later. | ||
- Autonomous Agents are still toys, and you're likely to come across several issues, breaks and associated problems the more complex your pipeline / task is. | ||
- This project aims to demonstrate a scalable framework for experimenting with autonomous agents. Instead of a fixed execution order, OrchestrAI offers flexibility to define and compare variations of strategies and settings, to find the best approach for your use case. | ||
- Be nice to your agents, or you might regret it later. | ||
|
||
## Getting Started | ||
<hr> | ||
|
||
Watch this demo video to see how you can build a low-code autonomous agent in 2 minutes. | ||
You'll be asked for your OpenAI API key, which will be stored locally. | ||
|
||
https://github.com/samshapley/OrchestrAI/assets/93387313/293f0419-76db-42d5-8fce-c9630ee56ad0 | ||
1. Clone the repo | ||
```bash | ||
git clone [email protected]:samshapley/OrchestrAI.git | ||
``` | ||
|
||
Snippet of using the in-built engineer_pipeline to create a working pygame then asking for modifications. | ||
2. Move into the directory | ||
```bash | ||
cd OrchestrAI | ||
``` | ||
|
||
https://github.com/samshapley/OrchestrAI/assets/93387313/f161591a-edbd-42f0-847c-3264da59ed2e | ||
3. Install the requirements | ||
```bash | ||
pip3 install -r requirements.txt | ||
``` | ||
|
||
### Prerequisites | ||
4. Run the agent | ||
```bash | ||
python3 agent.py | ||
``` | ||
|
||
To run OrchestrAI, you'll need: | ||
Straight out of the box, this will load the 'engineering_pipeline' Agent. | ||
You can adjust this in the config.yml. | ||
Read and watch below to learn how to create your own custom agents. | ||
|
||
- Python 3.7 or later | ||
- OpenAI Python library | ||
- networkx | ||
- PyYAML | ||
## Getting Started | ||
|
||
- wandb | ||
- matplotlib | ||
Watch this demo video to see how you can build a low-code autonomous agent in 2 minutes. | ||
|
||
Install these with pip: | ||
https://github.com/samshapley/OrchestrAI/assets/93387313/293f0419-76db-42d5-8fce-c9630ee56ad0 | ||
|
||
```bash | ||
pip install -r requirements.txt | ||
``` | ||
Snippet of using the in-built engineer_pipeline to create a working pygame then asking for modifications. | ||
|
||
https://github.com/samshapley/OrchestrAI/assets/93387313/f161591a-edbd-42f0-847c-3264da59ed2e | ||
|
||
### Configuration | ||
|
||
OrchestrAI requires the following files: | ||
|
||
- `agent.py` - Run the script and the specified pipeline. | ||
- `config.yml` - Configure the OpenAI API key, default model parameters, and pipeline to be executed. Also choose whether to enable wandb logging. | ||
- `config.yml` - Default model parameters, and pipeline to be executed. Also choose whether to enable wandb logging. | ||
- `ai.py` - Manages interactions with the OpenAI API. | ||
- `modules.py` - Contains available modules and their logic. | ||
- `tools` - Folder containing available tools and their logic. | ||
- `orchestrate.py` - Loads modules and pipelines, constructs a Directed Acyclic Graph (DAG) of operations, and executes them in the correct order. | ||
- `codebase_manager.py` - Manages the generated codebase. Extraction of code from responses, alongside codebase update and compression. | ||
- `tool_manager.py` - Manages the tools available to the agent. | ||
- `helpers.py` - Provides helper functions. | ||
|
||
We store pipeline.yml files in the pipelines folder. This allows you to create multiple pipelines for different tasks. You can specify which pipeline the agent runs in the config.yml file. | ||
|
||
Agents run pipelines -> pipelines orchestrate modules -> modules make LLM calls and use tools. | ||
Agents run Pipelines. | ||
-> Pipelines orchestrate Modules. | ||
-> Modules make LLM calls. | ||
-> LLM's use tools, | ||
|
||
## Modules | ||
|
||
|
@@ -123,7 +138,6 @@ Create a new one within the `tools` folder, and add the selection logic to `tool | |
|
||
### Running the Script | ||
|
||
Ensure that you've added your OpenAI API key to `config.yml`. | ||
You can toggle wandb logging, tools, and openai defaults in the config.yml file. | ||
|
||
To run OrchestrAI, execute `agent.py`: | ||
|
@@ -211,6 +225,8 @@ def new_module(prompt): | |
|
||
6. Run `orchestrate.py` to execute your new pipeline. | ||
|
||
You can repeat this process in a similar fashion to create new tools. | ||
|
||
The modularity of OrchestrAI makes it easy to add new AI capabilities as needed for your use case. Simply define the interface in `modules.py` and `pipeline.yml`, and OrchestrAI will automatically coordinate and execute the new module. | ||
|
||
## Logging with Weights and Biases | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters