OAUTH 2.0
MESSAGING
Decisions, blockers, and context move through Slack before they make it anywhere else. Your agent can search messages, read channel history, and surface signals, scoped to the member who authorized it.
import { ScalekitClient } from "@scalekit-sdk/node";
import { DynamicStructuredTool } from "@langchain/core/tools";
import { createReactAgent } from "@langchain/langgraph/prebuilt";
const sk = new ScalekitClient(envUrl, clientId, clientSecret);
// list slack tools scoped to a specific user
const { tools } = await sk.tools.listScopedTools("user_123", {
filter: { connectionNames: ["slack"], toolNames: ["slack_channels_list", "slack_channel_history", "slack_messages_send"] },
pageSize: 100,
});
// wrap each Scalekit tool as a LangChain DynamicStructuredTool
const lcTools = tools.map((t) => new DynamicStructuredTool({
name: t.tool.definition.name,
description: t.tool.definition.description,
schema: t.tool.definition.input_schema,
func: async (args) => sk.tools.executeTool({
toolName: t.tool.definition.name, identifier: "user_123", toolInput: args,
}),
}));
const agent = createReactAgent({ llm, tools: lcTools });import { ScalekitClient } from "@scalekit-sdk/node";
import OpenAI from "openai";
const sk = new ScalekitClient(envUrl, clientId, clientSecret);
const openai = new OpenAI();
const { tools } = await sk.tools.listScopedTools("user_123", {
filter: { connectionNames: ["slack"], toolNames: ["slack_channels_list", "slack_channel_history", "slack_messages_send"] },
pageSize: 100,
});
// shape tools as OpenAI function definitions
const llmTools = tools.map((t) => ({
type: "function" as const,
function: {
name: t.tool.definition.name,
description: t.tool.definition.description,
parameters: t.tool.definition.input_schema,
},
}));
const resp = await openai.responses.create({
model: "gpt-4o", input: prompt, tools: llmTools,
});import { ScalekitClient } from "@scalekit-sdk/node";
import Anthropic from "@anthropic-ai/sdk";
const sk = new ScalekitClient(envUrl, clientId, clientSecret);
const anthropic = new Anthropic();
const { tools } = await sk.tools.listScopedTools("user_123", {
filter: { connectionNames: ["slack"], toolNames: ["slack_channels_list", "slack_channel_history", "slack_messages_send"] },
pageSize: 100,
});
const llmTools = tools.map((t) => ({
name: t.tool.definition.name,
description: t.tool.definition.description,
input_schema: t.tool.definition.input_schema,
}));
const msg = await anthropic.messages.create({
model: "claude-sonnet-4-6", max_tokens: 1024,
tools: llmTools,
messages: [{ role: "user", content: prompt }],
});import { Agent } from "@google/adk/agents";
import {
MCPToolset, StreamableHTTPConnectionParams,
} from "@google/adk/tools/mcp";
const toolset = new MCPToolset({
connectionParams: new StreamableHTTPConnectionParams({
url: "https://mcp.scalekit.com/slack",
headers: { Authorization: `Bearer ${userScopedToken}` },
}),
});
const agent = new Agent({
name: "agent", model: "gemini-2.0-flash",
tools: await toolset.getTools(),
});// shared bot token
token = "xoxb-shared-xxx"
audit → slack_bot_service
user_filter → broken
// scalekit: per-user
token = resolve(user_id)
audit → user_abc
scope → enforced ✓