This project implements a long running ReAct (Reasoning and Acting) agent using Temporal workflows.
The agent follows the ReAct pattern to break down complex queries into a series of thoughts, actions, and observations, allowing it to reason through problems step-by-step while leveraging external tools.
-
Clone the Repository:
git clone https://github.com/bitovi/temporal-ai-agent cd temporal-ai-agent -
Install Dependencies:
This project uses
npmfor package management.npm install
-
Start Temporal Server:
Ensure you have a Temporal server running locally or configure the connection to a remote server.
The easiest way to do this is by installing the Temporal CLI. Then run:
npm run temporal
-
Set Up Environment Variables:
Copy
.env.exampleto.envand fill in your OpenAI API key and Temporal server details. -
Run the Worker:
This starts the Temporal worker that will execute the workflows.
npm run worker
-
Start the Workflow:
This starts the client that will initiate the ReAct agent workflow.
npm run client