From 6e1c9d44a4db87d508059eee180788519475637a Mon Sep 17 00:00:00 2001 From: Krzysztof Czerwinski Date: Wed, 26 Jun 2024 19:41:12 +0200 Subject: [PATCH] Update Agent Server `README.md` --- rnd/autogpt_server/README.md | 54 ++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/rnd/autogpt_server/README.md b/rnd/autogpt_server/README.md index 1563240a3..57342f245 100644 --- a/rnd/autogpt_server/README.md +++ b/rnd/autogpt_server/README.md @@ -18,3 +18,57 @@ It will also trigger the agent execution by pushing its execution request to the A component that will execute the agents. This component will be a pool of processes/threads that will consume the ExecutionQueue and execute the agent accordingly. The result and progress of its execution will be persisted in the database. + +## Setup + +This setup is for MacOS/Linux. +To setup the project follow these steps inside the project directory: + +1. Enter poetry shell + ``` + poetry shell + ``` + +1. Install dependencies + ``` + poetry install + ``` + +1. Generate prisma client + ``` + poetry run prisma generate + ``` + + In case prisma generates client for the global python installation instead of the virtual environment the current mitigation is to just uninstall the global prisma package: + ``` + pip uninstall prisma + ``` + + And then run the generation again. + The path *should* look something like this: + `/pypoetry/virtualenvs/autogpt-server-TQIRSwR6-py3.12/bin/prisma` + +1. Migrate the database, be careful because this deletes current data in the database + ``` + poetry run prisma migrate dev + ``` + +1. Start the server, this starts the server in the background + ``` + poetry run python ./autogpt_server/cli.py start + ``` + + You may need to change the permissions of the file to make it executable + ``` + chmod +x autogpt_server/cli.py + ``` + +1. Stop the server + ``` + poetry run python ./autogpt_server/cli.py stop + ``` + +1. To run the tests + ``` + poetry run pytest + ```