> For the complete documentation index, see [llms.txt](https://aivilles-organization.gitbook.io/aivilles-organization/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://aivilles-organization.gitbook.io/aivilles-organization/welcome-to-aiville/architecture-of-generative-agents.md).

# Architecture of Generative Agents

**Generative Agents** are AI-driven characters built on large language models (LLMs) that simulate realistic human-like behavior. They are designed for open-world environments, where they can interact with other agents, respond to changing contexts, and autonomously evolve through memory, reasoning, and planning.

At the heart of this architecture is a novel agent framework that integrates LLMs with memory retrieval and synthesis mechanisms. This ensures that agents generate behavior not just from prompt inputs, but from a coherent and personalized internal history.

Without such mechanisms, an LLM might generate plausible actions in isolation — but fail to exhibit continuity, react to past events, or demonstrate consistent identity. The key challenge, therefore, is enabling agents to retrieve, reflect on, and reason over their memory in a way that informs long-term, believable behavior.This architecture is structured around three core components:

* **Memory Stream & Retrieval**
* **Reflection**
* **Planning & Action**

<figure><img src="https://ljpv5zcuv5dg.jp.larksuite.com/space/api/box/stream/download/asynccode/?code=NmExOGJmNTIxNjQyZDNlMTY1MTMwMGNmNjZjOTE3OGJfNVRGempwRHZ5VEt2VDR4VUE1QlIwWlB1Skx0cG5Md3BfVG9rZW46UXFTOGJoSm5Vb0l0dkt4b2NnUmp4c1hPcFRlXzE3NDgwNzQ2NjM6MTc0ODA3ODI2M19WNA" alt=""><figcaption></figcaption></figure>
