# arandu

> Long-term memory for AI agents. Extract, store, and retrieve structured facts from conversations using PostgreSQL + pgvector. Pluggable LLM and embedding providers. Inspired by how the human brain encodes, consolidates, and retrieves memories.

## Guides

- [arandu](https://pe-menezes.github.io/arandu/): Project overview, features, installation, and quickstart.
- [Getting Started](https://pe-menezes.github.io/arandu/getting-started/): Step-by-step guide: install, setup PostgreSQL+pgvector, first write and retrieve.
- [Write Pipeline](https://pe-menezes.github.io/arandu/concepts/write-pipeline/): How the write pipeline works: extraction, entity resolution, reconciliation, upsert.
- [Read Pipeline](https://pe-menezes.github.io/arandu/concepts/read-pipeline/): How the read pipeline works: planning, retrieval, reranking, formatting.
- [Background Jobs](https://pe-menezes.github.io/arandu/concepts/background-jobs/): Background jobs: clustering, consolidation, memify, sleep-time compute.
- [Design Philosophy](https://pe-menezes.github.io/arandu/concepts/design-philosophy/): Design decisions and neuroscience parallels behind the architecture.
- [Cookbook](https://pe-menezes.github.io/arandu/cookbook/): Practical examples: basic usage, custom providers, config tuning, background jobs, multi-user.

## Advanced

- [Write Pipeline API](https://pe-menezes.github.io/arandu/advanced/write-api/): Advanced write pipeline API: extraction strategy, canonicalization, entity helpers, corrections.
- [Read Pipeline API](https://pe-menezes.github.io/arandu/advanced/read-api/): Advanced read pipeline API: query expansion, graph traversal, spreading activation, directives.
- [Database Utilities](https://pe-menezes.github.io/arandu/advanced/database/): Database utilities: create_engine, create_session_factory, init_db.
- [Data Types Reference](https://pe-menezes.github.io/arandu/advanced/data-types/): All enums, dataclasses, and result types reference.

## Reference

- [Configuration](https://pe-menezes.github.io/arandu/configuration/): All MemoryConfig parameters grouped by pipeline stage with defaults.
- [Custom Providers](https://pe-menezes.github.io/arandu/custom-providers/): How to implement custom LLMProvider and EmbeddingProvider.
- [API Reference](https://pe-menezes.github.io/arandu/reference/): Auto-generated API reference for all public classes and functions.
