Skip to content

Commit

Permalink
Merge branch 'master' into autogpt/integrate-re-arch
Browse files Browse the repository at this point in the history
  • Loading branch information
Pwuts authored Sep 21, 2023
2 parents c1494ba + 3f8088b commit c14762a
Show file tree
Hide file tree
Showing 181 changed files with 134,067 additions and 2,133 deletions.
1 change: 0 additions & 1 deletion .github/workflows/autogpts-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ jobs:
run: |
sh run &
sleep 20
URL=http://127.0.0.1:8000 bash -c "$(curl -fsSL https://raw.githubusercontent.com/AI-Engineers-Foundation/agent-protocol/main/testing_suite/test.sh)"
poetry run agbenchmark --mock
poetry run agbenchmark --test=WriteFile
env:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/benchmark-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,5 +127,9 @@ jobs:
echo "Running the following command: ${prefix}agbenchmark --test=WriteFile"
${prefix}agbenchmark --test=WriteFile
sh run_benchmark &
cd ../../benchmark
poetry install
poetry run pytest tests
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
42 changes: 42 additions & 0 deletions .github/workflows/build-frontend.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Build and Commit Frontend
on:
push:
branches:
- master
paths:
- 'frontend/**'
jobs:
build:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v2
- name: Setup Flutter
uses: subosito/flutter-action@v1
with:
flutter-version: '3.13.2'
- name: Build Flutter Web
run: |
cd frontend
flutter build web --base-href /app/
- name: Set branch name
id: vars
run: echo "::set-output name=branch::frontend_build_${GITHUB_SHA}"
- name: Commit and Push
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add frontend/build/web
git commit -m "Update frontend build" -a
git checkout -b ${{ steps.vars.outputs.branch }}
echo "Commit hash: ${GITHUB_SHA}"
git push origin ${{ steps.vars.outputs.branch }}
# - name: Create Pull Request
# uses: peter-evans/create-pull-request@v3
# with:
# title: "Update frontend build"
# body: "This PR updates the frontend build."
# branch: ${{ steps.vars.outputs.branch }}
# base: "master"
20 changes: 20 additions & 0 deletions .github/workflows/repo-stats.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: github-repo-stats

on:
schedule:
# Run this once per day, towards the end of the day for keeping the most
# recent data point most meaningful (hours are interpreted in UTC).
- cron: "0 23 * * *"
workflow_dispatch: # Allow for running this manually.

jobs:
j1:
name: github-repo-stats
runs-on: ubuntu-latest
steps:
- name: run-ghrs
# Use latest release.
uses: jgehrcke/github-repo-stats@RELEASE
with:
ghtoken: ${{ secrets.ghrs_github_api_token }}

1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ __pycache__/

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
Expand Down
23 changes: 1 addition & 22 deletions CLI-USAGE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## CLI Documentation

This document describes how to interact with the project's CLI (Command Line Interface). It includes the types of outputs you can expect from each command. Before launching the frontend, ensure that an agent is already running. Note that the `agents stop` command will terminate any process running on port 8000.
This document describes how to interact with the project's CLI (Command Line Interface). It includes the types of outputs you can expect from each command. Note that the `agents stop` command will terminate any process running on port 8000.

### 1. Entry Point for the CLI

Expand All @@ -21,7 +21,6 @@ Options:
Commands:
agents Commands to create, start and stop agents
benchmark Commands to start the benchmark and list tests and categories
frontend Starts the frontend
setup Installs dependencies needed for your system.
```

Expand Down Expand Up @@ -181,23 +180,3 @@ Displays the details of the 'TestWriteFile' benchmark test.
```

Displays the results of the benchmark tests on 'my_agent'.

### 5. Frontend Command

```sh
./run frontend
```

**Output**:

```
Agent is running.
Launching frontend
... (more details about the launch process)
```

Launches the frontend, with debugging and service details mentioned.

---

Remember to start an agent before launching the frontend and that the `agents stop` command terminates any process on port 8000.
155 changes: 155 additions & 0 deletions QUICKSTART.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
# Quickstart Guide

Welcome to the Quickstart Guide! This guide will walk you through the process of setting up and running your own AutoGPT agent. Whether you're a seasoned AI developer or just starting out, this guide will provide you with the necessary steps to jumpstart your journey in the world of AI development with AutoGPT.

## System Requirements

This project supports Linux (Debian based), Mac, and Windows Subsystem for Linux (WSL). If you are using a Windows system, you will need to install WSL. You can find the installation instructions for WSL [here](https://learn.microsoft.com/en-us/windows/wsl/).


## Getting Setup
1. **Fork the Repository**
To fork the repository, follow these steps:
- Navigate to the main page of the repository.

![Repository](docs/content/imgs/quickstart/001_repo.png)
- In the top-right corner of the page, click Fork.

![Creat Fork UI](docs/content/imgs/quickstart/002_fork.png)
- On the next page, select your GitHub account to create the fork under.
- Wait for the forking process to complete. You now have a copy of the repository in your GitHub account.

2. **Clone the Repository**
To clone the repository, you need to have Git installed on your system. If you don't have Git installed, you can download it from [here](https://git-scm.com/downloads). Once you have Git installed, follow these steps:
- Open your terminal.
- Navigate to the directory where you want to clone the repository.
- Run the git clone command for the fork you just created

![Clone the Repository](docs/content/imgs/quickstart/003_clone.png)

- Then open your project in your ide

![Open the Project in your IDE](docs/content/imgs/quickstart/004_ide.png)

4. **Setup the Project**
Next we need to setup the required dependencies. We have a tool for helping you do all the tasks you need to on the repo.
It can be accessed by running the `run` command by typing `./run` in the terminal.

The first command you need to use is `./run setup` This will guide you through the process of settin up your system.
Intially you will get instructions for installing flutter, chrome and setting up your github access token like the following image:

> Note: for advanced users. The github access token is only needed for the ./run arena enter command so the system can automatically create a PR

![Setup the Project](docs/content/imgs/quickstart/005_setup.png)

You can keep running the commaand to get feedback on where you are up to with your setup.
When setup has been completed, the command will return an output like this:

![Setup Complete](docs/content/imgs/quickstart/006_setup_complete.png)

## Creating Your Agent

Now setup has been completed its time to create your agent template.
Do so by running the `./run agent create YOUR_AGENT_NAME` replacing YOUR_AGENT_NAME with a name of your choice. Examples of valid names: swiftyosgpt or SwiftyosAgent or swiftyos_agent

![Create an Agent](docs/content/imgs/quickstart/007_create_agent.png)

Upon creating your agent its time to offically enter the Arena!
Do so by running `./run arena enter YOUR_AGENT_NAME`

![Enter the Arena](docs/content/imgs/quickstart/008_enter_arena.png)

> Note: for adavanced yours, create a new branch and create a file called YOUR_AGENT_NAME.json in the arena directory. Then commit this and create a PR to merge into the main repo. Only single file entries will be permitted. The json file needs the following format.
```json
{
"github_repo_url": "https://github.com/Swiftyos/YourAgentName",
"timestamp": "2023-09-18T10:03:38.051498",
"commit_hash_to_benchmark": "ac36f7bfc7f23ad8800339fa55943c1405d80d5e",
"branch_to_benchmark": "master"
}
```
- github_repo_url: the url to your fork
- timestamp: timestamp of the last update of this file
- commit_hash_to_benchmark: the commit hash of your entry. You update each time you have an something ready to be offically entered into the hackathon
- branch_to_benchmark: the branch you are using to develop your agent on, default is master.


## Running your Agent

Your agent can started using the `./run agent start YOUR_AGENT_NAME`

This start the agent on `http://localhost:8000/`

![Start the Agent](docs/content/imgs/quickstart/009_start_agent.png)

The frontend can be accessed from `http://localhost:8000/`, you will first need to login using either a google account or your github account.

![Login](docs/content/imgs/quickstart/010_login.png)

Upon logging in you will get a page that looks something like this. With your task history down the left hand side of the page and the 'chat' window to send tasks to your agent.

![Login](docs/content/imgs/quickstart/011_home.png)

When you have finished with your agent, or if you just need to restart it, use Ctl-C to end the session then you can re-run the start command.

If you are having issues and want to ensure the agent has been stopped there is a `./run agent stop` command which will kill the process using port 8000, which should be the agent.

## Benchmarking your Agent

The benchmarking system can also be accessed using the cli too:

```bash
agpt % ./run benchmark
Usage: cli.py benchmark [OPTIONS] COMMAND [ARGS]...

Commands to start the benchmark and list tests and categories

Options:
--help Show this message and exit.

Commands:
categories Benchmark categories group command
start Starts the benchmark command
tests Benchmark tests group command
agpt % ./run benchmark categories
Usage: cli.py benchmark categories [OPTIONS] COMMAND [ARGS]...

Benchmark categories group command

Options:
--help Show this message and exit.

Commands:
list List benchmark categories command
agpt % ./run benchmark tests
Usage: cli.py benchmark tests [OPTIONS] COMMAND [ARGS]...

Benchmark tests group command

Options:
--help Show this message and exit.

Commands:
details Benchmark test details command
list List benchmark tests command
```

The benchmark has been split into different categories of skills you and test your agent on. You can see what categories are available with
```bash
./run benchmark categories list
# And what tests are available with
./run benchmark tests list
```

![Login](docs/content/imgs/quickstart/012_tests.png)


Finally you can run the benchmark with

```bash
./run benchmark start YOUR_AGENT_NAME

```

>
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Want to build your own groundbreaking agent using AutoGPT? 🛠️ Fork this rep

**Forge your future!** The `forge` is your innovation lab. All the boilerplate code is already handled, letting you channel all your creativity into building a revolutionary agent. It's more than a starting point, it's a launchpad 🚀 for your ideas.

📘 [Learn More](https://github.com/Significant-Gravitas/Auto-GPT/tree/master/forge)
📘 [Learn More](https://github.com/Significant-Gravitas/Auto-GPT/tree/master/autogpts/forge)

### 🎯 the Benchmark

Expand Down
2 changes: 1 addition & 1 deletion autogpts/autogpt/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ CMD []

# dev build -> include everything
FROM autogpt-base as autogpt-dev
RUN poetry install --no-root
RUN poetry install --no-root --without benchmark
ONBUILD COPY . ./

# release build -> include bare minimum
Expand Down
Loading

0 comments on commit c14762a

Please sign in to comment.