> Documentation index: [/llms.txt](/llms.txt). Every page as one file: [/llms-full.txt](/llms-full.txt).

# Use connections in chats and agents

Use connections in chats and agents [#use-connections-in-chats-and-agents]

Pick a connection in the composer to use it in one chat, or give it to an agent to use it in every chat with that agent.

You can pick any connection you see on the **Connectors** page: your private ones and the ones shared with the workspace.

Use a connection in one chat [#use-a-connection-in-one-chat]

1. In the composer, select &#x2A;*+**, then **Connectors**.

2. Select the connections the agent may use. Selected ones show a check.

   <img alt="The composer's add menu with Connectors open, listing Acme sales database and DeepWiki, and Acme CRM and Acme shared drive with a Connect button" src="__img0" />

3. Ask your question and send it.

The agent queries the connection when your question needs it.

<img alt="A chat answering which product category brought in the most revenue this year, after two queries to the Acme sales database, with a table of revenue per category" src="__img1" />

* The logos of the connections in use appear next to &#x2A;*+**. Point at one to see why it is on: **Added to this chat**, **From** and the agent's name, or **Needs your sign-in**. Select them to change the selection.
* **Connect** next to a greyed-out connection means you are not signed in to it yet. Select it to sign in; see [Reconnect an account](/docs/platform/connectors/reconnect).
* A connection the agent already has shows a lock (**Always on for this agent**). It is used in every chat with that agent and cannot be turned off for one chat.
* **Add connection** at the bottom of the list creates a new connection without leaving the chat.
* Expand the step above the answer to see the queries the agent ran.

For the composer itself, see [Chat basics](/docs/platform/chat/basics) and [Tools](/docs/platform/chat/tools).

Give a connection to an agent [#give-a-connection-to-an-agent]

1. Open the agent's settings. See [Configure an agent](/docs/platform/agents/configure).

2. Select **Connectors** in the settings menu.

3. Select the connections and MCP servers the agent needs. Each shows **Selected**; select it again to remove it.

   <img alt="The Connectors settings of the published Sales analyst agent with Acme sales database and the DeepWiki MCP server selected, Acme CRM and Acme shared drive marked Not connected, and Publish at the top" src="__img2" />

4. Select **Publish**, write a short **What changed** note, and select **Publish** in the dialog.

* Your selection saves to the agent's draft by itself. Chats with the agent keep the connections of its published version until you publish; with the default roles, workspace editors and admins can publish. See [Test and publish an agent](/docs/platform/agents/test-and-publish).
* **New connection** creates a connection or adds an MCP server from here.
* The number next to **Connectors** counts the connections the agent has.
* In every chat, the agent uses account connections with the sign-in of the person chatting. Someone who is not signed in gets the answer without that connection.
* A private connection is only yours. Share it with the workspace (**Space**) if other people will chat with the agent.

Troubleshooting [#troubleshooting]

| Problem                                                     | What to do                                                                                                                                                                       |
| ----------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| A connection is missing from the list                       | It is private to someone else or belongs to another workspace. Ask its owner to share it, or create your own.                                                                    |
| **Authentication required** appears when you send a message | You are not signed in to one of the connections. Select **Connect** next to it in the composer, or on the **Connectors** page.                                                   |
| The agent answers without using the database                | Name what you want from it ("from the Acme sales database"), and check that the table it needs is switched on in the [semantic layer](/docs/platform/connectors/semantic-layer). |

To attach connections to agents with an API key, see [Create and query connections](/docs/api/connectors/connections/overview) in the API documentation.
