Database connections
Connect your company databases, and the AI queries them live whenever it needs to, answering with real numbers. You decide precisely who sees which tables, and who may write.

In Admin → Database connections, you connect the databases your company runs to Ian On. Once a database is connected, Ian and agents write SQL to fit each question, query it live, and answer or write reports based on the results. Nothing is copied in advance, so answers always use current values.
Supported databases are PostgreSQL, MySQL, SQL Server, and Oracle (12.1 or later).
Database Connections is a feature that's off by default. If you don't see the menu, turn on Database Connections in Admin → Features. Only owners and admins use this screen. Team-scoped connections are visible and manageable only for teams you can access.
Adding a connection
- Click Add connection.
- Choose the Database type and paste the Connection string. If you paste an address (
postgresql://,mysql://, and so on), the type is set automatically. Only the examples and options for the chosen type are shown. - Click Check connection. Ian On connects, reads the schema, and drafts a Name and Description (AI draft). Check both and edit them. In the description, say what's in this database and when the AI should use it.
- Set Available to to Global or Team. For a team, pick the team too.
- If you like, turn on Generate N column descriptions with AI (an estimated time is shown). Right after the connection is added, the AI writes descriptions, one after another, for the columns that have none.
- Click Add connection.
The connection string is stored encrypted and is never shown again. To change it, open ⋯ → Edit on the row, click Replace next to the connection string, enter the new value, and click Save.
Notes by database
- Oracle — connects by service name. For a SID, add
?connectBy=sid; for a specific schema owner,?schema=OWNER; for TLS,?protocol=tcps. Version 11g and earlier need separate setup, so ask your operator. - SQL Server — reads only the
dboschema. The connecting account's default schema must bedbo. - SQL Server and Oracle are read-only. AI writes and row sync aren't supported.
Connecting a database on your internal network
For security, addresses that point to localhost are always blocked. Private network addresses such as 10.x.x.x and 192.168.x.x are blocked by default too, but you can connect to one once the server operator registers it in the server settings.
If you enter a private address that isn't registered, you'll see This is a private network address. Register it on the server to connect., along with two steps to copy.
- Put in the server's .env (replace the old line) — copy the line that registers the address (
DB_PRIVATE_ENDPOINTS=…) into the server's settings file. - Apply on the server — run the command shown, on the server.
Then click Check connection again. Registering an address is the server operator's job; it isn't a setting you can allow from inside the app.
The connection list
Each connection gets one row — database type, scope, table count (Needs analysis before the schema has been analyzed), and Test, Permissions, and ⋯. Use the Scope filter at the top to show only Global or Team connections.
- Test — checks that the connection works and how fast it responds (Connected · Nms).
- ⋯ — Edit and Delete, plus Sync and Sync status for older sync-style connections. Deleting a connection also deletes its schema cache, permissions, and sync history.
Describing the schema
Names alone often aren't enough for the AI to understand a table properly. For a database with cryptic column names — an ERP, for example — adding descriptions does more for answer accuracy than anything else.
Click a connection's name to open its schema workspace on the right.

- In the Tables list on the left, find what you need with Search tables and columns, and filter Description status by All, Review N, or No description N.
- Pick a table to see each column's Type, Primary key or Foreign key, and Description.
- Click a description, or Add a description, to write one yourself. A hand-written description is treated as the most trustworthy.
- Generate N AI descriptions writes descriptions for every column that has none in one go, and you can Stop it partway. It keeps going if you close the workspace, but stops if you leave the Database connections screen.
- Refresh rereads the schema and DB comments from the actual database.
The badge next to a description shows where it came from. DB comment is a comment that was already in the database; AI draft is a description the AI wrote that nobody has reviewed yet. Read an AI draft, and if it's right, click Confirm. A confirmed description is trusted just like a hand-written one.
What does the AI look at to write descriptions?
On PostgreSQL and MySQL, it reads up to 200 rows of a column's values to build statistics (value ranges, formats, and so on), then sends those statistics and the table structure to the AI. The rows it read are not sent as they are. On SQL Server and Oracle, only structural information is used. Columns whose names look like personal data are left out. An AI draft is shown only to agents that can see every table and column used to write it.
The AI looks at linked tables too
Real business data is hard to make sense of from one table alone. So when the AI picks the tables that fit a question, it also looks at the linked tables.
- Declared foreign keys — links defined in the database.
- Candidate links — even without a foreign key, columns whose names and types all match another table's primary key are treated as a candidate. They're marked as unconfirmed links, and the AI uses them only as a hint for its own judgment.
- Descriptions of same-name columns — a column with no description borrows a description a person wrote (by hand or as a DB comment) for the column of the same name in another table.
For a question that needs data from several connections, the AI can combine the query results of 2 to 4 connections (JOIN, UNION) to answer. Each of those queries only reads, and returns at most 1,000 rows. If any one of them is denied, fails, is waiting for approval, or comes back truncated, the AI won't present the combined result as if it were a complete answer.
Good descriptions mean less guessing for the AI, but they don't guarantee the result. Put the business meaning, units, and keys in your descriptions, and review the results for numbers that matter.
Deciding who can use it (Permissions)
Use Permissions on the row to decide which agents and teams can use this database.
- Who can use it — All in scope (anyone within the connection's Available to scope) or Listed only.
- Add grantee — in Grantee, choose Agent or Team, and set Tables to All or Selected. For Selected, search the schema and pick the tables. Choose the columns to hide in Blocked columns. Click Add to save.
After you add grantees, choose Listed only and click Apply: agents and teams that aren't on the list can no longer use this database. If you delete the last permission while only listed grantees can use the connection, every agent and team is blocked, so read the warning in the delete confirmation carefully.
Personal agents are the exception: they always use only the connections they've been given a permission for, and that permission's tables, blocked columns, and write setting always apply, whatever Who can use it is set to. The grantee list shows only the personal agents you created. A permission already given to someone else's agent is Narrow only — you can only remove tables, add blocked columns, turn writing off, or shorten the write period.
For organization and team agents to query, Query databases must also be on in their Agents settings.
Allowing the AI to write
New connections are read-only. To allow writes on a PostgreSQL or MySQL connection:
- In ⋯ → Edit on the row, turn on Allow AI writes and click Save. A warning appears that data can be changed permanently. Once you save, the row shows AI write.
- For a connection that only listed grantees can use, and for personal agents, writing must also be allowed in the permission. Turn on Allow writes in the permission and click Add (or Save) to open the Grant write access window. Type
GRANT-WRITEexactly, capitals included, give a Reason of at least 10 characters and an Expires period (7, 30, or 90 days, or Never; 90 days by default), then click Grant write access.
Once the period ends, the permission shows Write expired and can no longer be used to write. Commands that change the schema (DROP / ALTER / TRUNCATE) are always blocked, even with writing turned on. If you allow writes, use a database user dedicated to that purpose rather than a powerful admin account.
Older sync-style connections
New connections only query live. Connections created earlier with the sync method show Embedding sync or Query + embedding sync. These don't resync automatically, so to bring the latest rows into Knowledge, click ⋯ → Sync. Sync status shows the row count per table, the last sync time, and errors. The AI can't query an Embedding sync connection directly.
Data access policies and records
The Data access policies, PII masking rules, and Query audit log tabs at the top of this screen manage the rules that allow, deny, or require approval for queries, the rules that mask sensitive data, and the query record. See Data access policies for details. Queries caught by a rule set to Approval required are decided by an owner or admin in Approvals.