Repository navigation
feat: add the team agent to the OpenAI Agents SDK app - #5
Merged
Merged
Conversation
The team agent keeps runbooks current and routes requests. Runbooks are canvases titled "Runbook: <topic>" that the agent reads and writes through the Slack MCP Server. Quiet channel threads get a tool-less check, and threads worth keeping get an "Add to runbook" button that saves the thread as the person who clicked. Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
…essage The OpenAI Agents SDK stops a run after 10 turns by default, which tool heavy requests and runbook saves can reach. Both agents now pass max_turns=50 with a max_turns error handler, matching bolt-python-coding-agent. A save that changes nothing keeps the Add to runbook button so it can be retried. Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
The same agent that answers from runbooks now writes them. Quiet threads are reviewed with the last connected replier's token, a restricted set of Slack MCP tools, and a guardrail that keeps searches to runbook files in channels. The person the review ran as gets an ephemeral note when a runbook changed. The Add to runbook button and the separate check and save agents are gone. Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
… runbooks Canvases created through the Slack MCP Server are standalone, and search only finds them when DMs and group DMs are included. Requiring public and private channels hid every runbook the agent wrote. The guardrail now only checks for a files search with the keyword Runbook. Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
…g for quiet threads Each channel message from a connected user now gets one review by the same agent, with its thread as context and the author's token. That drops the quiet-period timer, the per-thread token memory, and RUNBOOK_SETTLE_SECONDS, and the edit and the ephemeral note go to the person who wrote the message. Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
… agent The agent module now reads in definition order with run_agent last, and the instructions and out-of-turns handler are inline. Without a user token there is no Slack MCP Server and no runbooks, so the mention and message listeners now ask the person to connect instead of running the agent. Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
The message listener now runs the agent on each channel message from a connected user directly, and posts the ephemeral note when the run wrote a canvas. The runbooks package and run_review are gone: every run gets the same Slack MCP runbook tools and search guardrail. Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
…e guardrail Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
The agent runs with the bot token again, using list_runbooks, read_runbook, and write_runbook (files.list, canvases.getContent, canvases.create, and canvases.edit), following the coding agent's tool pattern. New runbooks are added as a tab in the channel. People who connect the Slack MCP Server get its runbook tools as themselves instead. canvases.getContent isn't in slack_sdk yet, so read_runbook calls it with api_call. Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
…he Slack MCP Server With the bot token the agent now only lists, reads, and creates runbooks. Editing an existing runbook happens through the Slack MCP Server's canvas tools, which update it section by section, so the bot no longer replaces a whole canvas. Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
…er reuses closed connections Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
zimeg
marked this pull request as ready for review
October 28, 2026 01:39
zimeg
commented
Oct 28, 2026
zimeg
left a comment
Member
Author
There was a problem hiding this comment.
🐙 Merging this now after testing shows promise of runbooks that can be edited without a particular callout. The models are good.
Comment on lines
+19
to
+21
| response = deps.client.api_call( | ||
| "canvases.getContent", params={"canvas_id": canvas_id} | ||
| ) |
Member
Author
There was a problem hiding this comment.
📣 note: We're implementing this now here: slackapi/python-slack-sdk#1999
This was referenced Oct 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This pull request turns the
openai-agents-sdkapp into a team agent whose runbooks reinforce themselves: the agent writes what channel messages settle into runbooks, then answers from those runbooks next time.Runbook: <topic>.list_runbooks(files.list),read_runbook(canvases.getContent), andcreate_runbook(canvases.createwithchannel_id). New runbooks are added as a tab in the channel, so the whole team can read and edit them.run_agent()swaps in the MCP Server's runbook tools (search plus canvas read/create/update) so the agent works as them, and only then can it edit an existing runbook section by section. Everyone else gets the bot-token tools.bolt-python-coding-agent.canvases:read,canvases:write,files:read. I also sorted the bot scope list.canvases.getContentisn't inslack_sdk(3.45.0 ormain) or@slack/web-apiyet, soread_runbookcalls it withclient.api_call.canvases_createalso has no typedchannel_id, so it goes through**kwargs.claude-agent-sdk/andpydantic-ai/are still the starter agent, and the rootREADME.md/AGENTS.mdstill describe it. Follow-up PRs bring those to parity.Known risks:
files.listreturning canvases tabbed in channels the bot is in is untested.Testing
Runbook: <topic>tab appears in the channel, a teammate can open it, and only you see an ephemeral note with the link.app_oauth.py), connect the Slack MCP Server from the Home tab and repeat. Confirm canvas edits show your name.🤖 Generated with Claude Code