Ananke.Platforms.Slack 0.7.2

dotnet add package Ananke.Platforms.Slack --version 0.7.2
                    
NuGet\Install-Package Ananke.Platforms.Slack -Version 0.7.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Ananke.Platforms.Slack" Version="0.7.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Ananke.Platforms.Slack" Version="0.7.2" />
                    
Directory.Packages.props
<PackageReference Include="Ananke.Platforms.Slack" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Ananke.Platforms.Slack --version 0.7.2
                    
#r "nuget: Ananke.Platforms.Slack, 0.7.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Ananke.Platforms.Slack@0.7.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Ananke.Platforms.Slack&version=0.7.2
                    
Install as a Cake Addin
#tool nuget:?package=Ananke.Platforms.Slack&version=0.7.2
                    
Install as a Cake Tool

Ananke.Platforms.Slack

NuGet License

Slack adapter for Ananke - bridges Slack Bot events (Socket Mode and Events API) to Ananke agent workflows via IMessagePlatformAdapter. Supports streaming chat responses using the post-then-edit pattern with automatic debouncing.

Install

dotnet add package Ananke.Platforms.Slack

Prerequisites

  1. Create a Slack App at api.slack.com/apps
  2. Enable Socket Mode and generate an App-Level Token (xapp-…)
  3. Add Bot Token Scopes: chat:write, reactions:write, channels:history, groups:history, im:history, mpim:history
  4. Subscribe to bot events: message.channels, message.groups, message.im, message.mpim
  5. Install the app to your workspace and copy the Bot User OAuth Token (xoxb-…)

Quick start

using Ananke.Platforms;
using Ananke.Platforms.Slack;

services.AddAnankeSlack(options =>
{
    options.BotToken = config["Slack:BotToken"]!;
    options.AppToken = config["Slack:AppToken"]!;
    options.UseSocketMode = true;
});

services.AddSingleton<IPlatformMessageHandler, MyAgentHandler>();

What it registers

Service Implementation
IMessagePlatformAdapter SlackAdapter — Socket Mode (WebSocket) or Events API (HTTP), dispatches incoming messages
IPlatformResponseSink SlackResponseSinkchat.postMessage / chat.update / reactions.add via Slack Web API
IHostedService SlackHostedService — starts/stops the adapter with the application host

Connection modes

Mode Config Public URL required Best for
Socket Mode UseSocketMode = true + AppToken No Development, internal bots
Events API UseSocketMode = false + SigningSecret Yes Production, high-traffic

Streaming behavior

Slack does not support server-push streaming into a message. The adapter uses the post-then-edit pattern:

  1. On the first text delta, a placeholder message () is posted
  2. As deltas arrive, the message is edited via chat.update (debounced at 300 ms)
  3. On completion, a final edit flushes the complete text

Thread support

Slack threads are handled automatically. Messages with a thread_ts are routed with PlatformMessage.ThreadId set, and responses are posted back into the same thread.

Slash commands — limitations

Unlike Discord, where slash commands can be registered programmatically at runtime, Slack slash commands have significant limitations that prevent automatic ToolKit/command bridging:

Limitation Detail
No programmatic registration Slack requires slash commands to be manually configured in the App dashboard (api.slack.com/apps → Slash Commands). There is no API to create, update, or remove commands at runtime. Every tool must be added by hand.
No structured parameters Slack slash commands accept a single free-text string after the command name (e.g., /echo hello world). There are no typed parameters, no autocomplete, and no validation. The handler must parse the text manually.
3-second response timeout Slack's HTTP request must be acknowledged within 3 seconds. For tools that take longer, you must send an immediate acknowledgment and post the result later via response_url or chat.postMessage.
No parameter autocomplete Discord shows parameter names, types, and descriptions in the command picker. Slack provides nothing — just a text input box.
Separate handler registration SlackNet uses ISlashCommandHandler for slash commands, which is a different registration path from the IEventHandler<MessageEvent> used for messages. Commands and chat messages don't share a handler pipeline.

What works today

Slack chat messages (DMs and channel messages) flow through SlackAdapterIPlatformMessageHandlerStreamingChatWorkflow with full streaming and tool support. The LLM invokes tools naturally during conversation — this covers the primary use case.

Future possibilities

If Slack introduces a richer command model (or if demand justifies the manual-registration workflow), a future version could provide:

  • A SlackSlashCommandHandler that maps incoming /command text to ToolKit.Tools[name].ExecuteAsync
  • Helper scripts for bulk-configuring Slack commands from a ToolKit manifest
  • response_url-based async responses for long-running tools

For now, the recommendation is to use Discord for slash-command-style tool invocation and Slack for conversational agent workflows.

Documentation

Full docs, demos, and architecture: github.com/sevensamurai/Ananke

License

Apache 2.0

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.7.2 88 4/12/2026
0.7.1 87 4/11/2026
0.7.0 92 4/11/2026
0.6.0 95 4/10/2026