Teenage AGI is an experimental Python project aimed at giving an AI agent persistent memory and "thinking" capabilities. It is inspired by Auto-GPT-related projects such as BabyAGI and by the paper "Generative Agents: Interactive Simulacra of Human Behavior".
Purpose: This project is mainly used to explore AI agents with memory and a thinking process, enabling the AI to remember historical information during conversations and to think internally before acting.
Main capabilities:
- Memory storage: Uses the Pinecone vector database to store queries, memories, and thoughts, so memories are not lost even if the AI is turned off.
- Thinking mechanism: Before generating output, the AI first "thinks" about the action to take and stores the thought content.
- Memory retrieval: On each query, the AI vectorizes the query and retrieves relevant memories and past queries.
- Command support: Supports the "read:" command to input information of any length to the AI, and the "think:" command to insert memories into the agent.
- Persistent index: Saves the current index position via memory_counter.
Usage:
- Clone the repository: git clone https://github.com/seanpixel/Teenage-AGI.git and enter the directory.
- Install dependencies: pip install -r requirements.txt.
- Create the .env file: cp .env.template .env, and fill in the OpenAI and Pinecone API information.
- Run python main.py to converse with the AI in the terminal.
- Optional: Use docker-compose to run in an isolated container.
Processing flow for each query:
- The AI vectorizes the query and stores it in the Pinecone vector database.
- The AI searches memory for memories and past queries relevant to the current query.
- The AI thinks about the action to take.
- The AI stores that thought.
- Based on the thought and relevant memories, the AI generates output.
- The AI stores the current query and answer in Pinecone memory.
Applicable scenarios: Suitable for researchers and developers interested in AI agent memory mechanisms and thinking processes to experiment and explore.
Limitations: The project is experimental in nature. When using GPT-4, it can remember traits such as names and maintain a conversation without a context window, but it may still be under development with limited functionality. Details such as specific pricing and platform support are not yet provided.