Skip to content

feat(methods): add agents.sessions method examples - #201

Merged
zimeg merged 11 commits into
mainfrom
clack/agents-sessions-method-examples
Sep 23, 2026
Merged

zimeg merged 11 commits into
mainfrom
clack/agents-sessions-method-examples

Conversation

@zimeg

@zimeg zimeg commented Aug 20, 2026 •

Copy link
Copy Markdown
Member

Adds agents.sessions.setStatus and agents.sessions.rename method examples with a minimal assistant:write manifest and the standard .slack CLI hooks.

These call typed methods that shipped in slack_sdk 3.44.0 (added in slackapi/python-slack-sdk#1942); methods/requirements.txt pins slack_sdk==3.44.0 accordingly. The agents.conversations.* code-channel examples PR (#194) stacks on top of this one.

🤖 Generated with Claude Code

zimeg and others added 6 commits August 19, 2026 23:05
Add examples for agents.sessions.setStatus and agents.sessions.rename with a
minimal assistant:write manifest and the standard .slack CLI hooks.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Match the family-first header convention (### agents, like ### chat) and
tighten the agents.sessions.* method descriptions.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
agents.sessions.setStatus and agents.sessions.rename require the chat:write
bot scope per the method reference, not assistant:write.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Move the agents.sessions method examples from a flat agents_sessions/ dir to
nested agents/sessions/ (path mirrors the agents.sessions.* method family),
updating the README implementation links.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Add the recommended agent_view event subscriptions (agent_session_stopped,
app_home_opened, message.im), the assistant:write scope, and im:history so
message.im events deliver; enable socket mode. Clears the manifest
recommendations and the agent_session_stopped subscription warning.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
@zimeg zimeg added the enhancement New feature or request label Aug 20, 2026
@zimeg zimeg self-assigned this Aug 20, 2026
zimeg added a commit to slack-samples/bolt-js-examples that referenced this pull request Aug 20, 2026
Mirror the Python examples (slack-samples/bolt-python-examples#201) for
the two agents.sessions methods, nested under agents/sessions/ to match:

- agents.sessions.rename    Rename an agent session.
- agents.sessions.setStatus Set an agent session's lifecycle status,
                            creating the session if needed.

Adds the two example scripts, a per-family manifest (agent view + the
agent session bot events) with its .slack CLI config, and an "agents"
section in the methods README.

Requires client.agents.sessions.{rename,setStatus} in @slack/web-api
(adds via slackapi/node-slack-sdk#2703); the package stays on the
released ^8.0.0 range until that ships, so the typecheck can't resolve
the methods until then.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
zimeg added a commit to slack-samples/bolt-js-examples that referenced this pull request Aug 20, 2026
Mirror the Python examples (slack-samples/bolt-python-examples#201) for
the two agents.sessions methods, nested under agents/sessions/ to match:

- agents.sessions.rename    Rename an agent session.
- agents.sessions.setStatus Set an agent session's lifecycle status,
                            creating the session if needed.

Adds the two example scripts, a per-family manifest (agent view + the
agent session bot events) with its .slack CLI config, and an "agents"
section in the methods README.

Requires client.agents.sessions.{rename,setStatus} in @slack/web-api
(adds via slackapi/node-slack-sdk#2703); the package stays on the
released ^8.0.0 range until that ships, so the typecheck can't resolve
the methods until then.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
zimeg added a commit to slack-samples/bolt-js-examples that referenced this pull request Aug 20, 2026
Mirror the Python examples (slack-samples/bolt-python-examples#201) for
the two agents.sessions methods, nested under agents/sessions/ to match:

- agents.sessions.rename    Rename an agent session.
- agents.sessions.setStatus Set an agent session's lifecycle status,
                            creating the session if needed.

Adds the two example scripts, a per-family manifest (agent view + the
agent session bot events) with its .slack CLI config, and an "agents"
section in the methods README.

Requires client.agents.sessions.{rename,setStatus} in @slack/web-api
(adds via slackapi/node-slack-sdk#2703); the package stays on the
released ^8.0.0 range until that ships, so the typecheck can't resolve
the methods until then.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
zimeg added a commit to slack-samples/bolt-js-examples that referenced this pull request Aug 20, 2026
Mirror the Python examples (slack-samples/bolt-python-examples#201) for
the two agents.sessions methods, nested under agents/sessions/ to match:

- agents.sessions.rename    Rename an agent session.
- agents.sessions.setStatus Set an agent session's lifecycle status,
                            creating the session if needed.

Adds the two example scripts, a per-family manifest (agent view + the
agent session bot events) with its .slack CLI config, and an "agents"
section in the methods README.

Requires client.agents.sessions.{rename,setStatus} in @slack/web-api
(adds via slackapi/node-slack-sdk#2703); the package stays on the
released ^8.0.0 range until that ships, so the typecheck can't resolve
the methods until then.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
zimeg and others added 2 commits August 20, 2026 10:27
`agent_view` only accepts `agent_description`, `suggested_prompts`, and
`actions` (additionalProperties: false), so `enabled: true` fails
manifest validation. Replace it with a minimal `agent_description`.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
…-method-examples

# Conflicts:
#	methods/README.md
@zimeg
zimeg marked this pull request as ready for review September 23, 2026 23:14
@zimeg
zimeg requested a review from a team as a code owner September 23, 2026 23:14
zimeg added a commit that referenced this pull request Sep 23, 2026
…ns.*

Decision (2026-09-23): ship agents.conversations.* only — no legacy
codeChannels.* method names. Renames methods/src/code_channels/ ->
methods/src/agents/conversations/, updates each example's method call
(client.agents_conversations_*), aligns args to the SDK #1943 signatures
(getCanvas/setCanvasContent take channel, not channel_id), drops the
rename example (agents.sessions.rename, covered by #201), and updates the
manifest description + methods/README. The features.code_channels manifest
feature and code_channels:manage scope are unchanged — only method names moved.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
zimeg and others added 3 commits September 23, 2026 16:21
…ame example

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…mple

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@zimeg

zimeg commented Sep 23, 2026

Copy link
Copy Markdown
Member Author

🏁 Will merge to extend with adjacent testing - these method are released!

At this time we're not referencing these implementation so reverting of course can be considered while more existing method examples are found. FWIW this is nice to have for testing purposes.

@zimeg
zimeg merged commit d69ccce into main Sep 23, 2026
7 checks passed
@zimeg
zimeg deleted the clack/agents-sessions-method-examples branch September 23, 2026 23:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant