Prerequisites
- An Infisical organization where you’re an Agent Vault admin
- The Infisical CLI installed on the host that will run the proxy and on the host that will run the agent. For this guide, both hosts can be the same machine
Step 1: Set up in Infisical
Create an access bundle
First, create an access bundle that defines which APIs (services) the agent can access.1
In Infisical, open Agent Vault from the product switcher and go to Access Bundles.
2
Select Create Access Bundle. Give the access bundle a Name, then select Create Access Bundle.

3
Select the access bundle you just created, then select Add Service.

4
5
Once you’ve configured the service, select Add Service.
Enroll a proxy
Next, enroll a proxy to intercept API calls from your agent.1
Go to Proxies and select Create Proxy.
2
Give the proxy a Name, then select Create. This creates a one-time enrollment token. Copy the command shown—you’ll need it in the next step.

3
On the host that will act as the proxy, run the command from the previous step.This enrolls the proxy, which starts listening on port
17323. Leave it running and note this host’s address—you’ll need it when launching your agent.This runs the proxy in your current terminal, so the proxy stops when the terminal closes. For a persistent setup, use the Docker or systemd snippet from the enrollment dialog.Check out the proxies documentation for more information.
Create a session
Next, create a session with your access bundle attached.1
Go to Sessions and select Create Session.
2
Pick the Access Bundle the agent should use, set a duration under Expires, then select Create Session.

3
This creates the session and gives you a command to run your agent with it. Copy the command—you’ll need it in the next step.

Step 2: Launch your agent
On the host where the agent runs, paste the command you copied in the previous step. Replace<proxy-host> with your host’s actual domain or IP address, and <agent-command> with your agent’s own command.
The CLI adds the proxy’s certificate authority to the agent process’ trusted CAs and starts the agent with its HTTP traffic routed through the proxy. Any calls to services in your access bundle leave the proxy with the real credential attached, while calls to any other host go out normally.
On macOS, you’ll need to enter your user password when running your agent for the first time. This is because macOS needs your approval to add the proxy’s certificate to your keychain.
Step 3: Verify it works
- With your agent
- With
curl
In your running agent’s session, ask it to make the call. For example:
Troubleshooting
Authentication error from the upstream API
Authentication error from the upstream API
The credential wasn’t applied. Open your access bundle and confirm a service covers the host you called. If one does, the stored token is likely wrong.
407 from the proxy
407 from the proxy
The session token was missing from the request. Confirm you passed
--session-token, or that the token appears as the userinfo in your HTTPS_PROXY URL (like http://x-agent-vault:<session-token>@<proxy-address>).403 from the proxy
403 from the proxy
This could be for two reasons:
- The session was revoked or has expired. Check the Sessions page in Infisical, and create a new one if needed.
- Under the proxy’s strict traffic policy, no service in the bundle covers the host you called. Add a service that does, or use a pass-through service.
Next steps
Access bundles
Lists of services that AI agents can access during a session.
Sessions
Time-bound grants that let AI agents access services without holding real credentials.
Proxies
Forward proxies that intercept an AI agent’s requests and attach real credentials on the way out.
CLI reference
Every flag of
infisical agent-vault proxy and infisical agent-vault run.