Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New PR from refs/heads/0522-23 on 2023-05-22T17:50:42-04:00 #71

Open
wants to merge 91 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
d96cb85
:wastebasket: Cleanup dead code
awtkns May 7, 2023
fd8a001
:wastebasket: Cleanup dead code
awtkns May 7, 2023
771e932
:wastebasket: Cleanup dead code
awtkns May 7, 2023
dc2e618
📚 Merge in documentation website
asim-shrestha May 10, 2023
08e35e9
🖼 Delete images
asim-shrestha May 10, 2023
f0c137a
🐋 Put MySQL DB in docker (#492)
asim-shrestha May 10, 2023
e3084b9
:zap: Update README image
awtkns May 10, 2023
c929344
Merge pull request #493 from reworkd/mono_documentation
awtkns May 10, 2023
7d4355b
Mono python migration Main (#498)
asim-shrestha May 10, 2023
ab41047
:bug: Fix setup
awtkns May 10, 2023
135a343
:bug: Fix setup
awtkns May 10, 2023
12c1cbc
:memo: Update docs root folder
awtkns May 10, 2023
a94b0d1
📚 Demonstrate wiki search and tools (#496)
asim-shrestha May 10, 2023
2041ed2
:memo: Update doc build settings
awtkns May 10, 2023
5137ede
Merge remote-tracking branch 'origin/main'
awtkns May 10, 2023
a842653
:memo: Update doc build settings
awtkns May 10, 2023
487f3a8
:memo: Make introduction home page
awtkns May 10, 2023
13c7df0
:bug: Fix doc links
awtkns May 10, 2023
a2347c7
:pencil2: Update documentation links
awtkns May 10, 2023
543f1cf
:pencil2: Add documentation to readme
awtkns May 10, 2023
4b63b6b
:pencil2: Update node version
awtkns May 10, 2023
f49c050
📚 Clarify difference to ChatGPT in docs (#500)
nczempin May 10, 2023
a3fe9df
🔥 Hot reload for frontend (#502)
asim-shrestha May 10, 2023
9e702bc
🔥 Hot reload for frontend (#503)
asim-shrestha May 10, 2023
4e3f9e9
🖥 Enable the ability to switch APIs (#504)
asim-shrestha May 10, 2023
28596c8
Update common.json (#505)
angeousta May 10, 2023
00e8a90
fix env var error (#509)
SnoopyDevelops May 11, 2023
0d7a2b2
:memo: Update README.md
awtkns May 11, 2023
4b0476a
Merge pull request #512 from reworkd/awtkns-patch-4
awtkns May 11, 2023
de40b57
:construction_worker: Add webhook for deployments
awtkns May 11, 2023
2f5b361
Merge remote-tracking branch 'origin/main'
awtkns May 11, 2023
d44099e
Fixed Dockerfile and entrypoint.sh to handle Windows line endings (#514)
lauralex May 11, 2023
de86973
🤖 Update Sponsors (#517)
reworkd-admin May 12, 2023
722426d
Modify Manual Setup (#518)
thame May 12, 2023
65c20d6
💬 Update execution prompt
asim-shrestha May 12, 2023
cff4b93
🔑 Test get server-side key and remove log
asim-shrestha May 12, 2023
6bc9135
🔥 Wait for DB in the backend (#516)
asim-shrestha May 12, 2023
c0dc124
:construction_worker: Add search to docs
awtkns May 12, 2023
43c4b72
:construction_worker: Update action run conditions
awtkns May 12, 2023
a345987
✨ Python tools (#519)
asim-shrestha May 12, 2023
00a6408
Merge branch 'main' into cleanup
awtkns May 12, 2023
402b169
:trash: Cleanup Code
awtkns May 12, 2023
0dafe42
Merge pull request #522 from reworkd/cleanup
awtkns May 12, 2023
dfee5db
🐍 Python serper (#523)
asim-shrestha May 12, 2023
2194dce
📚 Update documentation (#525)
asim-shrestha May 13, 2023
efc478e
🤖 Update Sponsors (#524)
reworkd-admin May 13, 2023
8a9d968
💬 Update start agent prompt (#526)
asim-shrestha May 13, 2023
189a84a
Update README.md
asim-shrestha May 13, 2023
dd46e6d
💬 Fix remove tasks prefix (#528)
asim-shrestha May 14, 2023
d88ddaf
🤖 Update Sponsors (#529)
reworkd-admin May 14, 2023
ad22ecc
💬 Remove leading dot space (#530)
asim-shrestha May 14, 2023
11ed907
Remove client side (#531)
asim-shrestha May 14, 2023
d66ed7e
🌟 Web search default depends on ENV
asim-shrestha May 14, 2023
2d04ddb
🐍Use python as a backend
awtkns May 14, 2023
e7da35a
Update next/src/components/AutonomousAgent.ts
awtkns May 14, 2023
a15ebfe
Merge pull request #535 from reworkd/py-backend
awtkns May 14, 2023
95452d8
🐛 Fix backend
asim-shrestha May 15, 2023
406424a
✨ Update wikipedia
asim-shrestha May 15, 2023
d826939
✨ Update .env.example
asim-shrestha May 15, 2023
df7e046
🐛 Fix heading description
asim-shrestha May 15, 2023
42a4117
✨ Support for custom base URL (#543)
asim-shrestha May 16, 2023
c521ea2
🤖 Update Sponsors (#544)
reworkd-admin May 16, 2023
0f528c0
Update README.md
reworkd-admin May 16, 2023
4bbe4e9
:recycle: Refactor api
awtkns May 16, 2023
d6a07d4
🌟 Helicone integration (#550)
asim-shrestha May 16, 2023
bfe0a95
Revert "🌟 Helicone integration (#550)"
asim-shrestha May 16, 2023
2079dff
🤖 Update Sponsors
awtkns May 17, 2023
8da5ff1
Merge pull request #551 from reworkd/workflow/sponsors
awtkns May 17, 2023
6dfb3d9
Merge pull request #555 from reworkd/api-refactor
awtkns May 17, 2023
8f6ee4f
🤖 Update Sponsors
awtkns May 18, 2023
5bd2726
Update README.md
asim-shrestha May 18, 2023
695b94d
💅 Update styling for chat window buttons (#559)
asim-shrestha May 18, 2023
7349764
💅 Update ChatMessage styling (#560)
asim-shrestha May 18, 2023
f909de8
💅 Center drawer buttons
asim-shrestha May 18, 2023
c310fbe
Merge pull request #556 from reworkd/workflow/sponsors
awtkns May 18, 2023
530b191
🤖 Update Sponsors
awtkns May 19, 2023
2c9b3c8
Merge pull request #546 from reworkd/reworkd-admin-patch-1
awtkns May 19, 2023
250d963
🔗 Update Social Link
awtkns May 19, 2023
b821dc0
Merge remote-tracking branch 'origin/main'
awtkns May 19, 2023
eb46768
Merge pull request #563 from reworkd/workflow/sponsors
awtkns May 19, 2023
ae7a836
:bug: Fix i18n imports
awtkns May 19, 2023
e6d6591
Merge remote-tracking branch 'origin/main'
awtkns May 19, 2023
6facdb1
✨ Update analysis (#566)
asim-shrestha May 20, 2023
e5d3a8c
🛠️ Tools selector (#569)
asim-shrestha May 20, 2023
d716600
:recycle: Clean react-i18n
awtkns May 21, 2023
cda2bab
✨ Sync (#570)
asim-shrestha May 22, 2023
2861df6
🌐 Enable web search by default (#572)
asim-shrestha May 22, 2023
7491662
🐛 Fix "Conclude" task (#574)
asim-shrestha May 22, 2023
d450a1f
Merge remote-tracking branch 'upstream/main' into 0522-23
alexk1919 May 22, 2023
f68b4f6
tweak
alexk1919 May 22, 2023
2eb80f5
Merge branch 'main' into 0522-23
alexk1919 May 22, 2023
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
30 changes: 29 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,18 +1,46 @@
# Deployment Environment:
NODE_ENV=development

# NextJS
NEXT_PUBLIC_BACKEND_URL=http://localhost:8000
PLATFORM_URL=http://host.docker.internal:8000
NEXT_PUBLIC_FORCE_AUTH=false

# Websearch. Fill both of these values to enable it locally. https://serper.dev/ for an API key
NEXT_PUBLIC_WEB_SEARCH_ENABLED=false
SERP_API_KEY=***

# Next Auth config:
# Generate a secret with `openssl rand -base64 32`, or visit https://generate-secret.vercel.app/
NEXTAUTH_SECRET=changeme
NEXTAUTH_URL=http://localhost:3000

# Prisma
# Auth providers. Required to enable sign in, in production. Development mode uses local auth.
GOOGLE_CLIENT_ID=***
GOOGLE_CLIENT_SECRET=***
GITHUB_CLIENT_ID=***
GITHUB_CLIENT_SECRET=***
DISCORD_CLIENT_SECRET=***
DISCORD_CLIENT_ID=***

# Database (Configured through docker-compose)
DATABASE_USER=reworkd_platform
DATABASE_PASSWORD=reworkd_platform
DATABASE_HOST=db
DATABASE_PORT=3306
DATABASE_NAME=reworkd_platform
DATABASE_URL="mysql://${DATABASE_USER}:${DATABASE_PASSWORD}@${DATABASE_HOST}:${DATABASE_PORT}/${DATABASE_NAME}"

# Backend
# Will mock calls to the OpenAI
REWORKD_PLATFORM_FF_MOCK_MODE_ENABLED=false
REWORKD_PLATFORM_OPENAI_API_KEY=changeme
REWORKD_PLATFORM_FRONTEND_URL=http://localhost:3000
REWORKD_PLATFORM_RELOAD=true
REWORKD_PLATFORM_OPENAI_API_BASE="https://api.openai.com/v1"
REWORKD_PLATFORM_SERP_API_KEY=***

# External APIs:
# Used while the backend is still in TypeScript
OPENAI_API_KEY=changeme
OPENAI_API_BASE="https://api.openai.com/v1"
4 changes: 4 additions & 0 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@ name: Node.js CI
on:
push:
branches: ["main"]
paths:
- 'next/**'
pull_request:
branches: ["main"]
paths:
- 'next/**'

jobs:
build:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Testing Platform
on:
push:
branches: [ "main" ]
paths:
- 'platform/**'
# push:
# branches: [ "main" ]
# paths:
# - 'platform/**'
pull_request:
branches: [ "main" ]
paths:
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/webhooks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Invoke Deployment Webhooks
on:
workflow_dispatch:
push:
branches: [ "main" ]

jobs:
invoke:
name: Invoke Webhooks
runs-on: ubuntu-latest
environment: production
if: github.repository == 'alexk1919/MackGPT'
steps:
- name: Trigger Webhooks
run: |
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H ${{ secrets.WEBHOOK_AUTHORIZATION }} \
-H "X-GitHub-Api-Version: 2022-11-28" \
-d '{"ref":"main"}' \
${{ secrets.DEPLOYMENT_WEBHOOK_URL }}
19 changes: 4 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,18 +47,7 @@ It will attempt to reach the goal by thinking of tasks to do, executing them, an


## 🎉 Roadmap

This platform is currently in beta, we are currently working on:

- Long term memory via a vector DB 🧠
- Web browsing capabilities via LangChain 🌐
- Interaction with websites and people 👨‍👩‍👦
- Writing capabilities via a document API 📄
- Saving agent runs 💾
- Users and authentication 🔐
- Stripe integration for a lower limit paid version (So we can stop worrying about infra costs) 💵

More Coming soon...
This platform is currently in beta, a full list of completed and planed features can be found on our [public roadmap](https://docs.reworkd.ai/roadmap).

## 🚀 Tech Stack

Expand All @@ -72,6 +61,7 @@ More Coming soon...
- ✅ **End-to-end typesafe API**: [tRPC](https://trpc.io/).

## 👨‍🚀 Getting Started
✨ For the latest guide, visit our [Setup documentation](https://docs.reworkd.ai/development/setup)

### 🐳 Docker Setup

Expand Down Expand Up @@ -102,7 +92,6 @@ use the provided setup script.
### 🛠️ Manual Setup

> 🚧 You will need [Nodejs +18 (LTS recommended)](https://nodejs.org/en/) installed.

1. Fork this project:

- [Click here](https://github.com/alexk1919/MackGPT/fork).
Expand All @@ -116,7 +105,7 @@ git clone [email protected]:YOU_USER/MackGPT.git
3. Install dependencies:

```bash
cd MackGPT
cd MackGPT/next
npm install
```

Expand All @@ -127,11 +116,11 @@ npm install
```bash
# Deployment Environment:
NODE_ENV=development

# Next Auth config:
# Generate a secret with `openssl rand -base64 32`
NEXTAUTH_SECRET=changeme
NEXTAUTH_URL=http://localhost:3000
NEXT_PUBLIC_BACKEND_URL=http://localhost:3000
DATABASE_URL=file:./db.sqlite
# Your open api key
OPENAI_API_KEY=changeme
Expand Down
11 changes: 8 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ services:
ports:
- "3000:3000"
volumes:
- ./next/.env.docker:/app/.env
- ./db:/app/db
- ./next/.env:/next/.env
- ./next/:/next/
- /next/node_modules
- /next/.next

platform:
container_name: platform
Expand All @@ -27,7 +29,7 @@ services:
environment:
REWORKD_PLATFORM_HOST: 0.0.0.0
REWORKD_PLATFORM_DB_HOST: db
REWORKD_PLATFORM_DB_PORT: "3306"
REWORKD_PLATFORM_DB_PORT: "3307"
REWORKD_PLATFORM_DB_USER: "reworkd_platform"
REWORKD_PLATFORM_DB_PASS: "reworkd_platform"
REWORKD_PLATFORM_DB_BASE: "reworkd_platform"
Expand All @@ -40,11 +42,14 @@ services:
restart: always
build:
context: ./db
ports:
- "3307:3307"
environment:
MYSQL_DATABASE: "reworkd_platform"
MYSQL_USER: "reworkd_platform"
MYSQL_PASSWORD: "reworkd_platform"
MYSQL_ROOT_PASSWORD: "reworkd_platform"
MYSQL_TCP_PORT: 3307
volumes:
- db_data:/var/lib/mysql
command: [ 'mysqld', '--character-set-server=utf8mb4', '--collation-server=utf8mb4_unicode_ci' ]
Expand Down
10 changes: 10 additions & 0 deletions docs/docs/development/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
sidebar_position: 2
hide_table_of_contents: true
---

import DocCardList from "@theme/DocCardList";

# 🖥 Development

<DocCardList />
43 changes: 43 additions & 0 deletions docs/docs/development/prompts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
sidebar_position: 3
---

# 💬 Prompts

Prompts are what we use to dynamically align language model behaviour with the current agent goal / task. We primarily
use `gpt-3.5-turbo` for our agents, and it has shown that its results are **heavily** influenced by the smallest details
of its prompts.

## Getting started with prompting

- [Learn prompting docs](https://learnprompting.org/)
- [Prompt engineering guide](https://www.promptingguide.ai/techniques/consistency)
- [Prompt engineering for developers](https://www.deeplearning.ai/short-courses/chatgpt-prompt-engineering-for-developers/)

## Key terms

- **One shot / two shot / N shot:** You provide 1, 2, N examples alongside your prompt to further increase model
accuracy
- **Zero shot:** You provide a prompt to a model directly (with no examples)

## Techniques in AgentGPT

### Plan and Solve

[Plan and solve (PS)](https://arxiv.org/abs/2305.04091) builds upon chain of thought prompting, a prompting approach
where simply asking a model for step-by-step instructions allows the model to more accurately reason about a problem. PS
is a zero shot approach to increase accuracy in reasoning about abstract goals. In essence, it involves asking the model
to:

1. First understand the problem
2. Extract relevant variables and corresponding values
3. Devise a complete plan, **step by step**

You can learn more through the paper's [GitHub repo](https://github.com/AGI-Edgerunners/Plan-and-Solve-Prompting). We
leverage plan and solve prompting to generate our initial task list when the agent is first run. This technique is
something similar to how BabyAGI operates.

### ReAct

ReAct stands for reasoning + action. It is a prompting technique that interleaves both reasoning and action generation
into a single output, allowing the model to better synergize thoughts with actions.
64 changes: 64 additions & 0 deletions docs/docs/development/setup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
---
sidebar_position: 1
---

# 🛠️ Setup

The following document will help you set up a local installation of AgentGPT.

## Stack

- 💅 Frontend: NextJS + Typescript
- 🐍 Backend: FastAPI + Python
- 📚 DB: MySQL through docker with the option of running SQLite locally

## ENV

Before you can get started, you need to ensure your ENV is correctly configured. To do this, copy over
the [.env.example](https://github.com/reworkd/AgentGPT/blob/main/.env.example) file into the `./next/` directory, rename
it to `.env` and update values as necessary. Some things to note:

- You will need to update the `OPENAI_API_KEY` with your own value. See the [FAQ](/faq) for details
- The DB ENV values are taken from definitions in `./docker-compose.yml`
- To enable web search, set `NEXT_PUBLIC_WEB_SEARCH_ENABLED=true` and use [your own SERP api key](https://serper.dev/)
for `SERP_API_KEY`.

## Using Docker

The docker build is very straightforward and should work out of the box.
Ensure you have docker installed by visiting [their website](https://www.docker.com/). After this, run the following
command:

```bash
docker-compose up --build
```

This will spin up a container for the frontend, backend, and database.

## Developing outside of docker

Outside of docker, you'll need to just configure your ENV. Additionally, you can use `setup.sh` to walkthrough ENV
configuration and also update your Prisma configuration to point to a local SQLite
instance.

After this, you can run the following to set up your Next.js project. We will add additional instructions for the Python
backend when enabled.

```bash
// Frontend
cd ./next
npm install
npm run dev
```

## Running the site

After you have locally built AgentGPT, you can travel to http://localhost:3000/ in your web browser.

## Issues / Additional help

If you're still having trouble, you can follow a legacy guide from
@CybrCo: [How to install AgentGPT locally](https://snapdragon-writer-867.notion.site/How-to-Install-AgentGPT-Locally-9b96b2314c9b491397976249fd121023)

If you still face problems, please submit an [issue on GitHub](https://github.com/reworkd/AgentGPT/issues) or reach out
to the team on [discord](https://discord.gg/jdSBAnmdnY).
Loading