> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# DB • AI Agents Framework

> PraisonAI Database - Ultra-simple persistence for agents.

# db

<Badge color="purple">AI Agents Framework</Badge>

PraisonAI Database - Ultra-simple persistence for agents.

RECOMMENDED (simplified import):
from praisonaiagents import Agent, db

# or: from praisonai import Agent, db

agent = Agent(
name="Assistant",
db=db(database\_url="postgresql://localhost/mydb"),
session\_id="my-session"
)
agent.chat("Hello!")  # auto-persists + can resume

DEPRECATED (will be removed in v3.0):
from praisonai.db import PraisonDB  # Use db(...) instead

Supported backends:

* PostgreSQL, MySQL, SQLite (conversation)
* Qdrant, ChromaDB, Pinecone (knowledge/vector)
* Redis, Memory (state)

## Import

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
from praisonai import db
```

### Constants

| Name               | Value                                                                                                                                                                                                         |
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `_DEPRECATION_MSG` | `"Importing from 'praisonai.db' is deprecated and will be removed in v3.0. Use the simplified import instead:\n  from praisonaiagents import Agent, db\n  # or: from praisonai import Agent, db\nThen use...` |
