Skip to content

feat(methods): add agents.conversations.* method examples - #87

Draft
zimeg wants to merge 2 commits into
mainfrom
clack/code-channels-method-examples
Draft

zimeg wants to merge 2 commits into
mainfrom
clack/code-channels-method-examples

Conversation

@zimeg

@zimeg zimeg commented Sep 24, 2026

Copy link
Copy Markdown
Member

Adds example snippets for the Slack Code code-channel Web API methods, under the agents.conversations.* family (methods/src/main/java/agents/conversations/) — the java counterpart to the python bolt-python-examples #194 set. Each example mirrors the merged agents.sessions template: reads SLACK_TOKEN, builds a *Request via its builder, calls the matching methods.agentsConversations* method, and prints the response.

  • agents.conversations.create — create a dedicated code channel for an agent session
  • agents.conversations.archive — archive a code channel (optionally recording a summary message)
  • agents.conversations.setProperties — set properties on a code channel (context bar items, external resource details)
  • agents.conversations.setView — create or update a view (HTML, diff, Block Kit, or canvas tabs)
  • agents.conversations.setCommands — register the agent's slash commands in a code channel
  • agents.conversations.listViews — list the view tabs attached to a code channel
  • agents.conversations.removeView — remove a view from a code channel
  • agents.conversations.getCanvas — fetch a canvas attached to a code channel
  • agents.conversations.setCanvasContent — replace the full markdown content of a plan canvas

The manifest declares the code_channels feature and the code_channels:manage scope. Explicitly no legacy codeChannels.* method names — we ship agents.conversations.* only, mirroring the SDK realign.

The setProperties code_channel object and setCommands commands array are passed as JSON-encoded strings (codeChannelAsString / commandsAsString), matching how the java SDK (#1647) models these not-yet-stabilized arguments. The rename example lives in the sibling agents.sessions examples (agents.sessions.rename), so there is no agents.conversations.rename here.

Dependency — stays DRAFT

Depends on the agents.conversations.* SDK methods (slackapi/java-slack-sdk#1647) landing in a published slack-api-client release. mvn compile will fail against the currently-pinned release (1.51.0) because these methods aren't in a release yet — that is expected (executable-spec pattern). This PR stays DRAFT until #1647 ships and the pinned slack-api-client version includes the methods.

🤖 Generated with Claude Code

zimeg and others added 2 commits September 23, 2026 17:25
Add nine agents.conversations.* code-channel method examples, the java
counterpart to the python bolt-python-examples #194 set. Each example
mirrors the merged agents.sessions template: reads SLACK_TOKEN, builds a
*Request via the builder, calls the matching methods.agentsConversations*
method, and prints the response.

The setProperties code_channel object and setCommands commands array are
passed as JSON-encoded strings (codeChannelAsString / commandsAsString),
matching how the java SDK models these not-yet-stabilized arguments.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Set socket_mode_enabled: true so the example app can register agent
slash commands. agents.conversations.setCommands returns no_actions_url
unless the app has either a code_channels.slash_command_url or Socket
Mode; Socket Mode routes command invocations automatically with no
public URL to stand up.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant