Give agents access without giving away the keys

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

Secret never enters agent contextAgent receives placeholderRequests outside policy are blocked

The request path

A useful boundary at the moment it matters.

The agent gets a usable interface, not a transferable secret. Stashbase evaluates every credentialed request before it leaves your environment.

01

Your agent asks for access

It uses a placeholder such as $GITHUB_TOKEN — never the credential itself.

02

Stashbase checks the policy

The requested host, method, and path must match the rules you committed.

03

The approved request leaves

The secret is injected at the boundary and stays out of the agent context.

Policy is the product

Turn an API key into a narrowly scoped capability.

Keep rules beside your code. Allow only the endpoints an agent needs, and explicitly block destructive operations even when a broader rule changes later.

Restrict by destination, method, and URL path.
Review policy changes in pull requests.
Record allowed and denied exchanges without logging secret values.
.stashbase/agent/codex.toml
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/*"]

Run your agent
$ stashbase agent run

Where agents run

Use the same control model from laptop to production.

Best for developer machines

Wrap a local coding agent

Run Codex, Claude Code, or your own CLI through a local Stashbase proxy.

Best for application workloads

Embed it in your harness

Use Agent Proxy when your application orchestrates agents and tools in production.

Choose your boundary

Keep the same profile while placing the proxy exactly where your team needs its trust boundary.

01
Local proxy
Your machine

Run the proxy on your machine for a simple, private local development setup.

02
Remote proxy
Stashbase infrastructure

Run remotely for stronger security and isolation between agents and secrets.

Let your agents do more, with less access.

Start with one workflow and make every credentialed request intentional.