Your agent asks for access
It uses a placeholder such as $GITHUB_TOKEN — never the credential itself.
Let agents call the APIs they need while credentials stay behind a trusted Stashbase boundary. You decide exactly which requests a secret can authorize.
Agent
$GITHUB_TOKEN
Stashbase
checks the policy
Approved API
api.github.com
The request path
The agent gets a usable interface, not a transferable secret. Stashbase evaluates every credentialed request before it leaves your environment.
It uses a placeholder such as $GITHUB_TOKEN — never the credential itself.
The requested host, method, and path must match the rules you committed.
The secret is injected at the boundary and stays out of the agent context.
Policy is the product
Keep rules beside your code. Allow only the endpoints an agent needs, and explicitly block destructive operations even when a broader rule changes later.
project = "project"
environment = "environment"
egress_hosts = ["api.openai.com", "chatgpt.com"]
# Context7 expects its key in a custom header.
[secrets.CONTEXT7_API_KEY]
hosts = ["mcp.context7.com"]
header = "CONTEXT7_API_KEY"
[secrets.STRIPE_API_KEY]
hosts = ["api.stripe.com"]
[[secrets.STRIPE_API_KEY.rules]]
effect = "allow"
hosts = ["api.stripe.com"]
methods = ["GET"]
paths = ["/v1/customers/*"]
Where agents run
Best for developer machines
Run Codex, Claude Code, or your own CLI through a local Stashbase proxy.
Best for application workloads
Use Agent Proxy when your application orchestrates agents and tools in production.
Keep the same profile while placing the proxy exactly where your team needs its trust boundary.
Run the proxy on your machine for a simple, private local development setup.
Run remotely for stronger security and isolation between agents and secrets.
Start with one workflow and make every credentialed request intentional.