This project implements a multi-agent system using LangChain and LM Studio, featuring three specialized agents: Research, Planning, and Execution.
- Node.js (v16 or higher)
- LM Studio running locally
- npm or yarn
- Install dependencies:
npm install-
Configure LM Studio:
- Download and install LM Studio
- Start a local server in LM Studio (default port: 1234)
- Load your preferred model in LM Studio
-
Configure environment variables:
- The
.envfile should already be set up with default values - Modify if your LM Studio is running on a different port
- The
Start the application:
npm startThe system will run a test query about website performance improvement, demonstrating the interaction between the three agents:
- Research Agent: Analyzes the problem and gathers information
- Planning Agent: Creates a structured plan based on the research
- Execution Agent: Provides concrete implementation steps
You can modify the agents' behavior by:
- Adjusting their system prompts in
index.js - Changing the temperature setting for different levels of creativity
- Adding more agents or modifying the chain of execution
The system uses a sequential chain of agents:
- Research → Planning → Execution
Each agent has a specific role and builds upon the work of the previous agent.