Observed since 20 Oct, 23:25 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
A Python SDK for building multi-agent worlds that communicate through Slack.
agentslack - agent collaboration on Slack. Ping!
agentslack is a Python package that provides a communication layer for multi-agent worlds via Slack. It allows you to monitor, observe, and participate in agent conversations in real time. With Slack's familiar interface, you can easily integrate human oversight, store conversation history, and manage parallel agent worlds seamlessly.
Install the latest stable version from PyPI:
pip install agentslack
Create a Slack Workspace.
Create a Slack App with the permissions from configs/app_manifest.json.
Make a file called slack_config.json file with the app credentials. A sample config structure is provided in slack_config_sample.json.
For more detailed information about configuration, available tools, and API reference, check out our detailed documentation.
{
"slack_app_info": {
"agent_apps": [
{
"slack_token": "<token-agent-1>",
"slack_member_id": "<member-id-agent-1>"
},
{
"slack_token": "<token-agent-2>",
"slack_member_id": "<member-id-agent-2>"
}
],
"world_app": {
"slack_token": "<token-world>",
"slack_member_id": "<member-id-world>"
}
},
"humans": [
{
"slack_member_id": "<member-id-human-1>",
"name": "Veniamin",
"expertise": "Horticulture specialist"
},
{
"slack_member_id": "<member-id-human-2>",
"name": "Benedikt",
"expertise": "Oceanographer"
}
],
"slack_client_id": "<client-id>",
"slack_client_secret": "<client-secret>",
"always_add_users": ["<member-id-human-1>", "<member-id-human-2>"]
}
world_app is the Slack app that is used to run API calls on behalf of the world such as exporting agent logs.agent_apps are the apps used for the agents.humans are the humans that are available to the agents for consultation.always_add_users are the users that are added to all channels and DMs by default in order for them to observe the agents.from agentslack import AgentSlack
# Create AgentSlack instance and start the server
agentslack = AgentSlack(port=8080)
agentslack.start()
# Register world and agents
worldname = 'w1'
agents = ['a1', 'a2']
agentslack.register_world(worldname)
for agent in agents:
agentslack.register_agent(agent, worldname)
# List available tools
tools = agentslack.list_tools()
print(f"Available tools: {tools}")
# Send a message using the send_message tool
response = agentslack.call_tool("send_message",
message="Hello from the SDK!",
your_name="a1",
recipient_name="a2"
)
# Clean shutdown
agentslack.stop()
register_world(world_name) to set up a namespace for your agents.register_agent(agent_name, world_name) to tie agents to your Slack workspace.send_message.Logs are saved in the log_dir directory specified in the config.json file. Each world has its own directory. Each agent has its own file which contains a list of all the messages sent and received by the agent grouped by channel. The logs are contain metadata about the channels the agents is a part of.
The package is organized as follows:
src/agentslack/
├── __init__.py # Package entry point
├── api.py # FastAPI server implementation
├── client.py # Client interface
├── registry.py # Agent and world registry
└── slack.py # Slack integration
api.py: Houses the FastAPI server for handling incoming and outgoing requests.client.py: Simplifies communication between your Python code and the Slack-based agent world.registry.py: Tracks active worlds and agents.slack.py: Slack-specific integrations, including authentication and messaging logic.We welcome contributions from the community! Please reach out to us via sage.cs.princeton.edu if you are interested in contributing.
🎵 We thought we'd get stars (we've got 2 now!)
Check out our track Slack God - the flow makes you wonder how
No stars yet, but we're slacking with style
Agent chats stack up mile after mile
Happy agent chatting :)
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 1.0.4 | 1 Feb 2025 | 9 |
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 23:25 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:0570b74700cbd72a06dd9e265eb4dd4b7a33cb5b0867eeb492251ff99c41dd83