Skip to content

Commit acd8d22

Browse files
zimegClaude
andcommitted
docs: align the coding agent READMEs with the agent templates
Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
1 parent 5710ef8 commit acd8d22

4 files changed

Lines changed: 57 additions & 35 deletions

File tree

‎README.md‎

Lines changed: 31 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,40 @@ A sample Slack agent that showcases [Slack Code](https://docs.slack.dev/ai/slack
55
> [!WARNING]
66
> **This agent runs commands generated by a language model on the machine running the app.** Only run it against trusted, throwaway repositories, on a machine you're comfortable letting it operate. Refer to the framework README for how command approvals work.
77
8-
## Choose your framework
8+
## Choose Your Framework
99

10-
| App | Directory | Get started | Framework |
11-
| --------------------- | -------------------- | -------------------------------------------- | -------------------------------------------------------------------------- |
12-
| **Claude Agent SDK** | `claude-agent-sdk/` | [View README](./claude-agent-sdk/README.md) | [claude-agent-sdk](https://platform.claude.com/docs/en/agent-sdk/overview) |
13-
| **OpenAI Agents SDK** | `openai-agents-sdk/` | [View README](./openai-agents-sdk/README.md) | [openai-agents](https://openai.github.io/openai-agents-python/) |
14-
| **Pydantic AI** | `pydantic-ai/` | [View README](./pydantic-ai/README.md) | [pydantic-ai](https://pydantic.dev/docs/ai/overview/) |
10+
This repo contains the same app built with three different AI agent frameworks. Pick the one that fits your stack:
1511

16-
## What it can do
12+
| App | Directory | Get Started | Framework |
13+
|-----|-----------|-------------|-----------|
14+
| **Claude Agent SDK** | `claude-agent-sdk/` | [View README](./claude-agent-sdk/README.md) | [claude-agent-sdk](https://platform.claude.com/docs/en/agent-sdk/overview) |
15+
| **OpenAI Agents SDK** | `openai-agents-sdk/` | [View README](./openai-agents-sdk/README.md) | [openai-agents](https://openai.github.io/openai-agents-python/) |
16+
| **Pydantic AI** | `pydantic-ai/` | [View README](./pydantic-ai/README.md) | [pydantic-ai](https://pydantic.dev/docs/ai/overview/) |
17+
18+
All implementations share the same Slack listener layer and the same user experience. The only difference is how the agent is defined and executed under the hood.
19+
20+
## What It Can Do
21+
22+
The coding agent interacts with users through four entry points:
1723

18-
- **Channel @mentions and direct messages** — Mention the agent with a task, or message it directly. Quick questions get an answer in place; work that takes more than one message gets a code channel linked back to your message, along with the conversation it came from.
19-
- **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.
20-
- **Command approvals** — 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.
21-
- **Slash commands** — The agent registers commands like `/run-tests` for each channel and decides what each one does.
22-
- **Wrap up** — When you say the work is done, the agent posts a summary back to your original message and archives the channel.
2324
- **App Home** — The Home tab explains how to start a task.
25+
- **Direct Messages** — Message the agent directly. Quick questions get an answer in place; work that takes more than one message gets a code channel linked back to your message.
26+
- **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.
27+
- **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.
28+
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.
30+
31+
## Using the App
32+
33+
Once the agent is running, there are several ways to interact:
34+
35+
- **App Home** — Open the agent in Slack and click the _Home_ tab to see how to start a task.
36+
- **Direct Messages** — Open the agent's _Messages_ tab and ask a question or describe a task, or pick a suggested prompt. It answers there, or links a code channel for bigger work.
37+
- **Channel @mentions** — Invite the agent to a channel by typing `/invite @agent-name`, then @mention it with a task and a repo. It answers in the thread, or replies with a link to a new code channel for the work.
38+
- **Code Channels** — Follow the work in the new channel. Approve or deny commands as they come up, comment on the Plan tab, review the diff in the code tab, and send follow-ups without an @mention. Say you're done to wrap up and archive the channel.
2439

2540
For full setup instructions, pick a framework above and follow the README in that directory.
41+
42+
## Local Development
43+
44+
This repo uses [`slack-bolt`](https://pypi.org/project/slack-bolt/) from PyPI.

‎claude-agent-sdk/README.md‎

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -262,15 +262,15 @@ python3 app_oauth.py
262262

263263
### Using the App
264264

265-
Once the agent is running, invite it to a channel by typing `/invite @agent-name` in the message box.
265+
Once the agent is running, there are several ways to interact:
266266

267-
**Channel @mentions** — @mention the agent in a thread with a question about the conversation, like _what did we decide here?_, and it answers in the thread. @mention it with a task and a repo, like _add a "hello world" to the README of `<repo>`_, and it replies with a link to a new code channel for the work.
267+
**App Home** — Open the agent in Slack and click the _Home_ tab to see how to start a task.
268268

269-
**Direct messages** — Open the agent's _Messages_ tab and ask a question or describe a task, or pick a suggested prompt. It answers there, or links a code channel for bigger work.
269+
**Direct Messages** — Open the agent's _Messages_ tab and ask a question or describe a task, or pick a suggested prompt. It answers there, or links a code channel for bigger work.
270270

271-
**Code channels** — Follow the work in the new channel. Approve or deny commands as they come up, comment on the Plan tab, review the diff in the code tab, and send follow-ups without an @mention. Say you're done to wrap up and archive the channel.
271+
**Channel @mentions** — Invite the agent to a channel by typing `/invite @agent-name` in the message box, then @mention it in a thread with a question about the conversation, like _what did we decide here?_, and it answers in the thread. @mention it with a task and a repo, like _add a "hello world" to the README of `<repo>`_, and it replies with a link to a new code channel for the work.
272272

273-
**App Home** — Open the agent in Slack and click the _Home_ tab to see how to start a task.
273+
**Code Channels** — Follow the work in the new channel. Approve or deny commands as they come up, comment on the Plan tab, review the diff in the code tab, and send follow-ups without an @mention. Say you're done to wrap up and archive the channel.
274274

275275
### Linting
276276

@@ -285,7 +285,8 @@ ruff format
285285
### Testing
286286

287287
```sh
288-
pytest
288+
# Run pytest from root directory for unit testing
289+
pytest .
289290
```
290291

291292
## Project Structure
@@ -336,7 +337,7 @@ The `outcome.py` file defines the `RunOutcome` that `agent.py` returns and `turn
336337

337338
The `context.py` file reads the thread or direct message a request came from, so the agent can follow the conversation.
338339

339-
The `guardrails.py` file holds the SDK hooks that gate 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.
340+
The `guardrails.py` file 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.
340341

341342
The `sessions.py` file 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.
342343

‎openai-agents-sdk/README.md‎

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -260,15 +260,15 @@ python3 app_oauth.py
260260

261261
### Using the App
262262

263-
Once the agent is running, invite it to a channel by typing `/invite @agent-name` in the message box.
263+
Once the agent is running, there are several ways to interact:
264264

265-
**Channel @mentions** — @mention the agent in a thread with a question about the conversation, like _what did we decide here?_, and it answers in the thread. @mention it with a task and a repo, like _add a "hello world" to the README of `<repo>`_, and it replies with a link to a new code channel for the work.
265+
**App Home** — Open the agent in Slack and click the _Home_ tab to see how to start a task.
266266

267-
**Direct messages** — Open the agent's _Messages_ tab and ask a question or describe a task, or pick a suggested prompt. It answers there, or links a code channel for bigger work.
267+
**Direct Messages** — Open the agent's _Messages_ tab and ask a question or describe a task, or pick a suggested prompt. It answers there, or links a code channel for bigger work.
268268

269-
**Code channels** — Follow the work in the new channel. Approve or deny commands as they come up, comment on the Plan tab, review the diff in the code tab, and send follow-ups without an @mention. Say you're done to wrap up and archive the channel.
269+
**Channel @mentions** — Invite the agent to a channel by typing `/invite @agent-name` in the message box, then @mention it in a thread with a question about the conversation, like _what did we decide here?_, and it answers in the thread. @mention it with a task and a repo, like _add a "hello world" to the README of `<repo>`_, and it replies with a link to a new code channel for the work.
270270

271-
**App Home** — Open the agent in Slack and click the _Home_ tab to see how to start a task.
271+
**Code Channels** — Follow the work in the new channel. Approve or deny commands as they come up, comment on the Plan tab, review the diff in the code tab, and send follow-ups without an @mention. Say you're done to wrap up and archive the channel.
272272

273273
### Linting
274274

@@ -283,7 +283,8 @@ ruff format
283283
### Testing
284284

285285
```sh
286-
pytest
286+
# Run pytest from root directory for unit testing
287+
pytest .
287288
```
288289

289290
## Project Structure
@@ -324,7 +325,7 @@ Every incoming request is routed to a "listener". This directory groups each lis
324325

325326
### `/agent`
326327

327-
The `agent.py` file defines the routing agent and the coding agent with their tools, and starts and resumes their runs. It's the only file outside `tools` that uses the OpenAI Agents SDK.
328+
The `agent.py` file 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.
328329

329330
The `prompts.py` file holds both agents' prompts.
330331

@@ -334,7 +335,7 @@ The `outcome.py` file defines the `RunOutcome` that `agent.py` returns and `turn
334335

335336
The `context.py` file reads the thread or direct message a request came from, so the agent can follow the conversation.
336337

337-
The `guardrails.py` file holds the SDK hooks that gate tool calls: the approval check for `run_command`, and the guardrail that skips every tool call once the session is stopped.
338+
The `guardrails.py` file 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.
338339

339340
The `sessions.py` file 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.
340341

‎pydantic-ai/README.md‎

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ pip install -e ".[dev]"
143143

144144
## Providers
145145

146-
This app supports both Anthropic and OpenAI as AI providers. Set at least one API key. If both are set, Anthropic is used by default.
146+
This app supports both Anthropic and OpenAI as AI providers. Set at least one API key — if both are set, Anthropic is used by default.
147147

148148
### Anthropic Setup
149149

@@ -272,15 +272,15 @@ python3 app_oauth.py
272272

273273
### Using the App
274274

275-
Once the agent is running, invite it to a channel by typing `/invite @agent-name` in the message box.
275+
Once the agent is running, there are several ways to interact:
276276

277-
**Channel @mentions** — @mention the agent in a thread with a question about the conversation, like _what did we decide here?_, and it answers in the thread. @mention it with a task and a repo, like _add a "hello world" to the README of `<repo>`_, and it replies with a link to a new code channel for the work.
277+
**App Home** — Open the agent in Slack and click the _Home_ tab to see how to start a task.
278278

279-
**Direct messages** — Open the agent's _Messages_ tab and ask a question or describe a task, or pick a suggested prompt. It answers there, or links a code channel for bigger work.
279+
**Direct Messages** — Open the agent's _Messages_ tab and ask a question or describe a task, or pick a suggested prompt. It answers there, or links a code channel for bigger work.
280280

281-
**Code channels** — Follow the work in the new channel. Approve or deny commands as they come up, comment on the Plan tab, review the diff in the code tab, and send follow-ups without an @mention. Say you're done to wrap up and archive the channel.
281+
**Channel @mentions** — Invite the agent to a channel by typing `/invite @agent-name` in the message box, then @mention it in a thread with a question about the conversation, like _what did we decide here?_, and it answers in the thread. @mention it with a task and a repo, like _add a "hello world" to the README of `<repo>`_, and it replies with a link to a new code channel for the work.
282282

283-
**App Home** — Open the agent in Slack and click the _Home_ tab to see how to start a task.
283+
**Code Channels** — Follow the work in the new channel. Approve or deny commands as they come up, comment on the Plan tab, review the diff in the code tab, and send follow-ups without an @mention. Say you're done to wrap up and archive the channel.
284284

285285
### Linting
286286

@@ -295,7 +295,8 @@ ruff format
295295
### Testing
296296

297297
```sh
298-
pytest
298+
# Run pytest from root directory for unit testing
299+
pytest .
299300
```
300301

301302
## Project Structure
@@ -336,7 +337,7 @@ Every incoming request is routed to a "listener". This directory groups each lis
336337

337338
### `/agent`
338339

339-
The `agent.py` file defines the routing agent and the coding agent with their tools, picks their models, and starts and resumes their runs. It and `guardrails.py` are the only files outside `tools` that use Pydantic AI.
340+
The `agent.py` file 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.
340341

341342
The `prompts.py` file holds both agents' prompts.
342343

0 commit comments

Comments
 (0)