Code Monkey home page Code Monkey logo

auto-gpt-webui's Introduction

Auto-GPT WebUI

This project is a frontend web application that runs and interacts with Auto-GPT. The backend application provides the core logic and functionality, while this frontend application wraps over it and offers a user-friendly interface.

๐ŸŒŸ Special thanks to the original Auto-GPT project and its creator, Torantulino, for his hard work and for making this project possible! ๐ŸŒŸ


Disclaimer: Limited Availability for Maintenance

Please note that I developed this project primarily for personal amusement and as a learning experience. My availability to address issues, review pull requests, or implement new features may be limited, as I have other full-time commitments.

If you find this project useful and would like to contribute, I welcome and highly appreciate community involvement. ๐Ÿ’›

Thank you for your understanding, and I hope you find this helpful!


๐Ÿ› ๏ธ Installation & Usage

Clone the repo, then enter the root directory and run the folling commands:

npm install
npm run setup-auto-gpt
  • The first command will install the required dependencies.
  • The second command will clone the Auto-GPT repository and install its dependencies.

Run the following command in order to start both the frontend application and the Node.js server, which will in turn start and stop the python script, and inform the frontend of the script's output:

npm start

When you first open up the web app, you will see a few alerts about missing API Keys. You need to fill these in in order for the application to work correctly. Look below for instructions.


โš™ Requirements and Configuration

OpenAI API key

Follow these steps to obtain an OpenAI API key:

  1. Visit the OpenAI Platform website.
  2. If you don't have an account yet, sign up by providing your email, name, and creating a password.
  3. After signing up or logging in, go to the API Keys section in your account.
  4. Click the Create an API key button to generate a new API key.
  5. Copy the API key and paste it in the WebUI to use it with Auto-GPT.
  • โš ๏ธ Keep your API key secure and never share it with anyone. Treat it like a password.

Pinecone API key

Follow these steps to obtain a Pinecone API key:

  1. Visit the Pinecone website.
  2. If you don't have an account yet, sign up by providing your email and creating a password.
  3. After signing up or logging in, go to the Projects page.
  4. Click on the default project, or create a new one if desired.
  5. In the left sidebar, click on the API Keys section.
  6. Create a new API key and copy-paste it in the WebUI to use it with Auto-GPT.
  • โš ๏ธ Keep your API key secure and never share it with anyone. Treat it like a password.

Python environment

You will also need both Python 3.8 or later and Node.js installed on your system.


๐Ÿ›  Tools and Libraries

  • Auto-GPT - As mentioned, the backend logic and the meat of this application is provided by the Auto-GPT project. Check out the repo for more information if you'd like to contribute to or sponsor the project.
  • Turborepo - A high-performance build system and repository organizer for JavaScript and TypeScript codebases.
  • Vite - A build tool and development server for web applications, designed to be fast and lightweight.
  • React - A JavaScript library for building user interfaces, developed and maintained by Facebook.
  • Chakra UI - A simple, modular, and accessible component library for React.
  • Zustand - A lightweight and easy-to-use state management library for React.
  • Express - A fast, unopinionated, minimalist web framework for Node.js.
  • dotenv - A library that loads environment variables from a .env file into your Node.js application.
  • Emotion - A library for CSS-in-JS, allowing you to style your React components using JavaScript.
  • TypeScript - A popular superset of JavaScript that adds static types and other features for better code maintainability.
  • ESLint - A tool for identifying and reporting on patterns found in ECMAScript/JavaScript code.
  • Prettier - A widely-used code formatter that enforces a consistent style by parsing your code and re-printing it with its own rules.

auto-gpt-webui's People

Contributors

bradleymatera avatar choephix avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

auto-gpt-webui's Issues

No connection to Websocket [Docker + Nginx Proxy]

Locally, everything works great (and thank you so much for the work you did, by the way!). But I ran into problems when trying to run it on the server.

I am running the application in the docker + using nginx proxy. It's simple enough and should work. But in the console I see this. And error when adding keys.
Screenshot 2023-04-19 at 6 42 08 PM
In .env I changed the backend address to wss://mysite.com/ws
And the nginx config looks something like this:

location /ws {
    proxy_http_version 1.1;
    proxy_pass http://127.0.0.1:2200;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
    proxy_set_header Host $host;
  }
}

Do you have any idea what could be wrong?
Thanks!

Load Plugin

Could u plz add the plugins load function ?

Start error

(auto_GPTGUI) (base) bogdan@bogdan-Nitro-AN517-53:/media/bogdan/SSD2/proiecte_2023_ubuntu/auto_gpt_webGUI/auto-gpt-webui-main$ npm start

[email protected] start
turbo run start

โ€ข Packages in scope: backend, frontend
โ€ข Running start in 2 packages
โ€ข Remote caching disabled
backend:start: cache miss, executing 9cd29a5f87051bdf
frontend:start: cache miss, executing 7e5f831f5c69084c
backend:start: ERROR: npm v9.6.4 is known not to run on Node.js v12.22.9. This version of npm supports the following node versions: ^14.17.0 || ^16.13.0 || >=18.0.0. You can find the latest version at https://nodejs.org/.
backend:start:
backend:start: ERROR:
backend:start: /media/bogdan/SSD2/proiecte_2023_ubuntu/auto_gpt_webGUI/auto-gpt-webui-main/node_modules/npm/lib/utils/exit-handler.js:19
backend:start: const hasLoadedNpm = npm?.config.loaded
backend:start: ^
backend:start:
backend:start: SyntaxError: Unexpected token '.'
backend:start: at wrapSafe (internal/modules/cjs/loader.js:915:16)
backend:start: at Module._compile (internal/modules/cjs/loader.js:963:27)
backend:start: at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
backend:start: at Module.load (internal/modules/cjs/loader.js:863:32)
backend:start: at Function.Module._load (internal/modules/cjs/loader.js:708:14)
backend:start: at Module.require (internal/modules/cjs/loader.js:887:19)
backend:start: at require (internal/modules/cjs/helpers.js:74:18)
backend:start: at module.exports (/media/bogdan/SSD2/proiecte_2023_ubuntu/auto_gpt_webGUI/auto-gpt-webui-main/node_modules/npm/lib/cli.js:42:23)
backend:start: at Object. (/media/bogdan/SSD2/proiecte_2023_ubuntu/auto_gpt_webGUI/auto-gpt-webui-main/node_modules/npm/bin/npm-cli.js:2:25)
backend:start: at Module._compile (internal/modules/cjs/loader.js:999:30)
frontend:start: ERROR: npm v9.6.4 is known not to run on Node.js v12.22.9. This version of npm supports the following node versions: ^14.17.0 || ^16.13.0 || >=18.0.0. You can find the latest version at https://nodejs.org/.
frontend:start:
frontend:start: ERROR:
frontend:start: /media/bogdan/SSD2/proiecte_2023_ubuntu/auto_gpt_webGUI/auto-gpt-webui-main/node_modules/npm/lib/utils/exit-handler.js:19
frontend:start: const hasLoadedNpm = npm?.config.loaded
frontend:start: ^
frontend:start:
frontend:start: SyntaxError: Unexpected token '.'
frontend:start: at wrapSafe (internal/modules/cjs/loader.js:915:16)
frontend:start: at Module._compile (internal/modules/cjs/loader.js:963:27)
frontend:start: at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
frontend:start: at Module.load (internal/modules/cjs/loader.js:863:32)
frontend:start: at Function.Module._load (internal/modules/cjs/loader.js:708:14)
frontend:start: at Module.require (internal/modules/cjs/loader.js:887:19)
frontend:start: at require (internal/modules/cjs/helpers.js:74:18)
frontend:start: at module.exports (/media/bogdan/SSD2/proiecte_2023_ubuntu/auto_gpt_webGUI/auto-gpt-webui-main/node_modules/npm/lib/cli.js:42:23)
frontend:start: at Object. (/media/bogdan/SSD2/proiecte_2023_ubuntu/auto_gpt_webGUI/auto-gpt-webui-main/node_modules/npm/bin/npm-cli.js:2:25)
frontend:start: at Module._compile (internal/modules/cjs/loader.js:999:30)
backend:start: ERROR: command finished with error: command (/media/bogdan/SSD2/proiecte_2023_ubuntu/auto_gpt_webGUI/auto-gpt-webui-main/apps/backend) npm run start exited (1)
command (/media/bogdan/SSD2/proiecte_2023_ubuntu/auto_gpt_webGUI/auto-gpt-webui-main/apps/backend) npm run start exited (1)

Tasks: 0 successful, 2 total
Cached: 0 cached, 2 total
Time: 538ms

ERROR run failed: command exited (1)
(auto_GPTGUI) (base) bogdan@bogdan-Nitro-AN517-53:/media/bogdan/SSD2/proiecte_2023_ubuntu/auto_gpt_webGUI/auto-gpt-webui-main$ npm start

[email protected] start
turbo run start

โ€ข Packages in scope: backend, frontend
โ€ข Running start in 2 packages
โ€ข Remote caching disabled
backend:start: cache miss, executing 9cd29a5f87051bdf
frontend:start: cache miss, executing 7e5f831f5c69084c
frontend:start: ERROR: npm v9.6.4 is known not to run on Node.js v12.22.9. This version of npm supports the following node versions: ^14.17.0 || ^16.13.0 || >=18.0.0. You can find the latest version at https://nodejs.org/.
frontend:start:
frontend:start: ERROR:
backend:start: ERROR: npm v9.6.4 is known not to run on Node.js v12.22.9. This version of npm supports the following node versions: ^14.17.0 || ^16.13.0 || >=18.0.0. You can find the latest version at https://nodejs.org/.
backend:start:
backend:start: ERROR:
frontend:start: /media/bogdan/SSD2/proiecte_2023_ubuntu/auto_gpt_webGUI/auto-gpt-webui-main/node_modules/npm/lib/utils/exit-handler.js:19
frontend:start: const hasLoadedNpm = npm?.config.loaded
frontend:start: ^
frontend:start:
frontend:start: SyntaxError: Unexpected token '.'
frontend:start: at wrapSafe (internal/modules/cjs/loader.js:915:16)
frontend:start: at Module._compile (internal/modules/cjs/loader.js:963:27)
frontend:start: at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
frontend:start: at Module.load (internal/modules/cjs/loader.js:863:32)
frontend:start: at Function.Module._load (internal/modules/cjs/loader.js:708:14)
frontend:start: at Module.require (internal/modules/cjs/loader.js:887:19)
frontend:start: at require (internal/modules/cjs/helpers.js:74:18)
frontend:start: at module.exports (/media/bogdan/SSD2/proiecte_2023_ubuntu/auto_gpt_webGUI/auto-gpt-webui-main/node_modules/npm/lib/cli.js:42:23)
frontend:start: at Object. (/media/bogdan/SSD2/proiecte_2023_ubuntu/auto_gpt_webGUI/auto-gpt-webui-main/node_modules/npm/bin/npm-cli.js:2:25)
frontend:start: at Module._compile (internal/modules/cjs/loader.js:999:30)
backend:start: /media/bogdan/SSD2/proiecte_2023_ubuntu/auto_gpt_webGUI/auto-gpt-webui-main/node_modules/npm/lib/utils/exit-handler.js:19
backend:start: const hasLoadedNpm = npm?.config.loaded
backend:start: ^
backend:start:
backend:start: SyntaxError: Unexpected token '.'
backend:start: at wrapSafe (internal/modules/cjs/loader.js:915:16)
backend:start: at Module._compile (internal/modules/cjs/loader.js:963:27)
backend:start: at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
backend:start: at Module.load (internal/modules/cjs/loader.js:863:32)
backend:start: at Function.Module._load (internal/modules/cjs/loader.js:708:14)
backend:start: at Module.require (internal/modules/cjs/loader.js:887:19)
backend:start: at require (internal/modules/cjs/helpers.js:74:18)
backend:start: at module.exports (/media/bogdan/SSD2/proiecte_2023_ubuntu/auto_gpt_webGUI/auto-gpt-webui-main/node_modules/npm/lib/cli.js:42:23)
backend:start: at Object. (/media/bogdan/SSD2/proiecte_2023_ubuntu/auto_gpt_webGUI/auto-gpt-webui-main/node_modules/npm/bin/npm-cli.js:2:25)
backend:start: at Module._compile (internal/modules/cjs/loader.js:999:30)
frontend:start: ERROR: command finished with error: command (/media/bogdan/SSD2/proiecte_2023_ubuntu/auto_gpt_webGUI/auto-gpt-webui-main/apps/frontend) npm run start exited (1)
command (/media/bogdan/SSD2/proiecte_2023_ubuntu/auto_gpt_webGUI/auto-gpt-webui-main/apps/frontend) npm run start exited (1)

Tasks: 0 successful, 2 total
Cached: 0 cached, 2 total
Time: 581ms

ERROR run failed: command exited (1)

AI output disappears before i can read it

i have everything else working ok but cant solve that issue. AI output shows very breifly then that window changes asking for my input. What can I try? Would it be possible to add agents windows as they are called upon?

Could it be configured as https?

I'd like to put the page onto internet.
I tried modifying code:
Screen Shot 2023-05-11 at 4 28 19 PM
and I tried using nginx as reverse proxy.
Screen Shot 2023-05-11 at 4 26 51 PM
But neither worked, as my browser with sock5 proxy of ssh tunnel to server works perfect.

/bin/sh: python: command not found

Hi,

I've just installed auto-gpt on OSX, having recently installed Python. When I try to run an agent, I get the following error:

python scripts/main.py - /bin/sh: python: command not found.

I'm pretty confident that's because I need to execute the command as 'python3', which is how I run auto GPT via terminal.

How can I edit the auto-gpt-webui backend to execute the commands as python3 or is there a better way of fixing this?

Run Failed

Node.js v18.15.0
backend:start: npm ERR! Lifecycle script start failed with error:
backend:start: npm ERR! Error: command failed
backend:start: npm ERR! in workspace: [email protected]
backend:start: npm ERR! at location: /Users/brandonjenner/Downloads/auto-gpt-webui-main/apps/backend
backend:start: ERROR: command finished with error: command (/Users/brandonjenner/Downloads/auto-gpt-webui-main/apps/backend) npm run start exited (1)
command (/Users/brandonjenner/Downloads/auto-gpt-webui-main/apps/backend) npm run start exited (1)

Crash after Starting AI

backend:start: Process exited with code false
backend:start: Error executing command: Command failed: python scripts/main.py 
backend:start:   File "scripts/main.py", line 43
backend:start:     speak.say_text(f"{title}. {content}")
backend:start:                                        ^
backend:start: SyntaxError: invalid syntax

Crash when running "Start this AI"

Hi,

I am trying to deploy this project on my Raspberry Pi, but I encounter the following error when I click the "Start this AI" button.
The only left API key I didn't fill out is Pinecone. I followed the instruction here to set up a redis db instead. Unfortunately, it didn't work. Choosing local gives me the same error.

Any idea or suggestion?

rpi@rpi-desktop:~/repo/auto-gpt-webui$ npm start

> [email protected] start
> turbo run start

โ€ข Packages in scope: backend, frontend
โ€ข Running start in 2 packages
โ€ข Remote caching disabled
frontend:start: cache miss, executing 2a1795e3b52f2e3e
backend:start: cache miss, executing 7b3180ab44e465aa
frontend:start:
frontend:start: > [email protected] start
frontend:start: > vite --host 0.0.0.0
frontend:start:
backend:start:
backend:start: > [email protected] start
backend:start: > node server.js
backend:start:
backend:start: Server is running on port 2200
backend:start: Client connected, sending command log
frontend:start:
frontend:start:   VITE v4.2.1  ready in 3890 ms
frontend:start:
frontend:start:   โžœ  Local:   http://localhost:7070/
frontend:start:   โžœ  Network: http://192.168.31.100:7070/
frontend:start:   โžœ  Network: http://10.172.3.69:7070/
frontend:start:   โžœ  Network: http://172.17.0.1:7070/
backend:start: Client connected, sending command log
backend:start: Client connected, sending command log
backend:start: Received command: python scripts/main.py --gpt3only
backend:start: node:events:491
backend:start:       throw er; // Unhandled 'error' event
backend:start:       ^
backend:start:
backend:start: Error: write EPIPE
backend:start:     at afterWriteDispatched (node:internal/stream_base_commons:160:15)
backend:start:     at writeGeneric (node:internal/stream_base_commons:151:3)
backend:start:     at Socket._writeGeneric (node:net:943:11)
backend:start:     at Socket._write (node:net:955:8)
backend:start:     at writeOrBuffer (node:internal/streams/writable:392:12)
backend:start:     at _write (node:internal/streams/writable:333:10)
backend:start:     at Writable.write (node:internal/streams/writable:337:10)
backend:start:     at /home/rpi/repo/auto-gpt-webui/apps/backend/server.js:195:33
backend:start:     at Layer.handle [as handle_request] (/home/rpi/repo/auto-gpt-webui/node_modules/express/lib/router/layer.js:95:5)
backend:start:     at next (/home/rpi/repo/auto-gpt-webui/node_modules/express/lib/router/route.js:144:13)
backend:start: Emitted 'error' event on Socket instance at:
backend:start:     at emitErrorNT (node:internal/streams/destroy:151:8)
backend:start:     at emitErrorCloseNT (node:internal/streams/destroy:116:3)
backend:start:     at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
backend:start:   errno: -32,
backend:start:   code: 'EPIPE',
backend:start:   syscall: 'write'
backend:start: }
backend:start:
backend:start: Node.js v19.9.0
backend:start: npm ERR! Lifecycle script `start` failed with error:
backend:start: npm ERR! Error: command failed
backend:start: npm ERR!   in workspace: [email protected]
backend:start: npm ERR!   at location: /home/rpi/repo/auto-gpt-webui/apps/backend
backend:start: ERROR: command finished with error: command (/home/rpi/repo/auto-gpt-webui/apps/backend) npm run start exited (1)
command (/home/rpi/repo/auto-gpt-webui/apps/backend) npm run start exited (1)

 Tasks:    0 successful, 2 total
Cached:    0 cached, 2 total
  Time:    1m7.818s

 ERROR  run failed: command  exited (1)

Start this Ai error

start: Error executing command: Command failed: python scripts/main.py
backend:start: Traceback (most recent call last):
backend:start: File "C:\Users\danie\OneDrive\Desktop\AutoGPT\auto-gpt-webui\auto-gpt\scripts\main.py", line 3, in
backend:start: import commands as cmd
backend:start: File "C:\Users\danie\OneDrive\Desktop\AutoGPT\auto-gpt-webui\auto-gpt\scripts\commands.py", line 1, in
backend:start: import browse
backend:start: File "C:\Users\danie\OneDrive\Desktop\AutoGPT\auto-gpt-webui\auto-gpt\scripts\browse.py", line 1, in
backend:start: import requests
backend:start: ModuleNotFoundError: No module named 'requests'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.