Skip to main content

Data Connectors

Data Connectors allow you to link your existing database directly to Cobi, enabling the Data Assistant to query and analyze your data in real-time.
All database connections are read-only. Cobi will never modify your data.

Supported Databases

Cobi currently supports the following database types:
  • PostgreSQL - Full support for PostgreSQL versions 12+
  • MySQL - Full support for MySQL 8.0+

Connecting Your Database

1

Open Developer Settings

Navigate to the Developer section in the sidebar, then select Data Connectors.
2

Add New Connection

Click the Add Data Source button to open the connection form.
3

Enter Connection Details

Fill in your database credentials:
FieldDescription
Connection NameA friendly name to identify this data source (e.g., “Production DB”, “Analytics”)
HostYour database server address (e.g., db.example.com or an IP address)
PortThe database port (default: 5432 for PostgreSQL)
Database NameThe name of the specific database to connect to
UsernameDatabase user with read access
PasswordPassword for the database user
4

Test Connection

Click Test Connection to verify your credentials. Cobi will attempt to connect and confirm access.
5

Save Connection

Once the test succeeds, click Save Changes to store your connection.

Network Configuration

IP Allowlisting

If your database is behind a firewall, you’ll need to allowlist Cobi’s IP addresses:
xx.xx.xxx.xx
xx.xx.xxx.xx
Contact [email protected] to get the IP addresses for your region.

Using SSH Tunnels

For databases that aren’t publicly accessible, we recommend setting up an SSH tunnel or using a bastion host. Contact our support team for guidance on secure connection options.

Best Practices

Create a Read-Only User

We strongly recommend creating a dedicated database user with read-only permissions:
-- PostgreSQL example
CREATE USER cobi_reader WITH PASSWORD 'secure_password';
GRANT CONNECT ON DATABASE your_database TO cobi_reader;
GRANT USAGE ON SCHEMA public TO cobi_reader;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO cobi_reader;
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO cobi_reader;

Limit Table Access

If you only want Cobi to access specific tables, grant permissions selectively:
-- Grant access to specific tables only
GRANT SELECT ON customers, transactions, orders TO cobi_reader;

Managing Connections

Edit a Connection

To update connection details:
  1. Go to Developer > Data Connectors
  2. Click on the connection you want to edit
  3. Update the fields as needed
  4. Click Test Connection to verify, then Save Changes

Delete a Connection

To remove a data source:
  1. Go to Developer > Data Connectors
  2. Click on the connection
  3. Click Delete Connection
Deleting a connection will remove all learned information and custom instructions associated with that data source.

Troubleshooting

Connection Failed

If your connection test fails, check the following:
  1. Firewall rules - Ensure Cobi’s IP addresses are allowlisted
  2. Credentials - Verify username and password are correct
  3. Host/Port - Confirm the host address and port are correct
  4. Database name - Check that the database exists and the user has access
  5. SSL requirements - Some databases require SSL connections

Slow Queries

If the Data Assistant is slow when querying your database:
  1. Ensure your database has appropriate indexes
  2. Consider creating views for commonly queried data
  3. Add Custom Instructions to help Cobi write optimized queries

Next Steps

Once your database is connected:
  • Add Custom Instructions to help Cobi understand your data
  • Start a conversation with the Data Assistant to explore your data