Before you begin
- An Infisical organization where you’re an Agent Vault admin. Organization admins can join Agent Vault as an admin themselves, without being added by someone else.
- The Infisical CLI installed on the host that will run the proxy and on the host that will run the agent. For this guide they can be the same machine.
- A GitHub account, to create the token you’ll broker.
- Optional: GitHub’s
ghCLI, used for the check at the end. Acurlfallback is provided, so this isn’t required.
1. Create an access bundle
First, get a GitHub personal access token to broker:- Go to GitHub → Settings → Developer settings → Personal access tokens → Fine-grained tokens.
- Select Generate new token, give it a name, set an expiration, and choose the resource owner.
- Leave the permissions at their defaults. The check at the end of this guide calls
GET /user, which any valid token can reach; later, grant only what your agent actually does. - Select Generate token and copy the
github_pat_…value. GitHub only shows it once.
code-review, and open it.


1
Pick the GitHub template
The template fills everything in for you: the host
api.github.com and the header GitHub expects, Authorization: Bearer <token>.2
Details
Keep the service name
github and the host pattern api.github.com.3
Credential
Paste your
github_pat_… token into Token. It’s stored encrypted and never shown again.4
Review and create
Check the host and the header, then select Add Service.
Not on the template list? Pick Custom and set the host, header name, and prefix yourself. See Access bundles and services.
2. Enroll a proxy
Go to Proxies, select Create Proxy, name it, and select Create. The dialog shows a one-time enrollment token and the command to run.
17323. Leave it running and note this host’s address; step 4 points the agent at it. Within a minute its status on the Proxies page turns to Healthy.
Fine for trying it out, but this dies with your terminal. The same dialog has Docker and systemd snippets, and Proxies covers running it for real.
3. Create a session
Go to Sessions, select Create Session, pickcode-review, and select Create Session.


4. Launch your agent
On the host where the agent runs, pass the token and the proxy’s address. Everything after-- is your agent’s own command:
claude with its HTTP traffic routed through the proxy. Calls to api.github.com leave the proxy with the real token attached; everything else goes out untouched. That host needs no Infisical login: the session token is the only thing on it.
On macOS the first run asks for your password once. It adds the proxy’s certificate to your login keychain, which is what lets tools like
gh accept its certificates.5. Verify it works
Each check below makes the sameGET /user call to api.github.com, and the client never sends a real token. As the request passes through the proxy, the real value of your GitHub token is attached, so GitHub returns your account profile even though the token never reached the client. That is the whole point: real authenticated work without the caller ever holding the credential.
- Ask your agent
- gh CLI
- curl
The agent you just launched is already brokering. In its session, send:
Run curl -sS https://api.github.com/user and show me the output.
GitHub answers with your profile. Run the same curl outside the agent and GitHub answers 401.Getting a
401? The credential wasn’t applied. Open the code-review access bundle and confirm a service covers api.github.com; if one does, the stored token is wrong. A 407 or 403 from the proxy itself means the session token was missing, revoked, or expired.Working on your own machine and signed in with
infisical login? Skip the Sessions page: infisical agent-vault run --access-bundle code-review --proxy <proxy-host>:17323 -- claude creates a session for you and revokes it when the agent exits. For an agent that runs unattended, run it as a machine identity instead — see Sessions.Next steps
Access bundles
Add more services, choose credential types, and grant access bundles to your team.
Sessions
Choose how long a session lives and revoke one while an agent is running.
Proxies
Run the proxy for real, decide what happens to other hosts, and pin its certificate.
CLI reference
Every flag of
infisical agent-vault proxy and infisical agent-vault run.