README.md

February 16, 2025 ยท View on GitHub

HiAgent: Hierarchical Working Memory Management for Solving Long-Horizon Agent Tasks with Large Language Model

๐Ÿ“– Overview

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
HiAgent Overview

๐Ÿค Special Thanks

We build this repo based on AgentBoard project. We would like to thank the authors for their excellent work.

๐Ÿš€ Quick Start

๐Ÿ› ๏ธ Build from source

  • Clone this repo

  • Create and activate virtual environment ๐Ÿ

conda create -n hiagent python=3.8.18
conda activate hiagent
  • Setup AgentBoard environment and data ๐Ÿ“ฅ

๐Ÿ”‘ Setup environment

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

๐Ÿ› ๏ธ Additional Setup

  • 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=

๐Ÿƒ Run script

If the configuration is correct and the code runs successfully, you should see a series of prompts in the terminal.

bash evaluate_model.sh

๐Ÿ“Š Visualize results

HiAgent Experiment Results