Generate configuration tokens.
These workspace-level tokens let Agent Barn prepare a new Slack app. Generate both values and keep them ready for the next steps.
- 01.1
Open Slack API → Your Apps.
Go to api.slack.com/apps ↗, sign in, and confirm that you are working in the workspace where this agent should operate.
- 01.2
- 01.3
- 01.4
Store both values securely.
The access token authorizes app creation and expires after 12 hours. The refresh token rotates that access. Never place either value in chat, logs, prompts, or URLs.
- 01.5
Submit the token pair in Agent Barn.
Paste the configuration access token and
xoxe-refresh token into their matching fields, then continue while the access token is still valid.
Define the bot identity.
Use recognizable, role-oriented metadata. These values are visible to teammates and can be changed later.
- 02.1
Choose the display name.
This name appears in Slack messages, mentions, and the app directory. Avoid secrets, environment names, or workspace-specific data.
RECOMMENDEDAgentBarn_PR_Reviewer - 02.2
Write a one-sentence description.
Describe the outcome teammates can expect rather than the implementation behind it.
SUGGESTEDReviews pull requests for correctness, clarity, and style, then prepares suggestions for human review.
- 02.3
Choose the icon background color.
Pick a readable color that follows your workspace convention. Agent Barn orange is the recommended default.
Aubergine#511152A familiar Slack-adjacent choice.
Blue#1264A3Calm and conventional for utility bots.
Green#2EB67DUseful for workflow or status-oriented agents.
Amber#ECB22EHigh visibility for reminders and alerts.
Agent Barn orange#CC4400Recommended for a consistent Agent Barn identity.
- 02.4
Review the public metadata.
Confirm that the name states the role, the description states the result, the color remains legible at small sizes, and no sensitive information is exposed.
- 02.5
Create the app and confirm it appears in Slack.
Save the identity in Agent Barn, complete app creation, then confirm the new app appears under Your Apps in the intended workspace before continuing.
Connect the new Slack app.
Create the app-level token, install the bot, and store the two resulting credentials that Agent Barn needs.
- 03.1
Select the new app and verify its connection settings.
Return to Your Apps ↗, open the app created for this recipe, verify the workspace, and confirm Socket Mode and the recipe's event subscriptions are enabled.
- 03.2
- 03.3
- 03.4
- 03.5
Install the app to the workspace.
Open Install App, then choose Install to [your workspace]. Review the requested permissions, make sure the workspace selector is correct, and choose Allow.

Install App → Install to your workspace. 
1 // Confirm the workspace. 2 // Approve only after reviewing permissions. - 03.6
Find the Bot User OAuth Token after installation.
After installation, Slack shows an OAuth Tokens section containing the Bot User OAuth Token. Click Copy and keep the
xoxb-value ready for Agent Barn. The token is blurred in this reference.
Installed App Settings → OAuth Tokens → Bot User OAuth Token → Copy. - 03.7
Enter both tokens in Agent Barn.
Paste the
xapp-value into App-level token and thexoxb-value into Bot token. - 03.8
Save and verify the connected app.
Save both fields and confirm Agent Barn resolves the expected Slack app and workspace. Stop if either identity is wrong.
Enter Slack tokens only in their matching Agent Barn fields. Do not include them in messages or screenshots.
Configure how the teammate operates.
Work through these settings in order. Each controls a different part of the agent’s behavior or access.
- 04.1IDENTITY
Name the teammate for its role.
The operational name appears in dashboards and audit history. A short human name makes conversations and mentions easier.
OPERATIONAL NAME AgentBarn_PR_Reviewer
Clear in dashboards and logs.
SUGGESTED HUMAN NAME Reeve
Easy to mention and remember.
- 04.2MODEL
Choose the model that performs the work.
The model affects capability, speed, and cost. The supplied configuration shows DeepSeek: DeepSeek V4 Flash 0731. Confirm it is available and appropriate for this recipe’s complexity and data sensitivity.
How to decideUse a fast model for structured, repeatable work. Use a more capable model for ambiguous context or nuanced reasoning. Evaluate representative tasks before granting broader access.
- 04.3COMMAND APPROVAL
Decide when a human must approve commands.
Start with the most restrictive mode that still makes the workflow useful.

Current default shown: Auto. RECOMMENDED START Auto
Low-risk commands run automatically; higher-risk commands still require approval.
MAXIMUM OVERSIGHT Manual
The agent asks before every command. Best for pilots and sensitive systems.
NO APPROVAL GATE Off
All prompts are skipped. Use only with tightly sandboxed, narrowly scoped, reversible tools.
- 04.4CHANNEL ACCESS
Choose which channels the agent may answer in.
Slack controls which channels the app can see; this policy controls where the agent may respond.

Current default shown: Allowlist. RECOMMENDED START Allowlist
Respond only in approved channels. Best for pilots and team-specific workflows.
BROAD AVAILABILITY Open
Respond in any reachable channel. Use only for intentionally workspace-wide roles.
- 04.5DIRECT MESSAGES
Control who can start private conversations.
Direct messages remove shared-channel context and oversight. Enable them only when private interaction is genuinely needed.

Current default shown: Off. RECOMMENDED START Off
Ignore direct messages and keep work visible in approved channels.
LIMITED PRIVATE ACCESS Allowlist
Only designated operators and reviewers may send direct messages.
WORKSPACE-WIDE DMS Open
Anyone who can reach the app may DM it. Use only with strong identity and tool controls.
- 04.6VERBOSITY
Choose how much work the agent narrates.
This changes what teammates see while the agent works; it does not change capabilities or approvals.

Current default shown: Concise. VISIBLE EXECUTION Verbose
Announces each step. Useful during onboarding, debugging, and supervised pilots.
RECOMMENDED STEADY STATE Concise
Provides final answers without narrating every intermediate step.
- 04.7
Add the intended Slack destinations.
Invite the app to each permitted channel. When Allowlist is selected, add the same channels and approved direct-message users in Agent Barn before testing.
- 04.8
Configure the recipe trigger and workflow.
Trigger: A pull request is opened or updated in a connected repository.
- 04.9
Apply the recipe requirements and review rule.
TemplateThe team’s review criteria, conventions, and instructions.
SkillsGitHub or Bitbucket access scoped to the intended repositories.
ChannelsA Slack destination for review updates and questions.
Auto command approval · Channel allowlist · Direct messages off · Concise responses. Expand access only after representative tests and review of the agent’s tools and data boundaries.
Assign the skills this recipe needs.
Skills connect the agent to external platforms. Select only the integrations required for the workflow, then connect each one with a dedicated or approved shared credential.
GitHub or Bitbucket
Read pull-request metadata and diffs, then publish review suggestions when allowed.
- Credential
- A GitHub App or Bitbucket access token restricted to reviewed repositories.
- Permissions
- Repository metadata: read · Pull requests and diffs: read · Review comments: write · Merge and administration: no access
- Choose the provider and repositories in scope.
- Install read permissions first, then add review-comment access if needed.
- Trigger on opened, reopened, or updated pull requests, not merge or administration events.
- 05.1
Keep required skills; resolve “choose one” integrations.
Skills marked Required by template are part of this recipe’s workflow. When a card names alternatives, choose the provider your team actually uses. Optional skills should remain disconnected until a defined task needs them.
- 05.2
Choose how each credential will be supplied.
Choose Enter credentials to connect an account now. Choose Use shared credential when the correct workspace account is already connected.
NEW CONNECTION Enter credentials
Connect the account required by this recipe.
EXISTING CONNECTION Use shared credential
Select a matching account already available in Agent Barn.
- 05.S1
Choose GitHub or Bitbucket.
Read pull-request metadata and diffs, then publish review suggestions when allowed. Connect only the provider that owns the repositories for this recipe.
- 05.G1
GitHub // Enter a dedicated credential.
Choose GitHub → Enter credentials. Use a token created for this recipe instead of a personal token already used by other tools.
- 05.G2
GitHub // Open the Classic PAT page.
Open Settings → Credentials → Personal access tokens → Tokens (classic). Select Generate new token → Generate new token (classic), or open github.com/settings/tokens ↗.
- 05.G3
GitHub // Name and expire the token.
Use a note such as
AgentBarn_PR_Reviewer, choose an expiration date, and continue. - 05.G4
GitHub // Select the Classic PAT scopes.
REPORepository access, including available private repositories.
READ:ORGRead organization and team membership.
READ:USERRead user profile data.
Repository accessThe
reposcope is broad. Add the specific repository names this recipe should use. - 05.G5
GitHub // Generate and copy the token.
Click Generate token and copy the value for the Personal access token field in Agent Barn.

The token value is blurred in this guide. - 05.G6
GitHub // Complete the credential fields.
Read the repository header as owner/repository. In this example,
aai-labsis Owner / Org andagent-barnis the repository.
Owner / Org: aai-labs · Repository: agent-barn PERSONAL ACCESS TOKENPaste the copied Classic PAT.
OWNER / ORGValue before the slash.
REPOSITORIESAdd each permitted name after the slash.
EMPTY REPOSITORY LISTAvoid it; the token could address any repository it can reach.
- 05.B1
Bitbucket // Record the workspace ID.
Open the target workspace. In a URL such as
bitbucket.org/agentbarn/workspace/overview,agentbarnis the workspace ID. You can also confirm it in workspace settings under Workspace ID. - 05.B2
- 05.B3
Bitbucket // Create a scoped API token.
Select Create API token with scopes, enter a recipe-specific name and expiration, select Bitbucket as the app, and continue to permissions.
- 05.B4
Bitbucket // Select the required scopes.
READ:USER:BITBUCKETRead the authenticated account.
READ:WORKSPACE:BITBUCKETRead the configured workspace.
READ:REPOSITORY:BITBUCKETRead repository source and metadata.
READ:PULLREQUEST:BITBUCKETRead pull requests and their context.
WRITE:PULLREQUEST:BITBUCKETRequired only when this recipe posts review comments.
- 05.B5
Bitbucket // Create and copy the token.
Review the selected Bitbucket app and scopes, create the token, and copy it for the API token field in Agent Barn.
- 05.B6
Bitbucket // Complete the credential fields.
WORKSPACEBitbucket workspace ID, such as
agentbarn.REPOSITORIESAdd every permitted repository; avoid an empty list.
EMAILAtlassian account email that created the token.
API TOKENPaste the Bitbucket-scoped token.
If the Agent Barn panel still says “App password scopes,” use the API-token equivalents above. Bitbucket app passwords are no longer the current credential path.
- 05.S2
Validate the selected provider boundary.
Test one permitted repository and one repository outside the configured list. Confirm the agent can perform only the operations required by PR Reviewer: Repository metadata: read · Pull requests and diffs: read · Review comments: write · Merge and administration: no access.
- 05.Z
Validate every selected skill before hiring.
Run one expected action and confirm the recipe cannot reach anything outside its selected accounts and resources. Resolve permission issues before choosing Hire.
Verify the setup before launch.
Run this short review once Slack, Agent Barn, and the required skills are configured.
- Confirm the app is installed in the intended Slack workspace.
- Verify the
xapp-andxoxb-values connect the intended Slack app. - Validate every required skill and confirm its credential has only the intended site, space, project, or repository access.
- Test one representative request in an allowlisted channel.
- Confirm higher-risk commands still trigger the expected approval path.
- Review the agent’s response quality, visibility, and logs before expanding access.
- Run the configured trigger: A pull request is opened or updated in a connected repository.
- Confirm the result follows Inspect change → Assess quality → Prepare feedback → Hand off.
- Apply the review rule: Treat comments as review suggestions, not approval to merge or deploy code without the team’s established controls.
PR Reviewer is ready for a controlled pilot.
Start with a narrow audience and reversible work, then widen access after observing representative tasks.
Return to recipes →




