Skip to content

Instantly share code, notes, and snippets.

@KyMidd
Created September 25, 2025 19:33
Show Gist options
  • Select an option

  • Save KyMidd/d8525d3e84eba78f26577b9c2caa42e5 to your computer and use it in GitHub Desktop.

Select an option

Save KyMidd/d8525d3e84eba78f26577b9c2caa42e5 to your computer and use it in GitHub Desktop.
Modular import structure for the Slack Strands agentic bot showing separation of concerns
# Global imports
import os
import json
# Slack app imports
from slack_bolt.adapter.aws_lambda import SlackRequestHandler
# Import all constants and configuration
from worker_inputs import *
###
# Local imports
###
from worker_slack import update_slack_response, register_slack_app
from worker_aws import (
get_secret_with_client,
create_bedrock_client,
ai_request,
enrich_guardrail_block,
)
from worker_agent import execute_agent
from worker_conversation import build_conversation_content, handle_message_event
from worker_lambda import isolate_event_body, generate_response
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment