Pengenuity is an experimental open-source autonomous AI Agent that aims to replicate the structure of human memory. The project's ultimate goal is to create an AI agent that can learn and reason like a human, with the hope of better understanding the nature of human cognition.
Pengunuity is designed to have the following features:
- A memory structure that mimics human long-term memory:
- Procedural memory for the storage and retrieval of tool usage procedures.
- Semantic memory for the storage and retrieval of concepts and knowledge.
- Episodic memory for the storage and retrieval of specific events or episodes.
- The ability to learn new concepts and remember task execution results while performing tasks.
- Use of tools based on procedural memory:
- The built-in tools include only the default Google search tool for web browsing.
- Customization of tools, allowing users to add and tailor tools to their specific needs and preferences.
- Designed to operate using GPT-3.5.
- Developed based on LangChain, making it compatible with the LangChain ecosystem.
demo.mov
Human long-term memory consists of three types: Procedural memory, Semantic memory, and Episodic memory.
-
Procedural memory is the long-term memory related to the acquisition and execution of motor and cognitive skills, such as riding a bicycle, typing on a keyboard, or playing a musical instrument.
-
Semantic memory refers to long-term memory of facts, concepts, and general knowledge about the world, such as knowing that the capital of France is Paris or that the sun rises in the east and sets in the west.
-
Episodic memory is the long-term memory responsible for remembering specific events or personal experiences. It allows us to remember past experiences and to relive them in our minds, such as a family vacation or a significant life event.
Pengenuity's memory structure is based on human long-term memory and consists of three vector stores:
-
Procedural memory vector store: stores and retrieves tool usage procedures. It saves information about external tools specified by the user.
-
Semantic memory vector store: stores and retrieves concepts and knowledge. It saves the knowledge obtained through entity extraction.
-
Episodic memory vector store: stores and retrieves specific events or episodes. It saves the sequence of agent's actions.
This script operates in the following loop:
- The agent generates a task list based on the goal provided by the user.
- The agent searches for memories related to the current task, looking for relevant concepts and past reasoning and action results.
- Based on the search results, it determines the next action to take.
- It executes the action using external tools.
- It performs entity extraction on the execution results, learning new concepts and storing reasoning and actions and their results as an episode in memory.
- It returns to step 2.
To install Pengenuity, follow these steps:
- Clone the repository:
git clone https://github.com/dory111111/Pengenuity.git
- Navigate to the directory where the repository was downloaded
cd Pengenuity
- Install the required dependencies poetryを使って
poetry install
-
Rename
.env.sample
to.env
-
Open the
.env
file and fill in the following variables:OPENAI_API_KEY
: Your OpenAI API key.GOOGLE_API_KEY
: Your Google API key.GOOGLE_CSE_ID
: Your Google Custom Search Engine ID..
- Run
Pengenuity
Python module in your terminal
poetry run python src/main.py
- Lanchain's Tools and ChatGPT plugin as part of Pengenuity's Tool.
- Local LLM support
- Code Refactoring
- Vector Store compatibility
- Alternative User Interface
Default model is gpt-3.5-turbo. To use a different model, specify it through OPENAI_API_MODEL or use the command line. GPT-4 and LLaMA compatibility testing is currently not being conducted.
I would like to express my gratitude to the developers whose code I referenced in creating this repo.
Special thanks go to
BabyAGI @yoheinakajima (https://github.com/yoheinakajima/babyagi)
Auto-GPT @Significant-Gravitas (https://github.com/Significant-Gravitas/Auto-GPT)