Before you start
- You need permission to edit the custom agent and access to the Vault secret you want to bind.
- In an organization, your role must grant the Agent-owned credentials feature. If Agent-owned is unavailable, ask an admin to enable the feature on your role.
- The agent can’t be shared with Anyone. Set Public link access to No public link in the agent’s sharing settings.
Create, bind, and use the secret
1
Create a secret in Vault
Open your Vault. Under Secrets, click Add, enter a name and the API key, and add the API host under Allowed domains. Click Create.If you already have a personal or team secret you can access, skip this step. See Create a secret for details on allowed domains.
2
Choose who can use the secret
Open the custom agent. In the right sidebar, select the Agent tab, then open Secrets under What I know.
Click Add secret. In Who can use this secret?, select Agent-owned and click Continue.


3
Name and add the binding
In Name, enter the environment-variable name the agent should use, such as 
SUPPORT_API_KEY. Under Source, choose Existing secret, select the Vault secret, and click Add.
4
Use the secret in an API request
In the agent’s chat, ask it to make an API request and name the variable. For example: “List open tickets from the support API. Use
SUPPORT_API_KEY to authenticate.”Sandbox code reads the environment variable. For a new Vault secret, the code gets a stand-in instead of the real API key. Gumloop swaps in the real key when the code sends the stand-in in a supported authentication header to an allowed domain. Don’t ask the agent to print the key or save it to a file.