generative-agents
generative-agents copied to clipboard
An implementations of "Generative Agents: Interactive Simulacra of Human Behavior".
Generative Agents:
Interactive Simulacra
of Human Behavior
Generative agents proposed by this paper extend LLMs (like ChatGPT) with memory, reflection, planing and a sandbox environment.
We're building our Python implementation that allows you to add Generative Agents to your own worlds.
TODO and contributing
We have a #dev
chanel on Discord.
Answer questions.
Check out the issues and projects tabs, there are also # TODO
s scatered around the code.
- Python 3.10+
- Black
- isort
Parts
- 4.1
Memory
represents the most basic type of memory, an observation. Importance calculation is done here. - 4.2
Reflection
a reflection. - 4.3
Plan
a plan. - 4.1
MemoryStream
a stream of memories. Memory retrival is done here. - 4
Agent
- 5
Sandbox
tick, time, - Figure 2
World
- Figure 2
Area
- Figure 2
Object
Usage
pip install openai
Authentication
Create a openai_secrets.py
file and set your key there.
Note https://platform.openai.com/docs/api-reference/authentication
import openai
openai.api_key = 'Your OpenAI API key'