ProAgent is the official code implementation of the Agentic Process Automation paper, released by the OpenBMB team. It aims to liberate humans from burdensome tasks and advance automation technology from waterwheels and Robotic Process Automation (RPA) to large language model-based Agentic Process Automation (APA). RPA struggles with tasks requiring human-like intelligence, especially in the careful design of workflow construction and dynamic decision-making during execution. As an LLM-based agent, ProAgent builds workflows according to human instructions and makes complex decisions by coordinating specialized agents.
Main capabilities: ProAgent can create automation workflows according to human instructions and make complex decisions during workflow execution. It achieves this by coordinating multiple specialized agents. Experiments demonstrate the construction and execution of its workflows, validating the feasibility of APA. The project includes a readable recording system; each run generates records in the ./records directory and supports loading run records in different modes.
Usage:
- Install the dependency packages. Note that the project uses a pre-Dev Day OpenAI version and cannot use the latest version of OpenAI.
- Prepare a self-hosted n8n environment. The project uses self-hosted n8n, so you need to first install n8n according to the guide; on Linux/macOS, the corresponding commands can be used. Self-hosted n8n does not support https services, but the project has built a redirection service (which may be unstable, and the redirection service code will be open-sourced). You need to register or connect an existing APP to n8n; the connection may involve operations specific to the APP, and you can refer to the n8n credentials guide.
- The codebase needs to load workflow IDs and credential IDs, so you must create some workflows and register some APPs in advance. Then decode the credentials from the n8n service via commands, and move c.json to ./ProAgent/n8n_tester/credentials/c.json, and w.json to ./ProAgent/n8n_tester/credentials/w.json.
- Run the dependency configuration. The configuration file is located at ProAgent/config.py, where you can set the runtime environment: development mode (the mode reported in the paper; you need to start n8n first and prepare the OpenAI key), refine mode(Loaded from an existing workflow, then optimized according to the new request, with the test-on-change feature enabled), production mode (loaded from an existing workflow, which can reproduce ProAgent's existing runs, with the test-on-change feature disabled, and the APA code is tested only once at the end of the run). The project provides the cases from the paper in ./apa_case, which can be loaded and run directly using production mode.
- Use the command to start ProAgent. Note that all runs will generate new records in ./records, and runs can be loaded from the records in refine or production mode. If development mode is used, an OpenAI key must be prepared and the corresponding variable set in the environment.
Applicable scenarios: ProAgent is suitable for researching and implementing LLM-based automated workflow construction and execution, and is especially suitable for developers and researchers who wish to explore the new APA paradigm. It can be used to reproduce the cases in the paper, or to perform optimization and production runs based on existing workflows.
Limitations:
- The code method is basically consistent with the paper, but there are some changes after release: on the HCI side, ProAgent may encounter problems when misunderstanding questions, so a feature was developed to enable it to ask humans for help through a new function call (similar to XAgent), encouraging ProAgent to build and test workflows together with humans.
- n8n features: n8n has released new features, and the project code is based on an older version of n8n and has written an n8n compiler, which may not be compatible with the new version of n8n.
- OpenAI: ProAgent is based on GPT4-0613, and OpenAI released GPT4-1106-preview on Dev Day, with function calling capability improved by 38%, so ProAgent may perform better than in the paper.
- Problems in n8n deployment need to be handled by yourself, such as possible network issues when connecting APP accounts to n8n in China.