Files
AutoGPT/rnd
Zamil Majdy d2a5bb286f feat(rnd): Fix concurrency issue on Agent Server & Apply max-1-execution-per-node constraint in graph execution (#7551)
### Background

When multiple executors are executing the same node within the same graph execution, two node executions can read the same queue of input and read the same value—making the data that is supposed to be consumed once, consumed by two executions. The lack of lock & concurrency support for parallel execution within a single graph causes this issue.

Node concurrency also introduces poor UX in the current frontend implementation, when two nodes are executed in parallel, the current UI will not display its parallel execution update, but instead, it shows the updates that override each other. Until the execution observability is improved on the builder UI, this capability will be limited.

### Changes 🏗️

The scope of this change is to solve this issue by:
* Decouple Graph execution & Node execution, each has its own configured process pool.
* Make sure there is only 1 execution per node (we still allow parallel executions on different nodes) in a graph.
* Fixed concurrency issue by adding distributed lock API on agent_server.
* Few cleanups:
    - Add more logging with geid & neid prefix on graph/node executions
    - Moved execution status update to agent-server for a single source of status update (required by conn-manager/web-socket)
    - Configured node parallelism to 10 & graph parallelism to 10 by default, so in the very rare worst-case, there can be 100 node executions.
    - Re-use server resource for each integration test run
2024-07-26 17:08:03 +07:00
..

This is a guide to setting up and running the AutoGPT Server and Builder. This tutorial will cover downloading the necessary files, setting up the server, and testing the system.

https://github.com/user-attachments/assets/fd0d0f35-3155-4263-b575-ba3efb126cb4

  1. Navigate to the AutoGPT GitHub repository.

  2. Click the "Code" button, then select "Download ZIP".

  3. Once downloaded, extract the ZIP file to a folder of your choice.

  4. Open the extracted folder and navigate to the "rnd" directory.

  5. Enter the "AutoGPT server" folder.

  6. Open a terminal window in this directory.

  7. Locate and open the README file in the AutoGPT server folder: doc.

  8. Copy and paste each command from the setup section in the README into your terminal.

    • Important: Wait for each command to finish before running the next one.
  9. If all commands run without errors, enter the final command: poetry run app

  10. You should now see the server running in your terminal.

  11. Navigate back to the "rnd" folder.

  12. Open the "AutoGPT builder" folder.

  13. Open the README file in this folder: doc.

  14. In your terminal, run the following commands:

    npm install
    
    npm run dev
    
  15. Once the front-end is running, click the link to navigate to localhost:3000.

  16. Click on the "Build" option.

  17. Add a few blocks to test the functionality.

  18. Connect the blocks together.

  19. Click "Run".

  20. Check your terminal window - you should see that the server has received the request, is processing it, and has executed it.

And there you have it! You've successfully set up and tested AutoGPT.