Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
1f11194
feat(methods): add agents.sessions method examples
zimeg Aug 20, 2026
67d25e0
feat(methods): add codeChannels method examples
zimeg Aug 20, 2026
d16b8c2
docs(methods): use `agents` section header and concise descriptions
zimeg Aug 20, 2026
67cfd1a
Merge branch 'clack/agents-sessions-method-examples-new' into clack/c…
zimeg Aug 20, 2026
3356acc
fix(methods): use chat:write scope for agents.sessions example
zimeg Aug 20, 2026
287c037
Merge branch 'clack/agents-sessions-method-examples-new' into clack/c…
zimeg Aug 20, 2026
13a1d6c
refactor(methods): nest agents.sessions example under agents/sessions/
zimeg Aug 20, 2026
2270dd3
Merge branch 'clack/agents-sessions-method-examples-new' into clack/c…
zimeg Aug 20, 2026
2df47f6
feat(methods): make agents.sessions example manifest a well-formed agent
zimeg Aug 20, 2026
4826a6b
Merge remote-tracking branch 'origin/clack/agents-sessions-method-exa…
zimeg Aug 20, 2026
c71e168
Merge remote-tracking branch 'origin/main' into clack/agents-sessions…
zimeg Aug 20, 2026
4f8922c
Merge branch 'clack/agents-sessions-method-examples' into clack/code-…
zimeg Aug 20, 2026
3d664a0
refactor(methods): rename codeChannels examples to agents.conversatio…
zimeg Sep 23, 2026
c80e434
Merge remote-tracking branch 'origin/main' into clack/code-channels-m…
zimeg Sep 24, 2026
322e8de
Merge remote-tracking branch 'origin/main' into clack/code-channels-m…
zimeg Sep 24, 2026
b1208f8
docs(methods): align agents.conversations README descriptions with docs
zimeg Sep 24, 2026
c721b51
docs(methods): match agents.conversations examples to docs #816 verbatim
zimeg Sep 24, 2026
f900ed5
feat(methods): enable Socket Mode in agents.conversations manifest
zimeg Sep 24, 2026
b7ed427
docs(methods): add the summarize command to setCommands example
zimeg Sep 25, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions methods/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,15 @@ $ slack run chat_post_message.py # Make the request

### agents

- **[agents.conversations.archive](https://docs.slack.dev/reference/methods/agents.conversations.archive)**: Archive a code channel. [Implementation](./src/agents/conversations/agents_conversations_archive.py).
- **[agents.conversations.create](https://docs.slack.dev/reference/methods/agents.conversations.create)**: Create a dedicated code channel for an agent session. [Implementation](./src/agents/conversations/agents_conversations_create.py).
- **[agents.conversations.getCanvas](https://docs.slack.dev/reference/methods/agents.conversations.getCanvas)**: Fetch a canvas attached to a code channel. [Implementation](./src/agents/conversations/agents_conversations_get_canvas.py).
- **[agents.conversations.listViews](https://docs.slack.dev/reference/methods/agents.conversations.listViews)**: List the views currently attached to a code channel. [Implementation](./src/agents/conversations/agents_conversations_list_views.py).
- **[agents.conversations.removeView](https://docs.slack.dev/reference/methods/agents.conversations.removeView)**: Remove a view from a code channel. [Implementation](./src/agents/conversations/agents_conversations_remove_view.py).
- **[agents.conversations.setCanvasContent](https://docs.slack.dev/reference/methods/agents.conversations.setCanvasContent)**: Replace the full markdown content of a plan canvas attached to a code channel. [Implementation](./src/agents/conversations/agents_conversations_set_canvas_content.py).
- **[agents.conversations.setCommands](https://docs.slack.dev/reference/methods/agents.conversations.setCommands)**: Register the set of agent-defined slash commands for the calling agent in a code channel. [Implementation](./src/agents/conversations/agents_conversations_set_commands.py).
- **[agents.conversations.setProperties](https://docs.slack.dev/reference/methods/agents.conversations.setProperties)**: Set properties on a code channel. [Implementation](./src/agents/conversations/agents_conversations_set_properties.py).
- **[agents.conversations.setView](https://docs.slack.dev/reference/methods/agents.conversations.setView)**: Create or update a view in a code channel. [Implementation](./src/agents/conversations/agents_conversations_set_view.py).
- **[agents.sessions.rename](https://docs.slack.dev/reference/methods/agents.sessions.rename)**: Rename an agent session. [Implementation](./src/agents/sessions/agents_sessions_rename.py).
- **[agents.sessions.setStatus](https://docs.slack.dev/reference/methods/agents.sessions.setStatus)**: Set an agent session's lifecycle status, creating the session if needed. [Implementation](./src/agents/sessions/agents_sessions_set_status.py).

Expand Down
2 changes: 2 additions & 0 deletions methods/src/agents/conversations/.slack/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
apps.dev.json
cache/
6 changes: 6 additions & 0 deletions methods/src/agents/conversations/.slack/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"manifest": {
"source": "local"
},
"project_id": "00000000-0000-0000-0000-000000000000"
}
5 changes: 5 additions & 0 deletions methods/src/agents/conversations/.slack/hooks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"hooks": {
"get-hooks": "python3 -m slack_cli_hooks.hooks.get_hooks"
}
}
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import os

from slack_sdk import WebClient

# Read a token from an environment variable
token = os.environ.get("SLACK_TOKEN")

# Initialize
client = WebClient(token=token)

# Call the agents.conversations.archive method
response = client.agents_conversations_archive(
channel_id="C9876543210",
summary_message_ts="1717182000.456789",
)

# Inspect the response
print(response)
20 changes: 20 additions & 0 deletions methods/src/agents/conversations/agents_conversations_create.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import os

from slack_sdk import WebClient

# Read a token from an environment variable
token = os.environ.get("SLACK_TOKEN")

# Initialize
client = WebClient(token=token)

# Call the agents.conversations.create method
response = client.agents_conversations_create(
name="Migrate billing cron to Temporal",
session_id="ses_8675309",
origin_channel_id="C0123456789",
origin_message_ts="1717171717.123456",
)

# Inspect the response
print(response)
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import os

from slack_sdk import WebClient

# Read a token from an environment variable
token = os.environ.get("SLACK_TOKEN")

# Initialize
client = WebClient(token=token)

# Call the agents.conversations.getCanvas method
response = client.agents_conversations_getCanvas(
channel="C9876543210",
canvas_id="F1234567890",
include_resolved=False,
)

# Inspect the response
print(response)
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import os

from slack_sdk import WebClient

# Read a token from an environment variable
token = os.environ.get("SLACK_TOKEN")

# Initialize
client = WebClient(token=token)

# Call the agents.conversations.listViews method
response = client.agents_conversations_listViews(
channel_id="C9876543210",
)

# Inspect the response
print(response)
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import os

from slack_sdk import WebClient

# Read a token from an environment variable
token = os.environ.get("SLACK_TOKEN")

# Initialize
client = WebClient(token=token)

# Call the agents.conversations.removeView method
response = client.agents_conversations_removeView(
channel_id="C9876543210",
view_key="reports/coverage.html",
)

# Inspect the response
print(response)
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import os

from slack_sdk import WebClient

# Read a token from an environment variable
token = os.environ.get("SLACK_TOKEN")

# Initialize
client = WebClient(token=token)

# Call the agents.conversations.setCanvasContent method
response = client.agents_conversations_setCanvasContent(
channel="C9876543210",
canvas_id="F1234567890",
content="# Migration plan\n\n1. Inventory cron jobs\n2. Port billing jobs last\n",
)

# Inspect the response
print(response)
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import os

from slack_sdk import WebClient

# Read a token from an environment variable
token = os.environ.get("SLACK_TOKEN")

# Initialize
client = WebClient(token=token)

# Call the agents.conversations.setCommands method
response = client.agents_conversations_setCommands(
channel_id="C9876543210",
commands=[
{
"name": "create-pr",
"description": "Open a pull request for the current branch",
"argument_hint": "[title]",
},
{
"name": "run-tests",
"description": "Run the test suite and report back",
},
{
"name": "summarize",
"description": "Post a summary of the work so far",
},
],
)

# Inspect the response
print(response)
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import os

from slack_sdk import WebClient

# Read a token from an environment variable
token = os.environ.get("SLACK_TOKEN")

# Initialize
client = WebClient(token=token)

# Call the agents.conversations.setProperties method
response = client.agents_conversations_setProperties(
channel_id="C9876543210",
code_channel={
"context_bar_items": [
{
"key": "repo",
"label": "borant/billing",
"icon": "folder",
"url": "https://github.com/borant/billing",
},
{
"key": "branch",
"label": "agent/migrate-cron",
"icon": "branch",
"url": "https://github.com/borant/billing/tree/agent/migrate-cron",
},
{
"key": "pr",
"label": "PR #42 is open",
"icon": "hierarchy",
"url": "https://github.com/borant/billing/pull/42",
},
{
"key": "ci",
"label": "Tests pending",
"icon": "terminal",
},
]
},
)

# Inspect the response
print(response)
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import os

from slack_sdk import WebClient

# Read a token from an environment variable
token = os.environ.get("SLACK_TOKEN")

# Initialize
client = WebClient(token=token)

# Call the agents.conversations.setView method
response = client.agents_conversations_setView(
channel_id="C9876543210",
view_key="reports/coverage.html",
name="Coverage",
content="<!doctype html><html><head>…</head><body>…</body></html>",
csp={
"resource_domains": ["https://cdn.jsdelivr.net"],
},
)

# Inspect the response
print(response)
25 changes: 25 additions & 0 deletions methods/src/agents/conversations/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"display_information": {
"name": "Slack API Methods",
"description": "Example implementations to call \"agents.conversations\" methods"
},
"features": {
"bot_user": {
"display_name": "Slack API Methods",
"always_online": true
},
"code_channels": {
"enabled": true
}
},
"oauth_config": {
"scopes": {
"bot": ["code_channels:manage"]
}
},
"settings": {
"org_deploy_enabled": true,
"socket_mode_enabled": true,

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👁️‍🗨️ note: This is required for commands to be created with a placeholder URL.

"token_rotation_enabled": false
}
}
Loading