Skip to content

Credentials for Agent tools

Credentials are the API keys, tokens, connection strings, and other private values an Agent needs to use external services.

How credentials work

SandBase stores each credential as an encrypted, write-only value. The Console and public API expose its name, scope, status, and a masked hint—not the saved value. At execution time, the runtime resolves active credentials that match the Agent or Service configuration.

Managing credentials

In the Console

Navigate to Developer → Credentials.

When adding a credential, choose the narrowest useful scope:

ScopeUse it for
WorkspaceA value available to eligible Agents in the current workspace
AgentA value associated with one Agent ID
ServiceA value available to a published Service workflow

Saved values cannot be read back. To replace one, use the credential's Manage action and rotate it. A credential can be disabled; disabled records remain visible as metadata.

Common Variables

VariableExamplePurpose
GITHUB_TOKENghp_xxxxAuthenticate with GitHub API
DATABASE_URLpostgres://...Connect to a database
SLACK_WEBHOOKhttps://hooks.slack.com/...Post notifications
OPENAI_API_KEYsk-...Call OpenAI directly from a tool

Security

  • Values are encrypted before storage and omitted from credential responses
  • The Console shows only masked metadata after creation
  • Scopes control where a credential can be selected; use Agent scope when a workspace-wide value is unnecessary
  • Keep secrets out of prompts, instructions, test input, and manually authored event payloads

Next steps