Connect a database
Your agent can query PostgreSQL or MySQL to answer questions about orders, products or appointments. The connection allows read-only queries, and you can choose the available tables and columns.
Open Integrations → Functions → Database.
Prepare access
Have the host, port, database, user and SSL mode ready. Use a database user with read access only to the necessary data. The destination must be public: Platic rejects local and private addresses.
You need Integrations access. Storing a password or selecting one from the vault also requires the corresponding Secrets permissions.
Create the connection
- Click New connection.
- Enter a Name of up to 32 characters, using lowercase letters, numbers and underscores.
- Complete Engine, Host, Port, Database, User and SSL. Paste connection string can fill these fields.
- Enter the password or choose an existing secret. Leave it blank only if the database user does not need a password.
- Add a brief description of the data and when to query it.
- Click Create and test.
The connection is saved and access is tested. If the test fails, the connection may already exist: fix the error in its editor before creating another one.
Required encrypts the connection; Verify certificate also checks the server certificate. No SSL sends the connection without encryption.
For Supabase, if the direct destination only provides IPv6 and cannot connect, try the Session pooler settings. Keep the SSL mode your provider requires.
Test and assign tools
In Test your database, enter a SELECT query and click Run. The panel uses the saved connection and rules: click Save before testing pending changes.
Queries allow a single read statement. If more rows are available, request the next page. Each page queries the database again, so data can change between pages. A query with a defined order makes results easier to review.
In Agents, link the required tools: list tables, describe columns, query and request the next page. You can also do this from the agent's Tools. Tool links apply separately from publishing instructions.
Change the password or pause access
The password is encrypted in Secrets and is not shown again in the editor. Change lets you select another secret or enter a new password; this applies immediately, without waiting for the editor's Save button.
If you change the destination and see Authorize again, complete that authorization. Rotating a secret changes its stored value; it does not change the password at the database provider.
Pause disables agent tools and preserves the connection. Manual tests may remain available depending on your permissions; pausing does not cancel queries already in progress.
Limits and errors
In Limits, adjust rows per page and query time: initially 50 rows and 5 seconds, with maximums of 200 rows and 30 seconds. The pagination cursor lasts 30 minutes; rerun the query if it expires.
When an error appears, check credentials and authorization, host and internet access, SSL or table permissions. For slow queries, request less data or adjust the timeout.
Logs show the operation, status, duration and counts. They may include SQL text, up to 4,000 characters, but do not store result rows.
Continue with Tables and columns. You can also read the API connection guide.