Relay Docs
Agent

Adding a database

Point a governed connection at a database reachable by your agent.

You expose a database through the agent by creating a connection that names an agent.

  1. Make sure the database is reachable from the agent's replicas. For a managed agent, that is publicly with an IP allowlist or through a private endpoint to your VPC. For a self-hosted agent, it is from where you run its replicas.
  2. Create a connection: set the engine, host, port, and database, and select the agent.
  3. Choose how credentials are resolved — stored encrypted in Relay, or resolved by the agent from a credential source.
  4. Optionally attach masking rules and policies.

Members can then reach the database with relay connect <name> (see Tunnels), and every session is recorded in query audit.