In this tutorial, you set the agent up for the repository
acme/payments, track a thread’s follow-ups, set up a weekday brief, and ask for a memo. Replace the examples with yours. Setup takes about 30 minutes.
You need the Developer or Admin role in the organization; see Organizations and roles. You also need permission to install a GitHub App on the repository’s account and a Slack app in your workspace, or existing connections in Recursion, and a GitHub fine-grained personal access token with Issues and Pull requests write access to
acme/payments only. Choose an approver who will not start the threads the agent tracks.How it works
- One session per thread. An automation starts a session when someone mentions the agent in a thread, and every later mention in that thread wakes the same session. The agent works out what was asked and uses the skill that fits. While it tracks a thread it sleeps between checks. Its own timer wakes it, as does a pull request it is watching.
- Briefs on a schedule. A weekday schedule on the same automation starts a run that posts each brief due that day. You set a brief up by asking in a thread. The agent saves what the brief covers and where it posts, so a scheduled run needs no thread.
- Every fact has a source. Board entries, brief lines, and memo claims link the pull request, issue, Slack message, meeting, or page they come from. Anything without a source is labeled unverified.
- Reads are open; writes outside the thread need approval. The agent reads GitHub through a read-only grant. Its only tools that write to GitHub come from an MCP server whose every tool needs an approval. So a comment, a new issue, or a reviewer request runs only after a listed person approves the exact call in the thread. See Require approval before a tool runs.
- Research in parallel. For a memo, the agent can hand separate questions to up to four copies of itself at a time. Those copies only read and research; they post nothing and can’t request approval.
- Graded against a rubric. The agent’s rubric checks that every fact is sourced, that every action outside the thread was approved, and the rules of the skill the turn used. Criteria for a skill the turn didn’t use are not applicable. See Outcomes.
Step 1: Connect GitHub and Slack
- Console
- cURL
- In the sidebar, click Integrations, then click Add integration.
- Choose GitHub, choose the account, and select
acme/payments. - In the GitHub connection’s tool selection, enable
pull_request_read,wait_for_pr,list_pull_requests,issue_read,list_issues,actions_list, andget_file_contents. - Click Add integration again, choose Slack, and choose the workspace.
- In Slack, invite the Recursion app to the channels where the team makes decisions, and to the channel your brief will post in.
Step 2: Store the token for gated GitHub writes
The approval-gated GitHub server authenticates with your personal access token. Store it in a vault, bound to exactly the server’s URL. Create the vault first if you need one.- Console
- cURL
- Open the vault and click Add credential.
- Under What will use this secret?, choose Token for an MCP server.
- Enter
https://api.githubcopilot.com/mcp/as the Server URL and the token as the API token. - Enter
Chief of staff GitHub writesas the Label. - Under Acknowledgement, confirm that you understand the credential is shared, then click Add credential.
Step 3: Create the agent from the template
- Console
- In the sidebar, click Agents, click Create agent, and choose the Chief of staff template.
- When asked, choose the GitHub connection and select
acme/payments. The template grants only the read tools from step 1. - Click Create and launch, then close the launch form: this agent runs from Slack.
- On the agent’s Configuration tab, under Integrations, add the Slack connection with
workspace_toolsaccess. Boards and briefs need it. Add any meeting or calendar app from step 1. - Under the default credentials, turn on the token from step 2.
- Click Save new version.
Step 4: Gate the GitHub write tools
Add the approval-gated server withcreateAgentVersion. Send the full definition you read, with this entry added to mcpServers and your approver’s Slack user id. See Update rules.
- Keep this server’s tools apart from the GitHub grant’s. The grant reaches GitHub without approval, so a write tool selected there would bypass the gate.
- Keep the GitHub grant read-only. It also gives
gitandghin the sandbox the grant’s access. - Don’t add Slack reply review to this agent. A session whose Slack replies require review can’t request approval.
Step 5: Create the automation
The automation has two triggers. A mention starts a session for its thread, and later mentions continue it. A weekday schedule starts the brief run.Step 6: Track a thread
-
In the channel, post the decisions, for example:
Decisions from today’s retry-storm review:
- Ana ships the retry backoff fix (acme/payments#412) by Friday.
- Ben replies on the customer issue (acme/payments#398) once the fix is out.
- Ana updates the on-call runbook with the new alert threshold by Wednesday.
-
Reply in the thread and mention the agent:
@Chief of staff track this thread. - The agent posts a board in the thread. It asks in the thread about any owner, date, or evidence it couldn’t resolve.
Approve an action
When a commitment stalls, the agent nudges its owner in the thread first. When that goes unanswered, or someone in the thread asks for an action outside it, the agent drafts it and calls the gated tool. An approval card appears in the thread with the tool and every argument.- Read the arguments on the card. What you approve is exactly what runs.
- Click Approve or Deny. Only listed approvers can decide.
- After an approval, the agent runs the call once and the board shows who approved it. After a denial, the agent doesn’t retry and asks in the thread what to do instead.
Read the ledger
Open the session from the automation’s run history and choose the Files tab. Outputs showsloops/<thread>.json. Each done commitment has a receipt like this:
Step 7: Set up a team brief
- In a channel the agent listens to, mention it with what the brief covers and where it posts, for example:
@Chief of staff set up a weekday brief for #payments-leads covering acme/payments, #payments-eng, and the threads you track. - The agent confirms the brief’s scope in the thread, saves it, and posts today’s brief so you can see it. A brief reads a private channel only when it is also the channel the brief posts to. The agent refuses any other private channel, along with the commitments tracked in its threads, so a brief never carries a private channel’s content to people outside it.
- From the next weekday, the scheduled run posts it in
#payments-leads.
Calendar not connected.
With a meeting app granted, the brief adds the decisions and action items from meetings since the last brief. It summarizes rather than quotes and leaves out personal remarks. It lists a meeting’s action items and offers to track them, but never adds them to a thread’s commitments unless someone asks. With a calendar app granted, it adds the upcoming meetings that a pending decision depends on. To change a brief, ask in a thread. Each brief is saved as briefs/<profile>/<date>.json.
Step 8: Ask for a research memo
- Mention the agent with the question and the decision it informs, for example:
@Chief of staff should we move feature flags from our in-house service to a hosted vendor? We need to decide by end of quarter. - The agent posts its research plan in the thread, then researches, delegating separate questions to copies of itself.
- It replies with the recommendation and its confidence, and saves the memo as
memos/<slug>.md.
What success means
- The board in a tracked thread lists every commitment under its current status, and every done commitment links its evidence.
- Every GitHub comment, issue, or reviewer request the agent made has an approval card in the thread, approved by a listed approver.
- Each brief links a source for every line and names the sources it couldn’t read.
- Every claim in a memo cites a source the agent read in full.
- The session’s Outcome shows the rubric’s verdicts for each turn a mention woke. See Read the result.
What can go wrong
Limits
- The agent has no email access, and no calendar access unless you grant a calendar app. It can’t prepare for meetings it can’t see or triage an inbox.
- An approval request waits 24 hours for a decision, and an approval waits 24 hours to be used. A session tree can make at most 50 approval requests. A scheduled run can’t request approval.
- A sleep timer is at most 30 days.
- A board message holds at most 50 blocks, so with many commitments the agent lists several in one section. A brief has at most 12 items.
- See Limits for session and automation limits.
Next steps
MCP servers
Declare servers, allowlist their tools, and gate them on approval.
Automations
Slack and schedule triggers, thread continuation, and run defaults.
Integrations
Connect meeting and calendar apps for briefs.
Outcomes
Write rubrics a grader can check.