Your company's Slack AI agents of the new era of generative AI powered by Google Agent Development Kit (ADK)
- ๐ฏ The Problem
- ๐ก The Solution
- ๐๏ธ Architecture
- โจ Key Features Implemented (ADK Concepts)
- ๐ Setup & Installation
- ๐ฎ Usage
- ๐ฅ๏ธ Demos
- ๐ง Extending the Agent
- ๐ Impact & Value
- ๐ฃ๏ธ Future Roadmap
- ๐ References
- ๐ License
- ๐ค Author
- ๐ Acknowledgments
Enterprise teams rely heavily on Slack for daily collaborationโsharing updates, asking questions, coordinating projects, and making decisions. However, accessing AI-powered assistance typically requires:
- Context switching: Leaving Slack to use external AI tools (Gemini web, chatGPT, etc.)
- Manual copy-paste workflows: Moving conversation context between platforms
- Lost productivity: Teams lose time switching between tools
- Fragmented knowledge: AI insights don't stay where the work happens
While Slack recently introduced AI Agents as a native feature, building production-ready agents still requires significant integration work, especially when leveraging advanced AI frameworks.
Sladk Agents bridges the gap between Slack's native AI Agent capabilities and Google's powerful Agent Development Kit (ADK). It provides a ready-to-deploy framework that enables enterprises to:
- Deploy AI agents directly within Slack's native UI (side panel, threads, mentions)
- Leverage Google ADK's multi-agent architecture with sub-agents for specialized tasks
- Maintain conversation context through session management
- Extend functionality with built-in and custom tools
- Stream responses in real-time for a seamless user experience
Key Value Proposition: Teams can now access sophisticated AI assistance exactly where they collaborateโno context switching, no copy-paste, just intelligent help when and where they need it.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ SLACK WORKSPACE โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Side Panel โ โ Threads โ โ @mentions โ โ Direct Messages โ โ
โ โ Assistant โ โ โ โ โ โ โ โ
โ โโโโโโโโฌโโโโโโโ โโโโโโโโฌโโโโโโโ โโโโโโโโฌโโโโโโโ โโโโโโโโโโโโฌโโโโโโโโโโโ โ
โโโโโโโโโโโผโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโ
โ โ โ โ
โโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ SLADK AGENTS (Bolt for Python) โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ AsyncApp + Socket Mode โ โ
โ โ โข Real-time WebSocket connection to Slack โ โ
โ โ โข Async handlers for non-blocking operations โ โ
โ โ โข Native streaming support (chat_stream) โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ โ
โ โผ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ LISTENERS โ โ
โ โ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โ โ
โ โ โ Assistant โ โ Events โ โ Actions โ โ โ
โ โ โ โข started โ โ โข mentions โ โ โข feedback โ โ โ
โ โ โ โข message โ โ โ โ โ โ โ
โ โ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ GOOGLE ADK (Agent Layer) โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ LlmAgent (Root Agent) โ โ
โ โ โข Model: Gemini 2.5 Flash (configurable) โ โ
โ โ โข Custom system instructions โ โ
โ โ โข Safety settings & temperature control โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ โ โ โ
โ โผ โผ โผ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ SearchAgent โ โ CodeAgent โ โ Custom Tools โ โ
โ โ (Sub-Agent) โ โ (Sub-Agent) โ โ โ โ
โ โ โโโโโโโโโโโโโโโโโโ โ โ โโโโโโโโโโโโโโโโโโ โ โ โโโโโโโโโโโโโโโโโโ โ โ
โ โ โ google_search โ โ โ โ Code Executor โ โ โ โ get_weather โ โ โ
โ โ โโโโโโโโโโโโโโโโโโ โ โ โโโโโโโโโโโโโโโโโโ โ โ โ (wttr.in) โ โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโ โ โโโโโโโโโโโโโโโโโโ โ โ
โ โ โโโโโโโโโโโโโโโโโโ โ โ
โ โ โ + extensible โ โ โ
โ โ โโโโโโโโโโโโโโโโโโ โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ SESSION MANAGEMENT โ โ
โ โ โข InMemorySessionService: Maintains conversation state per thread โ โ
โ โ โข Context Compaction: Efficient token usage (interval=5, overlap=1) โ โ
โ โ โข User/Session ID mapping: Slack thread_ts โ ADK session โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ RUNNER โ โ
โ โ โข Async execution with run_async() โ โ
โ โ โข Streaming response chunks to Slack โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ GEMINI API โ
โ (Generative AI Backend) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
This project demonstrates 5 key concepts from the Google ADK course:
- Root Agent (
LlmAgent): Orchestrates user requests and delegates to specialized sub-agents - SearchAgent: Handles web search queries using Google Search tool
- CodeAgent: Executes Python code for calculations and data processing
- Built-in Tools:
google_searchfor real-time web information - Code Execution:
BuiltInCodeExecutorfor running Python code - Custom Tools:
get_weather()function demonstrating extensibility
- InMemorySessionService: Maintains conversation context across messages
- Session persistence: Each Slack thread maps to a unique ADK session
- User isolation: Sessions are scoped per user and thread
- EventsCompactionConfig: Optimizes token usage with:
compaction_interval=5: Compact every 5 eventsoverlap_size=1: Maintain context continuity
- Model: Gemini 2.5 Flash (configurable via environment)
- Safety Settings: Configurable content filtering
- Streaming: Real-time response streaming to Slack
- Python 3.10+
- A Slack workspace with admin permissions
- Google API key with Gemini access
Tip
You can obtain a Google API with Gemini in the Google AI Studio.
git clone https://github.com/jonigl/sladk-agents.git
cd sladk-agentsTip
You can also review the original Slack Bolt template instructions here.
- Go to api.slack.com/apps/new โ "From an app manifest"
- Select your workspace
- Paste contents of
manifest.jsonโ Click Next โ Create - Click Install to Workspace โ Allow
cp .env.sample .envEdit .env with your credentials:
# Slack Configuration
SLACK_APP_TOKEN=xapp-... # Basic Info โ App-Level Tokens โ connections:write
SLACK_BOT_TOKEN=xoxb-... # OAuth & Permissions โ Bot User OAuth Token
# Google ADK Configuration
GOOGLE_API_KEY=your_google_api_key
AGENT_MODEL=gemini-2.5-flash # or gemini-2.0-flash, gemini-1.5-pro
AGENT_APP_NAME=Sladk_App
AGENT_NAME=Sladk_AI_Agent
# Optional: Custom system instruction
DEFAULT_SYSTEM_INSTRUCTION="You're a helpful assistant in a Slack workspace..."python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txtpython3 app.pyOr using Slack CLI:
slack run- Open Slack โ Click your profile picture โ Preferences
- Go to Navigation โ Go to the App agents & assistants
- Click the checkbox for Show app agents
sladk-agents-configure-slack-workspace.mp4
Once running, interact with your agent in three ways:
| Method | How |
|---|---|
| Side Panel | Click the agent icon in Slack's top right corner to open the AI assistant |
| @Mention | Type @Sladk AI Agent in any channel |
| Direct Message | Send a DM to the bot |
- "Search for the latest news about AI agents" โ Uses SearchAgent
- "Calculate the compound interest on $1000 at 5% for 10 years" โ Uses CodeAgent
- "What's the weather in San Francisco?" โ Uses custom get_weather tool
- Using google search built-in with ToolAgent / subagent
- Using a custom tool to get the weather
- Interacting with slack thread messages and mentions
sladk-agents-demo-thread-custom-tool-mention-google-search.mp4
- Python code execution using dedicated subagent as a tool
sladk-agents-demo-code-execution.mp4
Create new tools in ai/tools/custom_tools.py:
def my_custom_tool(param: str) -> str:
"""
Description of what this tool does.
Args:
param: Description of parameter
Returns:
str: Description of return value
"""
# Your implementation
return resultThen add to the agent in ai/llm_caller.py:
from ai.tools.custom_tools import get_weather, my_custom_tool
agent = LlmAgent(
# ...
tools=[get_weather, my_custom_tool, AgentTool(agent=search_agent)],
)| Metric | Improvement |
|---|---|
| Context Switching | Eliminated - AI lives in Slack |
| Response Time | Real-time streaming responses |
| Tool Access | Web search, code execution, custom tools in one place |
| Session Memory | Maintains context across conversation |
| Deployment | Single Python app, no infrastructure complexity |
- Memory Bank Integration: Long-term memory across sessions
- MCP Tools: Model Context Protocol for external integrations
- Agent Engine Deployment: Cloud Run / Agent Engine deployment
- Observability: Tracing and metrics with OpenTelemetry
- A2A Protocol: Agent-to-agent communication for complex workflows
This project uses dual licensing:
| Component | License | File |
|---|---|---|
| Base code (Slack Bolt template) | MIT License | LICENSE |
| Sladk Agents additions (agent logic, architecture, ADK integration) | CC-BY-SA 4.0 | LICENSE_CAPSTONE |
The base Slack Bolt template code is covered by the MIT License (original work by Slack Technologies, LLC). All new agent logic, architecture, and Google ADK integration created for this Capstone project is licensed under CC-BY-SA 4.0 as required by the Kaggle competition rules.
Jonathan Gastรณn Lรถwenstern - GitHub: @jonigl
Built with โค๏ธ for the Kaggle & Google: Agents Intensive - Capstone Project - November 2025
- Slack for the bolt-python-assistant-template foundation
- Google for the Agent Development Kit (ADK)
- The 5-Day AI Agents Intensive Course with Google community for inspiration and guidance