> ## Documentation Index
> Fetch the complete documentation index at: https://agno-v2-agui.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Neon

> Use Neon serverless PostgreSQL for session storage.

Agno supports using [Neon](https://neon.com/) with the `PostgresDb` class.

You can get started with Neon following their [Get Started guide](https://neon.com/docs/get-started/signing-up).

You can also read more about the [`PostgresDb` class](/database/postgres) in its section.

## Usage

```python neon_for_agent.py theme={null}
from agno.agent import Agent
from agno.db.postgres import PostgresDb
from os import getenv

# Get your Neon database URL
NEON_DB_URL = getenv("NEON_DB_URL")

# Setup the Neon database
db = PostgresDb(db_url=NEON_DB_URL)

# Setup your Agent with the Database
agent = Agent(db=db)
```

## Params

<Snippet file="db-postgres-params.mdx" />

## Developer Resources

* View [Cookbook](https://github.com/agno-agi/agno/tree/main/cookbook/07_database/postgres/postgres_for_agent.py)
