Skip to content

Commit 083a7a5

Browse files
zimegClaude
andcommitted
docs: note who can approve and tidy the coding agent README wording
Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
1 parent 0a77ed7 commit 083a7a5

4 files changed

Lines changed: 39 additions & 39 deletions

File tree

‎README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Coding Agent for Slack
22

3-
A sample Slack agent that showcases [Slack Code](https://docs.slack.dev/ai/slack-code/) built with [Bolt for Python](https://docs.slack.dev/tools/bolt-python/). Mention it in a channel with a task and a project repo, and it decides whether to answer in place or create a dedicated **code channel** for the work. In a code channel a temporary workspace is created to clone the repo and make changes with necessary approval while keeping the channel's plan, context bar, and code tab current as it goes.
3+
A sample Slack agent that showcases [Slack Code](https://docs.slack.dev/ai/slack-code/) built with [Bolt for Python](https://docs.slack.dev/tools/bolt-python/). Mention it in a channel with a task and a project repo, and it decides whether to answer in place or create a dedicated **code channel** for the work. In a code channel it clones the repo into a temporary workspace and makes changes with the necessary approvals, keeping the channel's plan, context bar, and code tab current as it goes.
44

55
> [!WARNING]
66
> **This agent runs commands generated by a language model on the machine running the app.** Only run it against trusted repositories on a machine you're comfortable letting it operate. Refer to the framework README for how command approvals work.
@@ -26,6 +26,6 @@ The coding agent interacts with users through four entry points:
2626
- **Channel @mentions** — Mention the agent in any channel with a task and a repo. It answers in place, or creates a code channel for the work along with the conversation it came from.
2727
- **Code Channels** — Keep chatting in the channel without an @mention. The agent writes its plan to a Plan tab you can comment on, publishes its changes to the code tab, and pins the repo, branch, and CI status to the context bar.
2828

29-
In a code channel, file edits, read-only commands, and local git changes run right away. Anything else, like running tests, posts Approve and Deny buttons and waits for your decision. The agent also registers slash commands like `/run-tests` for each channel and decides what each one does. When you say the work is done, it posts a summary back to your original message and archives the channel.
29+
In a code channel, file edits, read-only commands, and local git changes run right away. Anything else posts Approve and Deny buttons, and runs only if someone in the channel approves it. The agent also registers slash commands like `/run-tests` for each channel and decides what each one does. When you say the work is done, it posts a summary back to your original message and archives the channel.
3030

3131
For full setup instructions, pick a framework above and follow the README in that directory.

‎claude-agent-sdk/README.md‎

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Coding Agent for Slack (Bolt for Python and Claude Agent SDK)
22

3-
A sample Slack agent that showcases [Slack Code](https://docs.slack.dev/ai/slack-code/) built with [Bolt for Python](https://docs.slack.dev/tools/bolt-python/) and the [Claude Agent SDK](https://platform.claude.com/docs/en/agent-sdk/overview) using models from [Anthropic](https://www.anthropic.com). Mention it in a channel with a task and a project repo, and it decides whether to answer in place or create a dedicated **code channel** for the work. In a code channel a temporary workspace is created to clone the repo and make changes with necessary approval while keeping the channel's plan, context bar, and code tab current as it goes.
3+
A sample Slack agent that showcases [Slack Code](https://docs.slack.dev/ai/slack-code/) built with [Bolt for Python](https://docs.slack.dev/tools/bolt-python/) and the [Claude Agent SDK](https://platform.claude.com/docs/en/agent-sdk/overview) using models from [Anthropic](https://www.anthropic.com). Mention it in a channel with a task and a project repo, and it decides whether to answer in place or create a dedicated **code channel** for the work. In a code channel it clones the repo into a temporary workspace and makes changes with the necessary approvals, keeping the channel's plan, context bar, and code tab current as it goes.
44

55
> [!WARNING]
66
> **This agent runs commands generated by a language model on the machine running the app.** Only run it against trusted repositories on a machine you're comfortable letting it operate. Refer to [Command approvals](#command-approvals) for how command approvals work.
@@ -56,7 +56,7 @@ Every tool call the coding agent makes goes through a Claude Agent SDK `PreToolU
5656

5757
- **Read-only** commands and **local git changes** run with no prompt. A path outside the clone always asks. Commands run without a shell, so they can't chain a second command, and what the approval check reads is exactly what runs.
5858
- **File edits** don't go through approvals. `write_file` and `edit_file` only write inside the clone.
59-
- **Anything else** shows **Approve** and **Deny** buttons in the code channel, and the command runs only if you approve it.
59+
- **Anything else** shows **Approve** and **Deny** buttons in the code channel, and the command runs only if someone in the channel approves it.
6060

6161
The agent gets only these tools. Claude Code's built-in tools, like its own `Bash` and `Edit`, are turned off, and so are the settings, `CLAUDE.md` files, and MCP servers configured on the machine running the app.
6262

@@ -323,14 +323,14 @@ Every incoming request is routed to a "listener". This directory groups each lis
323323

324324
### `/agent`
325325

326-
- `agent.py` - defines the routing agent and the coding agent with their tools, and starts and resumes their runs. Along with `guardrails.py` and `tools`, it's the only code that uses the Claude Agent SDK.
327-
- `prompts.py` - holds both agents' prompts.
328-
- `turns.py` - runs each turn for the listeners: it answers requests, sets the session status, runs the agent, and posts the outcome or the Approve / Deny buttons. It also queues messages that arrive mid-turn and handles approvals and the stop button.
329-
- `outcome.py` - defines the `RunOutcome` that `agent.py` returns and `turns.py` reads.
330-
- `context.py` - reads the thread or direct message a request came from, so the agent can follow the conversation.
331-
- `guardrails.py` - holds the SDK hooks around tool calls: the approval check for `run_command`, which defers a command that needs approval, and the check that skips every tool call once the session is stopped.
332-
- `sessions.py` - keeps each code channel's session in memory: its working directory, plan canvas, conversation history, and messages waiting for the next turn. It also defines the `AgentDeps` and `RequestDeps` dataclasses passed to the agents at runtime, providing access to the Slack client and the session or request.
333-
- `approvals.py` - decides which commands need approval and holds runs paused on one.
334-
- `runtime.py` - holds what the tools and hooks share during a run: its deps, which the SDK can't pass to a tool, and the shape of a tool's reply.
335-
- `workspace.py` - runs commands in the clone without the app's secrets, and keeps file tools inside it.
336-
- `tools` - contains one file per tool the agents can call.
326+
- `agent.py` — Defines the routing agent and the coding agent with their tools, and starts and resumes their runs. Along with `guardrails.py` and `tools`, it's the only code that uses the Claude Agent SDK.
327+
- `prompts.py` — Holds both agents' prompts.
328+
- `turns.py` — Runs each turn for the listeners: it answers requests, sets the session status, runs the agent, and posts the outcome or the Approve / Deny buttons. It also queues messages that arrive mid-turn and handles approvals and the stop button.
329+
- `outcome.py` — Defines the `RunOutcome` that `agent.py` returns and `turns.py` reads.
330+
- `context.py` — Reads the thread or direct message a request came from, so the agent can follow the conversation.
331+
- `guardrails.py` — Holds the SDK hooks around tool calls: the approval check for `run_command`, which defers a command that needs approval, and the check that skips every tool call once the session is stopped.
332+
- `sessions.py` — Keeps each code channel's session in memory: its working directory, plan canvas, conversation history, and messages waiting for the next turn. It also defines the `AgentDeps` and `RequestDeps` dataclasses passed to the agents at runtime, providing access to the Slack client and the session or request.
333+
- `approvals.py` — Decides which commands need approval and holds runs paused on one.
334+
- `runtime.py` — Holds what the tools and hooks share during a run: its deps, which the SDK can't pass to a tool, and the shape of a tool's reply.
335+
- `workspace.py` — Runs commands in the clone without the app's secrets, and keeps file tools inside it.
336+
- `tools` — Contains one file per tool the agents can call.

‎openai-agents-sdk/README.md‎

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Coding Agent for Slack (Bolt for Python and OpenAI Agents SDK)
22

3-
A sample Slack agent that showcases [Slack Code](https://docs.slack.dev/ai/slack-code/) built with [Bolt for Python](https://docs.slack.dev/tools/bolt-python/) and [OpenAI Agents SDK](https://openai.github.io/openai-agents-python/) using models from [OpenAI](https://openai.com). Mention it in a channel with a task and a project repo, and it decides whether to answer in place or create a dedicated **code channel** for the work. In a code channel a temporary workspace is created to clone the repo and make changes with necessary approval while keeping the channel's plan, context bar, and code tab current as it goes.
3+
A sample Slack agent that showcases [Slack Code](https://docs.slack.dev/ai/slack-code/) built with [Bolt for Python](https://docs.slack.dev/tools/bolt-python/) and [OpenAI Agents SDK](https://openai.github.io/openai-agents-python/) using models from [OpenAI](https://openai.com). Mention it in a channel with a task and a project repo, and it decides whether to answer in place or create a dedicated **code channel** for the work. In a code channel it clones the repo into a temporary workspace and makes changes with the necessary approvals, keeping the channel's plan, context bar, and code tab current as it goes.
44

55
> [!WARNING]
66
> **This agent runs commands generated by a language model on the machine running the app.** Only run it against trusted repositories on a machine you're comfortable letting it operate. Refer to [Command approvals](#command-approvals) for how command approvals work.
@@ -56,7 +56,7 @@ Each code channel method is a tool the model calls when it decides to, in [`agen
5656

5757
- **Read-only** commands and **local git changes** run with no prompt. A path outside the clone always asks. Commands run without a shell, so they can't chain a second command, and what the approval check reads is exactly what runs.
5858
- **File edits** don't go through approvals. `write_file` and `edit_file` only write inside the clone.
59-
- **Anything else** shows **Approve** and **Deny** buttons in the code channel, and the command runs only if you approve it.
59+
- **Anything else** shows **Approve** and **Deny** buttons in the code channel, and the command runs only if someone in the channel approves it.
6060

6161
## Setup
6262

@@ -321,13 +321,13 @@ Every incoming request is routed to a "listener". This directory groups each lis
321321

322322
### `/agent`
323323

324-
- `agent.py` - defines the routing agent and the coding agent with their tools, and starts and resumes their runs. Along with `guardrails.py` and `tools`, it's the only code that uses the OpenAI Agents SDK.
325-
- `prompts.py` - holds both agents' prompts.
326-
- `turns.py` - runs each turn for the listeners: it answers requests, sets the session status, runs the agent, and posts the outcome or the Approve / Deny buttons. It also queues messages that arrive mid-turn and handles approvals and the stop button.
327-
- `outcome.py` - defines the `RunOutcome` that `agent.py` returns and `turns.py` reads.
328-
- `context.py` - reads the thread or direct message a request came from, so the agent can follow the conversation.
329-
- `guardrails.py` - holds the SDK hooks around tool calls: the approval check for `run_command`, and the guardrail that skips every tool call once the session is stopped.
330-
- `sessions.py` - keeps each code channel's session in memory: its working directory, plan canvas, conversation history, and messages waiting for the next turn. It also defines the `AgentDeps` and `RequestDeps` dataclasses passed to the agents at runtime, providing access to the Slack client and the session or request.
331-
- `approvals.py` - decides which commands need approval and holds runs paused on one.
332-
- `workspace.py` - runs commands in the clone without the app's secrets, and keeps file tools inside it.
333-
- `tools` - contains one file per tool the agents can call.
324+
- `agent.py` — Defines the routing agent and the coding agent with their tools, and starts and resumes their runs. Along with `guardrails.py` and `tools`, it's the only code that uses the OpenAI Agents SDK.
325+
- `prompts.py` — Holds both agents' prompts.
326+
- `turns.py` — Runs each turn for the listeners: it answers requests, sets the session status, runs the agent, and posts the outcome or the Approve / Deny buttons. It also queues messages that arrive mid-turn and handles approvals and the stop button.
327+
- `outcome.py` — Defines the `RunOutcome` that `agent.py` returns and `turns.py` reads.
328+
- `context.py` — Reads the thread or direct message a request came from, so the agent can follow the conversation.
329+
- `guardrails.py` — Holds the SDK hooks around tool calls: the approval check for `run_command`, and the guardrail that skips every tool call once the session is stopped.
330+
- `sessions.py` — Keeps each code channel's session in memory: its working directory, plan canvas, conversation history, and messages waiting for the next turn. It also defines the `AgentDeps` and `RequestDeps` dataclasses passed to the agents at runtime, providing access to the Slack client and the session or request.
331+
- `approvals.py` — Decides which commands need approval and holds runs paused on one.
332+
- `workspace.py` — Runs commands in the clone without the app's secrets, and keeps file tools inside it.
333+
- `tools` — Contains one file per tool the agents can call.

‎pydantic-ai/README.md‎

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Coding Agent for Slack (Bolt for Python and Pydantic AI)
22

3-
A sample Slack agent that showcases [Slack Code](https://docs.slack.dev/ai/slack-code/) built with [Bolt for Python](https://docs.slack.dev/tools/bolt-python/) and [Pydantic AI](https://pydantic.dev/docs/ai/overview/) using models from [Anthropic](https://anthropic.com) or [OpenAI](https://openai.com). Mention it in a channel with a task and a project repo, and it decides whether to answer in place or create a dedicated **code channel** for the work. In a code channel a temporary workspace is created to clone the repo and make changes with necessary approval while keeping the channel's plan, context bar, and code tab current as it goes.
3+
A sample Slack agent that showcases [Slack Code](https://docs.slack.dev/ai/slack-code/) built with [Bolt for Python](https://docs.slack.dev/tools/bolt-python/) and [Pydantic AI](https://pydantic.dev/docs/ai/overview/) using models from [Anthropic](https://anthropic.com) or [OpenAI](https://openai.com). Mention it in a channel with a task and a project repo, and it decides whether to answer in place or create a dedicated **code channel** for the work. In a code channel it clones the repo into a temporary workspace and makes changes with the necessary approvals, keeping the channel's plan, context bar, and code tab current as it goes.
44

55
> [!WARNING]
66
> **This agent runs commands generated by a language model on the machine running the app.** Only run it against trusted repositories on a machine you're comfortable letting it operate. Refer to [Command approvals](#command-approvals) for how command approvals work.
@@ -56,7 +56,7 @@ Each code channel method is a tool the model calls when it decides to, in [`agen
5656

5757
- **Read-only** commands and **local git changes** run with no prompt. A path outside the clone always asks. Commands run without a shell, so they can't chain a second command, and what the approval check reads is exactly what runs.
5858
- **File edits** don't go through approvals. `write_file` and `edit_file` only write inside the clone.
59-
- **Anything else** shows **Approve** and **Deny** buttons in the code channel, and the command runs only if you approve it.
59+
- **Anything else** shows **Approve** and **Deny** buttons in the code channel, and the command runs only if someone in the channel approves it.
6060

6161
## Setup
6262

@@ -333,13 +333,13 @@ Every incoming request is routed to a "listener". This directory groups each lis
333333

334334
### `/agent`
335335

336-
- `agent.py` - defines the routing agent and the coding agent with their tools, picks their models, and starts and resumes their runs. Along with `guardrails.py` and `tools`, it's the only code that uses Pydantic AI.
337-
- `prompts.py` - holds both agents' prompts.
338-
- `turns.py` - runs each turn for the listeners: it answers requests, sets the session status, runs the agent, and posts the outcome or the Approve / Deny buttons. It also queues messages that arrive mid-turn and handles approvals and the stop button.
339-
- `outcome.py` - defines the `RunOutcome` that `agent.py` returns and `turns.py` reads.
340-
- `context.py` - reads the thread or direct message a request came from, so the agent can follow the conversation.
341-
- `guardrails.py` - holds the hooks around tool calls: the approval check for `run_command`, the hooks that skip every tool call once the session is stopped, and the hook that tells the model when a tool failed.
342-
- `sessions.py` - keeps each code channel's session in memory: its working directory, plan canvas, conversation history, and messages waiting for the next turn. It also defines the `AgentDeps` and `RequestDeps` dataclasses passed to the agents at runtime, providing access to the Slack client and the session or request.
343-
- `approvals.py` - decides which commands need approval and holds runs paused on one.
344-
- `workspace.py` - runs commands in the clone without the app's secrets, and keeps file tools inside it.
345-
- `tools` - contains one file per tool the agents can call.
336+
- `agent.py` — Defines the routing agent and the coding agent with their tools, picks their models, and starts and resumes their runs. Along with `guardrails.py` and `tools`, it's the only code that uses Pydantic AI.
337+
- `prompts.py` — Holds both agents' prompts.
338+
- `turns.py` — Runs each turn for the listeners: it answers requests, sets the session status, runs the agent, and posts the outcome or the Approve / Deny buttons. It also queues messages that arrive mid-turn and handles approvals and the stop button.
339+
- `outcome.py` — Defines the `RunOutcome` that `agent.py` returns and `turns.py` reads.
340+
- `context.py` — Reads the thread or direct message a request came from, so the agent can follow the conversation.
341+
- `guardrails.py` — Holds the hooks around tool calls: the approval check for `run_command`, the hooks that skip every tool call once the session is stopped, and the hook that tells the model when a tool failed.
342+
- `sessions.py` — Keeps each code channel's session in memory: its working directory, plan canvas, conversation history, and messages waiting for the next turn. It also defines the `AgentDeps` and `RequestDeps` dataclasses passed to the agents at runtime, providing access to the Slack client and the session or request.
343+
- `approvals.py` — Decides which commands need approval and holds runs paused on one.
344+
- `workspace.py` — Runs commands in the clone without the app's secrets, and keeps file tools inside it.
345+
- `tools` — Contains one file per tool the agents can call.

0 commit comments

Comments
 (0)