Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
---
title: "Set up credentials"
sidebarTitle: "Set up credentials"
description: "Add the secret the Agent Proxy brokers, check for its proxied service, then pick where the proxy runs."
---
import AgentProxyMovedCallout from "/snippets/agent-proxy-moved-callout.mdx";
<AgentProxyMovedCallout />
Every Agent Proxy setup starts with the same two things in Infisical: a secret holding the real credential, and a proxied service saying which host that credential is applied to. This page adds the secret and checks that the folder has a proxied service, then points you at the setup that matches where your agent runs.
GitHub is this guide's running example. Any other API works the same way, and the steps are identical.
## Before you begin
- An Infisical Secrets Management project.
- A GitHub account, to create the token you'll broker.
## 1. Add a secret
First, get a GitHub personal access token to broker:
1. Go to [GitHub → Settings → Developer settings → Personal access tokens → Fine-grained tokens](https://github.com/settings/personal-access-tokens).
2. Select **Generate new token**, give it a name, set an expiration, and choose the resource owner.
3. Leave the permissions at their defaults. The check at the end of this guide calls `GET /user`, which any valid token can reach, so no permissions are needed here; later, grant only what your agent actually does.
4. Select **Generate token** and copy the `github_pat_…` value. GitHub only shows it once.
Then, in your Infisical project, create a folder for the agent (for example `/coding-agent` in the `dev` environment) and add a secret named `GITHUB_PAT` with that token as its value. It's a regular Infisical secret.

## 2. Check for a proxied service
If the folder already has a proxied service for `api.github.com`, continue to [pick where the proxy runs](#3-pick-where-the-proxy-runs). If it doesn't, set up your agent with the [Agent Vault quickstart](/documentation/platform/agent-vault/quickstart) instead, because you can't create new proxied services.
## 3. Pick where the proxy runs
The proxy has to sit between your agent and the internet, so where it runs follows from where your agent runs. Pick the one that matches yours and follow it to the end; each is a complete walkthrough that continues from here.
<CardGroup cols={2}>
<Card title="Local Proxy" icon="laptop" href="/documentation/platform/agent-proxy/quickstart/local-proxy">
For agents that live as long as your terminal session: Claude Code, Codex, or a script you're iterating on.
</Card>
<Card title="Standalone Proxy" icon="server" href="/documentation/platform/agent-proxy/quickstart/standalone-proxy">
For agents running on your infrastructure, unattended or shared across your team.
</Card>
</CardGroup>