Skip to content

Add Slack agent wrapper with command and rich Block Kit support#603

Merged
phenobarbital merged 1 commit intomainfrom
codex/implement-telegram-agent-wrapper
Feb 17, 2026
Merged

Add Slack agent wrapper with command and rich Block Kit support#603
phenobarbital merged 1 commit intomainfrom
codex/implement-telegram-agent-wrapper

Conversation

@phenobarbital
Copy link
Owner

Motivation

  • Add Slack as a first-class integration so AI-Parrot agents can be exposed via Slack Events API and slash command webhooks.
  • Provide a simple built-in command surface (help, clear, commands) and per-channel/user conversation memory for interactive Slack usage.
  • Render agent output as Slack Block Kit content (markdown sections, code blocks, tables, images/context) for richer responses.

Description

  • Add parrot/integrations/slack/wrapper.py implementing SlackAgentWrapper which handles Events API webhooks, slash commands, per-session memory, agent calls (agent.ask) and builds Slack Block Kit payloads for text, code, tables and images.
  • Add parrot/integrations/slack/models.py defining SlackAgentConfig with env fallback for bot_token and signing_secret, and parrot/integrations/slack/__init__.py to export the Slack integration.
  • Wire Slack into the unified integration model by updating parrot/integrations/models.py to recognize kind: slack and validate required credentials.
  • Update parrot/integrations/manager.py to initialize and track SlackAgentWrapper instances during startup and include them in shutdown cleanup.
  • Add unit tests tests/test_slack_integration.py that validate block generation and IntegrationBotConfig parsing for Slack.

Testing

  • Static verification: ran python -m py_compile parrot/integrations/slack/models.py parrot/integrations/slack/wrapper.py parrot/integrations/slack/__init__.py parrot/integrations/models.py parrot/integrations/manager.py parrot/integrations/__init__.py tests/test_slack_integration.py and it succeeded.
  • Attempted test run with pytest -q tests/test_slack_integration.py tests/test_integration_wrappers.py but test collection failed due to missing optional runtime dependencies (ModuleNotFoundError: markdown2, ModuleNotFoundError: aiohttp) in the environment.
  • Tried to install the missing packages with pip install aiohttp markdown2 -q but network/proxy restrictions prevented installation in this environment, so full pytest run could not be completed here.

Codex Task

@phenobarbital phenobarbital merged commit 8e4e9a3 into main Feb 17, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant