Skip to main content
AI agents typically need credentials to access external services: an API key for the model provider, a token for GitHub or GitLab, and so on. OpenShell manages these credentials as first-class entities called providers. A provider is a named credential bundle. When you attach a provider to a sandbox, the gateway injects its credentials into the sandbox as environment variables at startup. Credentials never touch the sandbox filesystem.
When the trailing command in openshell sandbox create is a recognized tool name (claude, codex, or opencode), the CLI auto-creates the required provider from your local environment if one does not already exist. You do not need to create the provider separately.

Create a provider

The fastest way to create a provider is to let the CLI discover credentials from your shell environment:
This reads ANTHROPIC_API_KEY or CLAUDE_API_KEY from your current environment and stores them in the provider.

Attach providers to sandboxes

Pass one or more --provider flags when creating a sandbox:
Each --provider flag attaches one provider. The sandbox receives all credentials from every attached provider at runtime.
Providers cannot be added to a running sandbox. If you need to attach an additional provider, delete the sandbox and recreate it with all required providers specified.

Manage providers

1

List all providers

2

Inspect a provider

3

Update a provider's credentials

4

Delete a provider

Supported provider types

The following provider types are supported. The --from-existing flag reads the listed environment variables from your current shell.
Use the generic type for any service not listed above. You define the environment variable names and values yourself with --credential.

Security model

Credentials are stored in the gateway — not on disk in the sandbox. The gateway injects them as environment variables at sandbox startup. This means:
  • A compromised sandbox process cannot read credentials by scanning the filesystem.
  • Credentials are purged when the sandbox is deleted.
  • Providers can only be attached at sandbox creation time, not after the fact.

Supported inference providers

The following providers have been tested with inference.local. Any provider that exposes an OpenAI-compatible API works with the openai type. Set --config OPENAI_BASE_URL to the provider’s base URL. To configure inference routing, refer to Configure Inference Routing.

Next steps

Policies

Control what the agent can access on the network and filesystem.

Community sandboxes

Use a pre-built environment from the community catalog.

Policy schema reference

Full field-by-field YAML definition for sandbox policies.

GitHub sandbox tutorial

End-to-end walkthrough combining a GitHub provider with a scoped policy.