HiAgent is a novel hierarchical working memory management framework for solving long-horizon agent tasks with large language models (LLMs). It introduces a hierarchical memory structure that helps LLMs better organize and utilize information during complex task solving.
Key features:
- 🧠 Hierarchical memory management with working memory and long-term memory
- 🎯 Effective for long-horizon tasks requiring multi-step planning
- 🔄 Dynamic memory updating and pruning mechanisms
- 📝 Structured memory format for better information organization
- 🤖 Compatible with various LLM backends
We build this repo based on AgentBoard project. We would like to thank the authors for their excellent work.
-
Clone this repo
-
Create and activate virtual environment 🐍
conda create -n hiagent python=3.8.18
conda activate hiagent
- Setup AgentBoard environment and data 📥
Before starting, please make sure you have configured cuda. If not, please configure it first.
If configured, you can check using the following commands:
- Check version information 📊
nvcc -V
- Download nltk library by running the following code: 📚
import nltk
nltk.download('punkt')
nltk.download('punkt_tab')
- Create and configure
./agentboard/.env
file, Environment Variables needed include: ⚡
PROJECT_PATH=
OPENAI_API_KEY=
If the configuration is correct and the code runs successfully, you should see a series of prompts in the terminal.
bash evaluate_model.sh