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

# Neon

> Connect Neon to query your serverless Postgres database and analyze your data with natural language

Connect Adapt to Neon to query your serverless Postgres database and analyze
your data using natural language. Adapt connects to Neon through a standard
Postgres connection string, so you can explore tables and pull insights without
writing SQL by hand.

## Set up credentials

Adapt connects to Neon using your project's Postgres connection string.

<Steps>
  <Step title="Open your Neon project">
    Sign in to the [Neon Console](https://console.neon.tech) and select your
    project.
  </Step>

  <Step title="Open the Connect widget">
    On the **Project Dashboard**, click **Connect** to open the **Connect to
    your database** modal.
  </Step>

  <Step title="Copy your connection string">
    Select the **branch**, **database**, and **role** you want Adapt to use,
    then copy the generated connection string. It looks like:

    ```
    postgresql://alex:AbC123dEf@ep-cool-darkness-a1b2c3d4-pooler.us-east-2.aws.neon.tech/dbname?sslmode=require
    ```
  </Step>
</Steps>

<Note>
  Neon requires SSL, so keep the `sslmode=require` parameter in your connection
  string. You can toggle connection pooling in the Connect widget; the pooled
  host includes a `-pooler` suffix.
</Note>

## Connect to Adapt

<Steps>
  <Step title="Open Integrations">
    In Adapt, go to **Settings > Integrations**.
  </Step>

  <Step title="Find Neon">
    Search for **Neon** and select it from the catalog.
  </Step>

  <Step title="Start the connection">
    Click **Connect** to open the connection form.
  </Step>

  <Step title="Add your credentials">
    Enter the values you gathered above, then click **Add connection**:

    | Secret Name         | Value                       |
    | ------------------- | --------------------------- |
    | `NEON_DATABASE_URL` | Your Neon connection string |

    You can rename the connection and choose whether it is shared with your
    organization or kept personal to you.
  </Step>

  <Step title="Test the connection">
    Ask Adapt to list your tables or query your data.
  </Step>
</Steps>

### Security

* Credentials are encrypted at rest with AES-256
* Connect with a role that has only the privileges Adapt needs, such as read-only `SELECT` access
* Keep `sslmode=require` so all connections use SSL
* If your connection string is ever exposed, reset the role's password in the Neon Console
* Never share your connection string publicly or commit it to source control

## Capabilities

Adapt can query your Neon Postgres database. Explore your tables and analyze
your data using natural language.

### Examples

Explore data:

```
What tables are in my Neon database?
```

Inspect a table:

```
Show me the columns and types in the orders table.
```

Summarize records:

```
How many users signed up in the last 30 days?
```

Analyze trends:

```
What are my top 10 products by total revenue this year?
```
