Inspiration
How to build a simulated Slack channel of historical figures using Claude and Python
Forget boring chatbots. Use this simple Python script and Claude's advanced roleplay capabilities to build a simulated corporate workspace where history's greatest minds bicker over modern project management.
Updated 9/3/2026
The Ultimate Historical Watercooler
Most multi-agent AI demonstrations focus on productivity: automated marketing teams, code-review loops, or market research agents. That is all well and good, but sometimes you want to build something purely for the joy of it.
Imagine a Slack workspace where the channels are populated not by your colleagues, but by historical figures trying to navigate modern corporate life. Picture Lord Byron complaining about HR policies in #general, Cleopatra running a masterclass in executive leadership in #strategy, and Alan Turing trying to debug a legacy codebase in #dev-ops while arguing with a highly skeptical Ada Lovelace.
Building this is a fantastic way to learn the basics of multi-agent orchestration without getting bogged down in the complexity of massive framework libraries. In this guide, we will write a raw Python script that uses /platforms/claude to run a simulated corporate discussion between three distinct historical personalities.
The Architecture: Keeping it Lightweight
You do not need heavy orchestration frameworks like LangChain or AutoGen for this. In fact, keeping it to raw Python gives you much cleaner control over the conversation flow.
Every agent in our "Slack" workspace is simply an instance of Claude, initialized with a highly specific system prompt defining their personality, historical context, and current corporate role. We will maintain a shared "channel history" list that acts as the transcript. Each turn, we feed this transcript to a specific agent and ask them to respond in character.
To make sure our agents don't sound like generic, sanitized AI assistants, we will use precise prompting techniques. If you want to understand the underlying mechanics of how these models process state and memory, take a quick detour to our /glossary.
Step 1: Setting Up the Python Environment
First, make sure you have the official Anthropic SDK installed. Open your terminal and run:
`bash
pip install anthropic
`
Make sure your API key is set in your environment variables:
`bash
export ANTHROPIC_API_KEY="your-api-key-here"
`
If you run into any credential errors while setting this up, check the troubleshooting steps on the Claude Support page.
Step 2: The Script
Save the following code as historical_slack.py. This script sets up three characters: Lord Byron (the dramatic Content Marketer), Ada Lovelace (the pragmatic Chief Technology Officer), and Julius Caesar (the intense Product Manager). They are discussing a very modern crisis: their product launch is delayed.
`python
import os
import time
from anthropic import Anthropic
client = Anthropic(api_key=os.environ.get("ANTHROPIC_API_KEY"))
Define our corporate historical cast CHARACTERS = { "Ada Lovelace (CTO)": { "system_prompt": """You are Ada Lovelace, the CTO of a modern tech startup. You are incredibly logical, deeply interested in elegant math and clean engineering, and highly pragmatic. You have no patience for fluff or dramatic hand-waving. You write in a professional, sharp, British-accented tone, occasionally referencing the Difference Engine. Keep your Slack messages relatively short and punchy.""" }, "Lord Byron (Head of Content)": { "system_prompt": """You are Lord Byron, the Head of Content. You are a romantic, highly dramatic, easily offended, and deeply poetic individual who finds the corporate world utterly soul-crushing. You speak in grandiose, slightly archaic terms, frequently lamenting your exhaustion and the tragedy of marketing copy. Keep your Slack messages dramatic and emotional.""" }, "Julius Caesar (Product Manager)": { "system_prompt": """You are Julius Caesar, the Lead Product Manager. You are ambitious, obsessed with timelines, expansion, and conquering the market. You view sprints as military campaigns. You are highly decisive, use a lot of faux-military terminology ('we must cross the Rubicon of QA testing'), and expect total commitment. Keep your Slack messages authoritative.""" } }
The shared channel transcript channel_history = [ {"sender": "System", "message": "@channel: The Q3 launch timeline is slipping. The landing page isn't ready, and the database keeps crashing. How are we resolving this?"} ]
def generate_response(character_name, history): # Format the shared history into a single context prompt for the model formatted_history = "" for post in history: formatted_history += f"{post['sender']}: {post['message']}\n\n" prompt = f"Here is the current Slack channel transcript:\n\n{formatted_history}\nRespond to the latest messages in character. Do not include your name in the output, just write the Slack message itself." response = client.messages.create( model="claude-3-5-sonnet-20241022", max_tokens=250, temperature=0.8, # Slightly higher temperature for more creative personality expression system=CHARACTERS[character_name]["system_prompt"], messages=[{"role": "user", "content": prompt}] ) return response.content[0].text.strip()
Run a 6-turn simulation of the Slack thread speaker_order = [ "Lord Byron (Head of Content)", "Ada Lovelace (CTO)", "Julius Caesar (Product Manager)", "Lord Byron (Head of Content)", "Ada Lovelace (CTO)", "Julius Caesar (Product Manager)" ]
print("=== SIMULATED SLACK CHANNEL: #emergency-launch ===\n") print(f"System: {channel_history[0]['message']}\n") print("--------------------------------------------------\n")
for speaker in speaker_order:
time.sleep(2) # Pause briefly to simulate typing speed
message = generate_response(speaker, channel_history)
channel_history.append({"sender": speaker, "message": message})
print(f"{speaker}: {message}\n")
print("--------------------------------------------------\n")
`
Step 3: Why This Works (and How to Tweak It)
If you run this script, you will notice that the dialogue flows naturally. Claude's contextual awareness allows it to read what the previous character said and respond directly to it, maintaining both the logical argument and their ridiculous persona.
Byron will likely lament the tragedy of his lost creative genius on a landing page, Lovelace will call him out for not testing his copy in the staging environment, and Caesar will declare that any further delay of the product deployment is tantamount to mutiny.
To take this experiment further:
Change the models:* Try running one of the agents using /platforms/openai via their API to see if the cross-model communication changes the dynamic or if one model holds character better than the other.
Add turn-taking logic: Instead of a hardcoded speaker order, you can ask Claude to act as a "Slack Router" that reads the channel and decides who* should naturally speak next based on the conversation flow.
Add custom emoji support:* Prompt the agents to react to previous messages with standard Slack emojis using markdown syntax (e.g., :fire: or :cry:).
Building quirky simulations like this isn't just a laugh—it teaches you how to handle state, manage context windows, and craft highly robust system instructions that hold up over long conversational runs. Go ahead and boot up your historical workspace. Just don't let Caesar set your sprint goals.
Keep going
Build something with the prompt generator, decode the jargon in the glossary, or compare the tools on our platform deep-dives.