{"id":40227238,"url":"https://github.com/jonigl/sladk-agents","last_synced_at":"2026-01-19T22:34:35.402Z","repository":{"id":327258113,"uuid":"1107176923","full_name":"jonigl/sladk-agents","owner":"jonigl","description":"Slack AI agents powered by Google ADK. Deploy intelligent assistants directly in your workspace with multi-agent orchestration, real-time streaming, and extensible tools","archived":false,"fork":false,"pushed_at":"2025-12-02T16:25:44.000Z","size":69,"stargazers_count":0,"open_issues_count":6,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-05T14:50:42.680Z","etag":null,"topics":["adk","adk-python","agent-development-kit","agents","ai","ai-agents","google","python","slack","slack-agent","slack-bot"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jonigl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-30T18:12:51.000Z","updated_at":"2025-12-02T16:25:47.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/jonigl/sladk-agents","commit_stats":null,"previous_names":["jonigl/sladk-agents"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/jonigl/sladk-agents","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonigl%2Fsladk-agents","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonigl%2Fsladk-agents/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonigl%2Fsladk-agents/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonigl%2Fsladk-agents/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonigl","download_url":"https://codeload.github.com/jonigl/sladk-agents/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonigl%2Fsladk-agents/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28587244,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-19T20:45:59.482Z","status":"ssl_error","status_checked_at":"2026-01-19T20:45:41.500Z","response_time":67,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["adk","adk-python","agent-development-kit","agents","ai","ai-agents","google","python","slack","slack-agent","slack-bot"],"created_at":"2026-01-19T22:34:34.632Z","updated_at":"2026-01-19T22:34:35.393Z","avatar_url":"https://github.com/jonigl.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sladk Agents\n\n**Your company's Slack AI agents of the new era of generative AI powered by Google Agent Development Kit (ADK)**\n\n[![Track: Enterprise Agents](https://img.shields.io/badge/Track-Enterprise%20Agents-blue)](https://www.kaggle.com/competitions/agents-intensive-capstone-project/overview/tracks-and-awards)\n[![Powered by Gemini](https://img.shields.io/badge/Powered%20by-Gemini-orange)](https://ai.google.dev/)\n[![Google ADK](https://img.shields.io/badge/Google-ADK-green)](https://google.github.io/adk-docs/)\n[![Slack Bolt](https://img.shields.io/badge/Slack-Bolt%20for%20Python-purple)](https://docs.slack.dev/tools/bolt-python)\n\n---\n\n## 📑 Table of Contents\n\n- [🎯 The Problem](#-the-problem)\n- [💡 The Solution](#-the-solution)\n- [🏗️ Architecture](#️-architecture)\n- [✨ Key Features Implemented (ADK Concepts)](#-key-features-implemented-adk-concepts)\n- [🚀 Setup \u0026 Installation](#-setup--installation)\n- [🎮 Usage](#-usage)\n- [🖥️ Demos](#️-demos)\n- [🔧 Extending the Agent](#-extending-the-agent)\n- [📊 Impact \u0026 Value](#-impact--value)\n- [🛣️ Future Roadmap](#️-future-roadmap)\n- [📚 References](#-references)\n- [📜 License](#-license)\n- [👤 Author](#-author)\n- [🙏 Acknowledgments](#-acknowledgments)\n\n---\n\n## 🎯 The Problem\n\nEnterprise teams rely heavily on Slack for daily collaboration—sharing updates, asking questions, coordinating projects, and making decisions. However, accessing AI-powered assistance typically requires:\n\n- **Context switching**: Leaving Slack to use external AI tools (Gemini web, chatGPT, etc.)\n- **Manual copy-paste workflows**: Moving conversation context between platforms\n- **Lost productivity**: Teams lose time switching between tools\n- **Fragmented knowledge**: AI insights don't stay where the work happens\n\nWhile Slack recently introduced [AI Agents](https://docs.slack.dev/ai/) as a native feature, building production-ready agents still requires significant integration work, especially when leveraging advanced AI frameworks.\n\n## 💡 The Solution\n\n**Sladk Agents** bridges the gap between Slack's native AI Agent capabilities and Google's powerful [Agent Development Kit (ADK)](https://google.github.io/adk-docs/). It provides a ready-to-deploy framework that enables enterprises to:\n\n- Deploy AI agents directly within Slack's native UI (side panel, threads, mentions)\n- Leverage Google ADK's multi-agent architecture with sub-agents for specialized tasks\n- Maintain conversation context through session management\n- Extend functionality with built-in and custom tools\n- Stream responses in real-time for a seamless user experience\n\n**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.\n\n## 🏗️ Architecture\n\n```\n┌─────────────────────────────────────────────────────────────────────────────┐\n│                              SLACK WORKSPACE                                │\n│  ┌─────────────┐  ┌─────────────┐  ┌─────────────┐  ┌─────────────────────┐ │\n│  │  Side Panel │  │   Threads   │  │  @mentions  │  │   Direct Messages   │ │\n│  │  Assistant  │  │             │  │             │  │                     │ │\n│  └──────┬──────┘  └──────┬──────┘  └──────┬──────┘  └──────────┬──────────┘ │\n└─────────┼────────────────┼────────────────┼────────────────────┼────────────┘\n          │                │                │                    │\n          └────────────────┴────────────────┴────────────────────┘\n                                    │\n                                    ▼\n┌─────────────────────────────────────────────────────────────────────────────┐\n│                         SLADK AGENTS (Bolt for Python)                      │\n│  ┌────────────────────────────────────────────────────────────────────────┐ │\n│  │                          AsyncApp + Socket Mode                        │ │\n│  │  • Real-time WebSocket connection to Slack                             │ │\n│  │  • Async handlers for non-blocking operations                          │ │\n│  │  • Native streaming support (chat_stream)                              │ │\n│  └────────────────────────────────────────────────────────────────────────┘ │\n│                                    │                                        │\n│                                    ▼                                        │\n│  ┌────────────────────────────────────────────────────────────────────────┐ │\n│  │                           LISTENERS                                    │ │\n│  │  ┌──────────────┐  ┌──────────────┐  ┌──────────────┐                  │ │\n│  │  │  Assistant   │  │    Events    │  │   Actions    │                  │ │\n│  │  │  • started   │  │  • mentions  │  │  • feedback  │                  │ │\n│  │  │  • message   │  │              │  │              │                  │ │\n│  │  └──────────────┘  └──────────────┘  └──────────────┘                  │ │\n│  └────────────────────────────────────────────────────────────────────────┘ │\n└─────────────────────────────────────────────────────────────────────────────┘\n                                    │\n                                    ▼\n┌─────────────────────────────────────────────────────────────────────────────┐\n│                         GOOGLE ADK (Agent Layer)                            │\n│  ┌────────────────────────────────────────────────────────────────────────┐ │\n│  │                         LlmAgent (Root Agent)                          │ │\n│  │  • Model: Gemini 2.5 Flash (configurable)                              │ │\n│  │  • Custom system instructions                                          │ │\n│  │  • Safety settings \u0026 temperature control                               │ │\n│  └────────────────────────────────────────────────────────────────────────┘ │\n│                    │                    │                    │              │\n│                    ▼                    ▼                    ▼              │\n│  ┌──────────────────────┐ ┌──────────────────────┐ ┌──────────────────────┐ │\n│  │    SearchAgent       │ │     CodeAgent        │ │   Custom Tools       │ │\n│  │  (Sub-Agent)         │ │   (Sub-Agent)        │ │                      │ │\n│  │  ┌────────────────┐  │ │  ┌────────────────┐  │ │  ┌────────────────┐  │ │\n│  │  │ google_search  │  │ │  │ Code Executor  │  │ │  │  get_weather   │  │ │\n│  │  └────────────────┘  │ │  └────────────────┘  │ │  │  (wttr.in)     │  │ │\n│  └──────────────────────┘ └──────────────────────┘ │  └────────────────┘  │ │\n│                                                    │  ┌────────────────┐  │ │\n│                                                    │  │  + extensible  │  │ │\n│                                                    │  └────────────────┘  │ │\n│                                                    └──────────────────────┘ │\n│  ┌────────────────────────────────────────────────────────────────────────┐ │\n│  │                        SESSION MANAGEMENT                              │ │\n│  │  • InMemorySessionService: Maintains conversation state per thread     │ │\n│  │  • Context Compaction: Efficient token usage (interval=5, overlap=1)   │ │\n│  │  • User/Session ID mapping: Slack thread_ts → ADK session              │ │\n│  └────────────────────────────────────────────────────────────────────────┘ │\n│  ┌────────────────────────────────────────────────────────────────────────┐ │\n│  │                              RUNNER                                    │ │\n│  │  • Async execution with run_async()                                    │ │\n│  │  • Streaming response chunks to Slack                                  │ │\n│  └────────────────────────────────────────────────────────────────────────┘ │\n└─────────────────────────────────────────────────────────────────────────────┘\n                                    │\n                                    ▼\n┌─────────────────────────────────────────────────────────────────────────────┐\n│                            GEMINI API                                       │\n│                     (Generative AI Backend)                                 │\n└─────────────────────────────────────────────────────────────────────────────┘\n```\n\n## ✨ Key Features Implemented (ADK Concepts)\n\nThis project demonstrates **5 key concepts** from the Google ADK course:\n\n### 1. Multi-Agent System\n- **Root Agent (`LlmAgent`)**: Orchestrates user requests and delegates to specialized sub-agents\n- **SearchAgent**: Handles web search queries using Google Search tool\n- **CodeAgent**: Executes Python code for calculations and data processing\n\n### 2. Tools Integration\n- **Built-in Tools**: `google_search` for real-time web information\n- **Code Execution**: `BuiltInCodeExecutor` for running Python code\n- **Custom Tools**: `get_weather()` function demonstrating extensibility\n\n### 3. Sessions \u0026 State Management\n- **InMemorySessionService**: Maintains conversation context across messages\n- **Session persistence**: Each Slack thread maps to a unique ADK session\n- **User isolation**: Sessions are scoped per user and thread\n\n### 4. Context Engineering\n- **EventsCompactionConfig**: Optimizes token usage with:\n  - `compaction_interval=5`: Compact every 5 events\n  - `overlap_size=1`: Maintain context continuity\n\n### 5. Effective Use of Gemini\n- **Model**: Gemini 2.5 Flash (configurable via environment)\n- **Safety Settings**: Configurable content filtering\n- **Streaming**: Real-time response streaming to Slack\n\n\n## 🚀 Setup \u0026 Installation\n\n### Prerequisites\n\n- Python 3.10+\n- A Slack workspace with admin permissions\n- Google API key with Gemini access\n\n\u003e [!TIP]\n\u003e You can obtain a Google API with Gemini in the [Google AI Studio](https://aistudio.google.com/app/api-keys).\n\n### 1. Clone the Repository\n\n```bash\ngit clone https://github.com/jonigl/sladk-agents.git\ncd sladk-agents\n```\n\n### 2. Create Slack App\n\n\u003e [!TIP]\n\u003e You can also review the original Slack Bolt template [instructions here](SLACK_BOLT_TEMPLATE_README.md#creating-the-slack-app).\n\n1. Go to [api.slack.com/apps/new](https://api.slack.com/apps/new) → \"From an app manifest\"\n2. Select your workspace\n3. Paste contents of `manifest.json` → Click **Next** → **Create**\n4. Click **Install to Workspace** → **Allow**\n\n### 3. Configure Environment\n\n```bash\ncp .env.sample .env\n```\n\nEdit `.env` with your credentials:\n\n```bash\n# Slack Configuration\nSLACK_APP_TOKEN=xapp-...        # Basic Info → App-Level Tokens → connections:write\nSLACK_BOT_TOKEN=xoxb-...        # OAuth \u0026 Permissions → Bot User OAuth Token\n\n# Google ADK Configuration\nGOOGLE_API_KEY=your_google_api_key\nAGENT_MODEL=gemini-2.5-flash    # or gemini-2.0-flash, gemini-1.5-pro\nAGENT_APP_NAME=Sladk_App\nAGENT_NAME=Sladk_AI_Agent\n\n# Optional: Custom system instruction\nDEFAULT_SYSTEM_INSTRUCTION=\"You're a helpful assistant in a Slack workspace...\"\n```\n\n### 4. Install Dependencies\n\n```bash\npython3 -m venv .venv\nsource .venv/bin/activate\npip install -r requirements.txt\n```\n\n### 5. Run the Agent\n\n```bash\npython3 app.py\n```\n\nOr using Slack CLI:\n\n```bash\nslack run\n```\n\n---\n\n## 🎮 Usage\n\n### Configure your Slack Preferences\n\n1. Open Slack → Click your profile picture → **Preferences**\n2. Go to **Navigation** → Go to the **App agents \u0026 assistants**\n3. Click the checkbox for **Show app agents**\n\n\u003cvideo src=\"https://github.com/user-attachments/assets/3e2ccd42-95b3-4e54-9687-0129ffe29a26\" width=\"640\" controls\u003e\u003c/video\u003e\n\n### Interact with the Agent\n\nOnce running, interact with your agent in three ways:\n\n| Method | How |\n|--------|-----|\n| **Side Panel** | Click the agent icon in Slack's top right corner to open the AI assistant |\n| **@Mention** | Type `@Sladk AI Agent` in any channel |\n| **Direct Message** | Send a DM to the bot |\n\n### Example Interactions\n\n- *\"Search for the latest news about AI agents\"* → Uses SearchAgent\n- *\"Calculate the compound interest on $1000 at 5% for 10 years\"* → Uses CodeAgent\n- *\"What's the weather in San Francisco?\"* → Uses custom get_weather tool\n\n## 🖥️ Demos\n\n### Demo 1\n\n- Using google search built-in with ToolAgent / subagent\n- Using a custom tool to get the weather\n- Interacting with slack thread messages and mentions\n\n\u003cvideo src=\"https://github.com/user-attachments/assets/80def011-080a-4673-97f8-1ecd5f84e45d\" width=\"640\" controls\u003e\u003c/video\u003e\n\n### Demo 2\n\n- Python code execution using dedicated subagent as a tool\n\n\u003cvideo src=\"https://github.com/user-attachments/assets/287b5c93-624a-4cc3-9b3a-8f6cd0d43d97\" width=\"640\" controls\u003e\u003c/video\u003e\n\n## 🔧 Extending the Agent\n\n### Adding Custom Tools\n\nCreate new tools in `ai/tools/custom_tools.py`:\n\n```python\ndef my_custom_tool(param: str) -\u003e str:\n    \"\"\"\n    Description of what this tool does.\n    Args:\n        param: Description of parameter\n    Returns:\n        str: Description of return value\n    \"\"\"\n    # Your implementation\n    return result\n```\n\nThen add to the agent in `ai/llm_caller.py`:\n\n```python\nfrom ai.tools.custom_tools import get_weather, my_custom_tool\n\nagent = LlmAgent(\n    # ...\n    tools=[get_weather, my_custom_tool, AgentTool(agent=search_agent)],\n)\n```\n\n## 📊 Impact \u0026 Value\n\n| Metric | Improvement |\n|--------|-------------|\n| **Context Switching** | Eliminated - AI lives in Slack |\n| **Response Time** | Real-time streaming responses |\n| **Tool Access** | Web search, code execution, custom tools in one place |\n| **Session Memory** | Maintains context across conversation |\n| **Deployment** | Single Python app, no infrastructure complexity |\n\n## 🛣️ Future Roadmap\n\n- [ ] **Memory Bank Integration**: Long-term memory across sessions\n- [ ] **MCP Tools**: Model Context Protocol for external integrations\n- [ ] **Agent Engine Deployment**: Cloud Run / Agent Engine deployment\n- [ ] **Observability**: Tracing and metrics with OpenTelemetry\n- [ ] **A2A Protocol**: Agent-to-agent communication for complex workflows\n\n## 📚 References\n\n- [Google ADK Documentation](https://google.github.io/adk-docs/)\n- [Slack AI Apps Documentation](https://docs.slack.dev/ai/)\n- [Bolt for Python](https://docs.slack.dev/tools/bolt-python)\n- [Gemini API](https://ai.google.dev/)\n\n## 📜 License\n\nThis project uses **dual licensing**:\n\n| Component | License | File |\n|-----------|---------|------|\n| Base code (Slack Bolt template) | MIT License | [LICENSE](LICENSE) |\n| Sladk Agents additions (agent logic, architecture, ADK integration) | CC-BY-SA 4.0 | [LICENSE_CAPSTONE](LICENSE_CAPSTONE) |\n\nThe 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.\n\n## 👤 Author\n\n**Jonathan Gastón Löwenstern** - GitHub: [@jonigl](https://github.com/jonigl)\n\nBuilt with ❤️ for the [Kaggle \u0026 Google: Agents Intensive - Capstone Project](https://www.kaggle.com/competitions/agents-intensive-capstone-project) - November 2025\n\n## 🙏 Acknowledgments\n\n- Slack for the [bolt-python-assistant-template](https://github.com/slack-samples/bolt-python-assistant-template) foundation\n- Google for the [Agent Development Kit (ADK)](https://google.github.io/adk-docs/)\n- The [5-Day AI Agents Intensive Course with Google](https://www.kaggle.com/learn-guide/5-day-agents) community for inspiration and guidance\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonigl%2Fsladk-agents","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonigl%2Fsladk-agents","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonigl%2Fsladk-agents/lists"}