Skip to content

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

  1. Open a Develop Mode project.

  2. In the Configuration panel (left sidebar), scroll down past your repositories to find the Database card.

  3. Click Configure.

  4. Choose the Database type from the dropdown. Select Auto-detect if you’re unsure — the agent will figure it out from the connection URI.

  5. Paste your Connection URI. Common formats:

    DatabaseURI format
    PostgreSQLpostgresql://user:password@host:5432/database
    MySQLmysql://user:password@host:3306/database
    MongoDBmongodb://user:password@host:27017/database
    SQLite/path/to/database.sqlite or file:./data.db
  6. Check Read-only access if you want the agent to only read data (no writes, no schema changes).

  7. 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 users table 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_at timestamp column to the users table.”

“Create a product_categories table with a foreign key to categories and products.”

“Add a database index on orders.created_at to speed up the reporting queries.”

“Create a migration file for the new notifications table — use the existing Alembic pattern.”


Access modes

ModeAllowedReal-world use case
Read & WriteSchema exploration, queries, DDL, DML, migrationsFull database management
Read-onlySchema exploration, queries onlySafe analysis on production replicas

You can change the mode at any time by clicking the edit button on the Database card.


Removing the connection

  1. Click the pencil icon on the Database card to open the editor.
  2. 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 — not DROP 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.