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

# Database

> Attach Postgres to a Mythex project and let the agent use DATABASE_URL automatically.

# Database

Mythex can attach an isolated **Postgres** database to a project.

## Availability

Database attach is available on **Free and Pro**. Pro has higher overall platform limits; Free is fine for learning and small apps.

## What you get

* A dedicated Postgres for that project
* Connection details injected into the sandbox and deploys (for example `DATABASE_URL`)
* Agent-aware setup — ask the agent to create schema, migrations, or queries

## How to attach

1. Open the project workspace
2. Open **project settings**
3. Attach / provision database (wording may be “Database” or similar)
4. Ask the agent to use the database for your feature

## Tips

* Be explicit: “create a users table and an API route to list them”
* Keep secrets out of chat when possible — prefer env injection
* For published apps, confirm the deploy received database env vars after attach

## Related

* [Env & secrets](/features/env-and-secrets)
* [Publish](/publish/overview)
