Connect Your Database to Develop Mode
Connect your database to a Develop Mode project so the AI agent can understand your data model, explore the schema, read records, and apply migrations when you ask. Any database that supports a standard connection URI works (PostgreSQL, MySQL, MongoDB, SQLite, and more).
Applies to: Develop Mode
Overview
When a database is connected to your project, the AI agent receives extra context during every task:
- The database type (PostgreSQL, MySQL, MongoDB, SQLite, etc.)
- The access mode you configured (read-only or read-write)
- The connection URI (injected securely — the agent never sees the raw credentials in plain text)
The agent then uses your database connection to explore the schema, run queries, or apply changes as part of the task — just like it already works with your code repositories.
Adding a database
-
Open a Develop Mode project.
-
In the Configuration panel (left sidebar), scroll down past your repositories to find the Database card.
-
Click Configure.
-
Choose the Database type from the dropdown. Select Auto-detect if you’re unsure — the agent will figure it out from the connection URI.
-
Paste your Connection URI. Common formats:
Database URI format PostgreSQL postgresql://user:password@host:5432/databaseMySQL mysql://user:password@host:3306/databaseMongoDB mongodb://user:password@host:27017/databaseSQLite /path/to/database.sqliteorfile:./data.db -
Check Read-only access if you want the agent to only read data (no writes, no schema changes).
-
Click Save.
What the agent can do
🔍 Explore your schema
Ask the agent to describe your data model:
“Show me the database schema — list all tables, their columns, and the relationships between them.”
“Find all tables that reference the
userstable via foreign keys.”
📖 Read data
Ask the agent to answer questions about your data:
“How many active subscriptions do we have, grouped by plan type?”
“Find all orders from the last 30 days where the total exceeds $500.”
✍️ Write data and migrate schema
When the connection is read-write, ask the agent to make changes:
“Add a
last_login_attimestamp column to theuserstable.”
“Create a
product_categoriestable with a foreign key tocategoriesandproducts.”
“Add a database index on
orders.created_atto speed up the reporting queries.”
“Create a migration file for the new
notificationstable — use the existing Alembic pattern.”
Access modes
| Mode | Allowed | Real-world use case |
|---|---|---|
| Read & Write | Schema exploration, queries, DDL, DML, migrations | Full database management |
| Read-only | Schema exploration, queries only | Safe analysis on production replicas |
You can change the mode at any time by clicking the edit button on the Database card.
Removing the connection
- Click the pencil icon on the Database card to open the editor.
- Click the trash icon, then confirm with Yes.
The connection URI is permanently deleted. Running tasks will continue to work on your repositories — they simply won’t have database access.
Keeping your database secure
- Use a read replica for analysis tasks. Connect Ileen to a read-only standby so the agent can explore your data safely without touching production.
- Create a dedicated database user with limited permissions (e.g.
SELECT,INSERT,CREATE TABLE— notDROP DATABASE). - Restrict network access. Make sure the host in your URI is reachable from the internet (Ileen’s agent runs in the cloud) or use a tunnel/proxy if your database is behind a firewall.
- Rotate the URI if credentials change — just open the Database card, paste the new URI, and save.