Integrations
Concept

Manage Agent credentials

Add, rotate, validate, share, and remove the credentials that let an Agent connect to communication platforms and external providers.

For
Agent operators, Organization administrators, and security reviewers
On this page
  1. Before you begin
  2. Credential boundaries
  3. Platform credentials
  4. Agent integration credentials
  5. Shared Credentials
  6. Choose the correct boundary
  7. Supported providers
  8. How credentials reach the Agent
  9. 1. Open Keys & integrations
  10. 2. Add a credential
  11. 3. Attach a Shared Credential
  12. 4. Configure Platform credentials
  13. 5. Replace or rotate
  14. 6. Validate a credential
  15. 7. Remove a credential
  16. Runtime activation
  17. Google Workspace credentials
  18. GitHub boundaries
  19. Jira and Confluence boundaries
  20. Firecrawl credentials
  21. Credential security model
  22. Permission boundary
  23. API reference
  24. Troubleshooting
  25. Recommended practices
  26. Next steps
  • Integrations
  • 12–15 minutes

Agent credentials let an Agent authenticate with its communication platform and external services such as GitHub, Jira, Google Workspace, and Pipedrive.

Agent Barn stores credential payloads encrypted, and exposes only non-sensitive metadata after they are saved.

Before you begin

You need:

  • Access to the Agent
  • agent.update permission to update its configuration
  • agent.secret.manage permission to add, replace, validate, or remove credentials
  • Lifecycle permission when applying changes to a running Agent
  • A credential with the least privileges required for the Agent’s work

The raw Agent update API accepts configuration changes only while the Agent is stopped. The web interface uses an explicit restart workflow when credentials are changed on a running Agent.

Understand the credential boundaries

Agent Barn has several credential classes with different owners and lifecycles.

Credential class Scope Examples Managed from
Platform credentialOne Agent’s communication platformSlack bot token, Teams app password, Telegram bot tokenAgent configuration
Agent integration credentialOne Agent and one providerGitHub PAT, Jira API token, Google refresh tokenAgent configuration
Shared CredentialOne organization, attachable to AgentsProduction GitHub, Support JiraOrganization settings
User configuration credentialOne userSlack configuration token used to create appsPersonal settings
Deployment credentialAgent Barn infrastructureEncryption key, platform Firecrawl keyDeployment configuration

Platform credentials

Connect one Agent to its communication platform. Managed in the Agent’s Platform credentials section, never as an ordinary integration Secret.

Per-Agent integration credentials

Give one Agent access to one external provider. At most one credential per provider, entered manually and encrypted at rest.

Shared Credentials

Organization-owned credentials that many Agents can attach by reference, rather than each storing its own copy.

Platform credentials

A Platform credential connects the Agent to its selected communication platform.

Platform Credential fields
SlackApp-level token and bot token
Microsoft TeamsApp ID, app password, and tenant ID
TelegramBot token
DiscordBot token

These credentials are separate from normal provider integration credentials. A Slack bot token lets the Agent connect to Slack as its communication channel; it is not a manually managed Slack integration Secret.

When a Slack Skill requires Slack access, Agent Barn derives and maintains the corresponding internal integration Secret from the Agent’s Slack bot token.

Slack and Discord bot tokens must be unique across active Agents. Agent Barn rejects a token that is already assigned to another active Agent.

Agent integration credentials

An Agent integration credential, also called an Agent Secret, gives one Agent access to one external provider. An Agent can have at most one credential for each provider.

Provider slots
Agent
├── GitHub credential
├── Jira credential
├── Google Workspace credential
└── Pipedrive credential

For a given provider, the Agent uses either a manually entered per-Agent credential, or a reference to an Organization Shared Credential. It cannot use both simultaneously.

Credential contents are validated against a provider-specific schema before encryption, and again after decryption.

Shared Credentials

Shared Credentials are encrypted provider credentials owned by an organization. They let administrators create a credential once, and allow organization members to attach it to permitted Agents.

Shared Credential fan-out
Organization Shared Credential
Production GitHub

        ├── Agent A
        ├── Agent B
        └── Agent C

Supported Shared Credential providers are GitHub, Jira, Confluence, Bitbucket, and Zoho Mail.

Any organization member can list and attach available Shared Credentials to Agents they are permitted to configure. Organization Owners and Administrators manage the shared definitions.

See Use shared credentials for the complete lifecycle.

Choose the correct credential boundary

Requirement Use
Only one Agent needs the providerPer-Agent integration credential
Several Agents should use one manual credentialShared Credential
The provider uses an individual OAuth grantPer-Agent OAuth credential
The credential connects the Agent to Slack, Teams, Telegram, or DiscordPlatform credential
All Agents use the deployment’s Firecrawl servicePlatform Firecrawl configuration
One Agent must override the platform Firecrawl keyPer-Agent Firecrawl credential
A token is used to create Slack applications for a userUser Slack configuration token

Use separate provider accounts when Agents need different access boundaries.

Supported integration providers

Provider Method Typical access boundary Live validation
GitHubManual tokenOwner and optional repositoriesYes
JiraEmail and API tokenAtlassian site and account permissionsYes
ConfluenceEmail and API tokenAtlassian site and space permissionsYes
BitbucketEmail and API tokenWorkspace and optional repositoriesYes
Google WorkspaceOAuthSelected services and access levelYes
Zoho MailOAuth client credentialsOne Zoho Mail accountNot currently available
FirecrawlAPI keyFirecrawl Cloud or custom instanceNot currently available
PipedrivePersonal API tokenPipedrive accountYes
SlackDerived from Platform bot tokenSlack workspace and granted bot scopesAutomatic
Zoho CalendarProvider schema existsZoho Calendar accountNot offered in the web interface

Live validation support is separate from schema validation. Every saved payload must match its provider schema, but only providers with a validator can test the credential against the external service.

How credentials reach the Agent

Credential storage and runtime activation are separate phases.

  1. Stored encrypted credential
  2. Agent start
  3. Runtime configuration
  4. External provider
Materialization
Enter credential


Validate payload shape


Encrypt and store


Start or restart Agent


Decrypt for runtime materialization

       ├── aai-cli profile and secret store
       ├── gog Google Workspace configuration
       ├── runtime environment
       └── integration policy context


External provider

The encrypted database value is the source of truth. Agent Barn decrypts credentials only when required for validation or runtime materialization.

Read APIs return metadata such as the provider, the display label, whether the credential is Shared, and the Shared Credential name and ID where applicable. They do not return the credential content.

Open Keys & integrations

  1. Open the Agent.
  2. Go to Configuration.
  3. Select Keys & integrations.
  4. Review Platform credentials.
  5. Review Integration credentials.

Existing credentials appear as configured metadata with their values hidden. A Shared Credential attachment is labeled with the Shared Credential’s name.

Add an integration credential

  1. Open Keys & integrations.
  2. Select Edit.
  3. Go to Integration credentials.
  4. Select the provider.
  5. Choose Enter credentials.
  6. Enter every required field.
  7. Review the provider’s scope guidance.
  8. Apply the configuration.
  9. Restart the Agent if it was running.
  10. Validate the credential.
  11. Test a provider-dependent task.

The Agent update replaces or creates the credential for that provider.

Attach a Shared Credential

  1. Open Keys & integrations, or the Agent’s Skill configuration.
  2. Select the required provider.
  3. Choose Use shared credential.
  4. Select the named Shared Credential.
  5. Apply the configuration.
  6. Restart the Agent if needed.
  7. Validate the attached credential.
  8. Test the integration.

The Agent stores a reference to the Shared Credential, rather than another copy of its encrypted payload. At Agent start, Agent Barn resolves and decrypts the referenced Organization credential.

An Agent cannot attach a Shared Credential for a provider that already has a manual credential. Remove or replace the manual credential as part of the change.

Add credentials while assigning a Skill

Skills can declare required providers. When assigning a Skill, Agent Barn checks whether the Agent’s resulting credentials cover those providers.

  1. Assign a Jira Skill The Skill declares its required providers
  2. Agent Barn checks provider coverage Per-Agent credential, Shared Credential, or a derived Slack credential
  3. Configure the missing credential The assignment cannot be saved while a required provider is unavailable

The Agent cannot save a Skill assignment when its required provider remains unavailable.

Configure Platform credentials

To rotate or replace a communication-platform credential:

  1. Open Keys & integrations.
  2. Select Edit.
  3. Find Platform credentials.
  4. Enter the replacement values.
  5. Leave unrelated fields blank to preserve their existing values.
  6. Apply the configuration.
  7. Allow the Agent to restart.
  8. Verify that the Agent reconnects to its platform.
  9. Review health and logs.

For Slack, rotate the bot and app-level tokens in the same controlled maintenance window when both changed at the provider.

For Microsoft Teams, keep the App ID, tenant ID, and app password aligned with the same application registration.

Replace or rotate an integration credential

Stored values cannot be retrieved and edited field by field.

  1. Prepare the complete replacement payload.
  2. Open the Agent’s integration configuration.
  3. Select the provider.
  4. Enter all required fields again.
  5. Apply the change.
  6. Restart the Agent.
  7. Validate the new credential.
  8. Revoke the old credential at the provider after verification.

A successful per-Agent replacement detaches any Shared Credential previously used for that provider.

Validate a credential

Validation tests an existing credential against its external provider without changing or re-saving it.

  1. Open Keys & integrations.
  2. Find the configured integration.
  3. Select Validate.
  4. Review the status, identity, missing scopes, or provider error.

Possible results are valid, warning, and invalid. A warning can indicate that authentication succeeded but expected scopes are missing. Validation does not persist changes.

Live validation is not available for every provider. For providers without a validator, use a controlled Agent task and review the resulting logs.

Remove an integration credential

  1. Stop the Agent, or begin the web interface’s restart-aware edit flow.
  2. Open Keys & integrations.
  3. Select Edit.
  4. Find the configured provider.
  5. Select Remove.
  6. Review the resulting Skill requirements.
  7. Apply the configuration.
  8. Restart the Agent.
  9. Confirm that the provider is no longer available.

Agent Barn rejects removal when a remaining assigned Skill requires the provider. To remove a required credential, identify the Skills that require it, confirm that the active Template permits their removal, remove or replace those Skills, remove the credential in the same configuration change where appropriate, then restart and verify the Agent.

Runtime activation

Credential changes take effect in the Agent runtime after a start or restart.

Stopped Agent

Stopped
Save credential


Credential stored


Start Agent


Runtime receives new configuration

Running Agent

Running
Apply credential change


Stop Agent


Update encrypted configuration


Start Agent

Google Workspace credentials

Google Workspace uses a separate OAuth flow and the gog CLI. One credential can cover Gmail, Calendar, Drive, and Sheets.

The credential records the Google account email, the selected services, the granted scopes, the refresh token, the read-only or full-access selection, and the OAuth client information.

Changing the selected services or access level requires reconnecting, so Google can grant the correct scopes.

Google Workspace is per-Agent and cannot be attached as a Shared Credential. Continue to Connect Google Workspace for the full setup.

GitHub repository boundaries

A GitHub credential contains a token, an owner or organization, and an optional repository list.

Leaving the repository list empty allows the Agent to address any repository the token itself can access, provided the Agent specifies the repository.

For tighter control:

  1. Use a fine-grained token.
  2. Limit it to required repositories.
  3. Grant only necessary permissions.
  4. Repeat the repository restriction in Agent Barn.
  5. Validate and test the intended repository.

The provider’s token permissions remain the ultimate authorization boundary.

Jira and Confluence boundaries

Jira and Confluence credentials inherit the permissions of the Atlassian account associated with the API token.

Agent Barn stores the site URL, the authentication type, the account email, the API token, and the resolved Cloud ID for scoped tokens.

Use an account limited to the intended projects or spaces. Selecting a site URL in Agent Barn does not reduce broader permissions already granted to the Atlassian account.

Firecrawl credentials

Firecrawl can be provided by the Agent Barn deployment. When the platform Firecrawl URL and API key are configured, Agents receive the platform web-fetch and search capability by default.

A per-Agent Firecrawl credential overrides the platform key for that Agent. Use a per-Agent override when:

  • The Agent must use Firecrawl Cloud
  • The Agent must use another Firecrawl instance
  • Separate usage or billing boundaries are required
  • The platform credential must not be used

Credential security model

Agent integration credential payloads are:

  • Validated against provider-specific schemas
  • Serialized as structured JSON
  • Encrypted as a single Fernet-encrypted blob
  • Revalidated after decryption
  • Hidden from read responses
  • Materialized only for runtime or validation use

Agent Barn enforces one Agent Secret per provider at the database level. A credential row contains either encrypted per-Agent content, or a Shared Credential reference — never both.

Credential-related event payloads and diagnostic metadata must not contain secret contents.

Permission boundary

Agent credential access follows the Agent access model.

Action Required authority
See that a provider is configuredAccess to the Agent
Add or replace a credentialagent.update and agent.secret.manage
Remove a credentialagent.update and agent.secret.manage
Validate a credentialagent.secret.manage
Restart after a changeLifecycle permission
Create or modify a Shared CredentialOrganization Owner or Administrator
Attach an existing Shared CredentialAccess to configure the Agent

API reference

Read credential metadata

HTTP
GET /api/v1/organizations/{organization_id}/agents/{agent_id}
Response
{
  "secrets": [
    {
      "provider": "github",
      "secret_name": "GitHub credential",
      "shared_credential_id": null,
      "shared_credential_name": null
    },
    {
      "provider": "jira",
      "secret_name": "Support Jira",
      "shared_credential_id": "3fd08cf5-59c5-494b-9449-a0413109a0ca",
      "shared_credential_name": "Support Jira"
    }
  ]
}

No content field is returned.

Add or replace a manual credential

The Agent must be stopped.

HTTP
PATCH /api/v1/organizations/{organization_id}/agents/{agent_id}
Content-Type: application/json
Request body
{
  "secrets": [
    {
      "provider": "github",
      "content": {
        "token": "REDACTED",
        "owner": "example-org",
        "org": "example-org",
        "repos": [
          "support-api",
          "support-web"
        ]
      }
    }
  ]
}

Providers not included in secrets remain unchanged. Every credential value in these examples is redacted — supply your own.

Attach a Shared Credential

Request body
{
  "shared_credentials": [
    {
      "shared_credential_id": "3fd08cf5-59c5-494b-9449-a0413109a0ca"
    }
  ]
}

The Shared Credential must belong to the Agent’s organization.

Remove credentials

Request body
{
  "removed_secret_providers": [
    "github",
    "jira"
  ]
}

A provider cannot appear in both secrets and removed_secret_providers in the same request.

Replace Platform credentials

For a stopped Slack Agent:

Request body
{
  "slack_bot_token": "REDACTED",
  "slack_app_token": "REDACTED"
}

Only submit platform fields that belong to the Agent’s selected platform.

Validate an integration

HTTP
POST /api/v1/organizations/{organization_id}/agents/{agent_id}/integrations/{provider}/validate

Example:

HTTP
POST /api/v1/organizations/{organization_id}/agents/{agent_id}/integrations/github/validate
Response
{
  "validation_status": "valid",
  "validation_identity": "example-org",
  "validation_error": null,
  "missing_scopes": []
}

Validation requires agent.secret.manage.

Troubleshooting

I cannot see the existing token

Expected: values are write-only

This is expected. Credential values are write-only and are never returned after storage.

Enter a complete replacement credential when rotation is required.

The API says the Agent must be stopped

Raw updates require a stopped Agent

Raw configuration updates are rejected while an Agent is running. Stop it, submit the update, and start it again.

The web interface provides a restart-aware application flow.

I cannot remove a credential

A Skill still requires the provider

A remaining assigned Skill probably requires that provider.

Remove the Skill, replace it with another compatible configuration, or keep the credential.

I cannot add a Slack integration credential

Slack is derived from the bot token

Slack credentials are derived from the Agent’s Slack Platform bot token and managed automatically.

Update the Slack bot and app-level tokens under Platform credentials.

A Shared Credential conflicts with a manual credential

One source per provider

An Agent can have only one credential source per provider.

Remove or replace the manual credential before attaching the Shared Credential.

Credential validation returns missing scopes

Authentication succeeded, scopes did not

Authentication succeeded, but the provider reports that the credential lacks expected permissions.

Grant only the required missing scopes, rotate or reconnect the credential, and validate again.

The credential validates but the Agent still cannot use it

Check restart, Skills, and boundaries

Check that:

  • The Agent was restarted after the change
  • The related Skill is assigned
  • The Agent pins the expected Skill version
  • Provider resources are within the credential’s permission boundary
  • Runtime startup completed successfully
  • No Skill mount collision occurred

Review Agent health and logs.

Live validation is unavailable

Not every provider has a validator

Not every provider has a live validator. Confirm that the payload saved successfully, restart the Agent, run a controlled provider task, and inspect the logs.

Replacing one field removed another required value

Payloads replace, not merge

Credential replacement uses a complete provider payload. Resubmit all required fields, including non-secret identity and scope fields.

A Slack or Discord token is already in use

Bot tokens must be unique

Bot tokens must be unique across active Agents. Create or rotate to a different provider bot identity.

Removing a credential did not revoke the external token

Revocation happens at the provider

Agent Barn removes its stored access but cannot guarantee revocation at the provider.

Revoke the token through the provider’s administration interface.

Google access stopped after changing services

New consent is required

Changing Google services or read-only status requires another OAuth consent flow. Reconnect Google Workspace with the desired selection.

  • Use a dedicated identity for each production Agent
  • Grant the minimum provider scopes required
  • Prefer read-only access when writes are unnecessary
  • Limit credentials to intended repositories, projects, spaces, or services
  • Use Shared Credentials only when Agents should truly share one identity
  • Keep OAuth credentials per Agent
  • Rotate credentials on a documented schedule
  • Validate credentials after creation and rotation
  • Restart and test the Agent after every credential change
  • Revoke old tokens after confirming the replacement works
  • Remove unused credentials promptly
  • Never place credentials in Templates, Skills, prompts, memory, or logs
  • Restrict agent.secret.manage to trusted operators
  • Review Agent access before granting secret-management permission
  • Investigate validation warnings and missing scopes rather than granting broad access

Next steps

Continue to Connect Google Workspace to configure a per-Agent OAuth credential for Gmail, Calendar, Drive, and Sheets.

Documentation