Last active
January 5, 2026 23:44
-
-
Save larkintuckerllc/50d8aea3867368f4c4d0b09f04d7f969 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| from slack_bolt import App | |
| from slack_bolt.adapter.socket_mode import SocketModeHandler | |
| app = App(token=os.environ.get("SLACK_BOT_TOKEN")) | |
| @app.command("/agent") | |
| def handle_agent_command(ack, command, client): | |
| ack() | |
| channel_id = command["channel_id"] | |
| prompt = command.get("text", "") | |
| client.conversations_join(channel=channel_id) | |
| client.chat_postMessage( | |
| channel=channel_id, | |
| text=f"Working on the prompt... {prompt}" | |
| ) | |
| if __name__ == "__main__": | |
| SocketModeHandler(app, os.environ["SLACK_APP_TOKEN"]).start() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment