SuperAPI AI Directory

Teenage AGI

Teenage AGI is a Python project inspired by BabyAGI and the paper "Generative Agents: Interactive Simulacra of Human Behavior". It uses OpenAI and Pinecone to give an AI agent memory and allows it to "think" before outputting text. Even if the AI is turned off, the memory is not lost, because the memory is stored in Pinecone and the index is saved via memory_counter. The project supports inputting information to the agent or inserting memories via the "read:" and "think:" commands. On each query, the AI vectorizes the query and stores it in Pinecone, retrieves relevant memories, thinks about actions, stores the thoughts, generates output based on the thoughts and memories, and finally stores the query and answer in memory. To use it, clone the repository, install dependencies, configure the OpenAI and Pinecone API information in the .env file, and then run python main.py to converse in the terminal. It can also be run in a container via docker-compose. When using GPT-4, it can remember traits such as names and maintain a conversation without a context window.

Open website

About this tool

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:

  1. Clone the repository: git clone https://github.com/seanpixel/Teenage-AGI.git and enter the directory.
  2. Install dependencies: pip install -r requirements.txt.
  3. Create the .env file: cp .env.template .env, and fill in the OpenAI and Pinecone API information.
  4. Run python main.py to converse with the AI in the terminal.
  5. Optional: Use docker-compose to run in an isolated container.

Processing flow for each query:

  1. The AI vectorizes the query and stores it in the Pinecone vector database.
  2. The AI searches memory for memories and past queries relevant to the current query.
  3. The AI thinks about the action to take.
  4. The AI stores that thought.
  5. Based on the thought and relevant memories, the AI generates output.
  6. 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.