The missing layer between your channels and your logic. Primitives for multi-channel conversations — not a platform, a foundation.
pip install roomkit
from roomkit import RoomKit, SMSChannel, AIChannel
kit = RoomKit()
# Register channels
kit.register_channel(SMSChannel("sms", provider))
kit.register_channel(AIChannel("ai", ai_provider))
# Create a room and attach channels
room = await kit.create_room()
await kit.attach_channel(room.id, "sms")
await kit.attach_channel(room.id, "ai")
# Process inbound messages
result = await kit.process_inbound(message)
# Messages flow through hooks, get stored,
# and broadcast to all attached channels
Building conversation systems today is harder than it should be.
Separate integrations for SMS, Email, WhatsApp, chat widgets. Each with its own SDK, webhooks, and quirks.
Customer starts on SMS, continues on email, finishes on chat. Your system treats these as 3 strangers.
"What did they say last week?" requires querying 5 different APIs.
+1-555-1234 on SMS is john@example.com on email is "John D." on chat. Connecting these is your problem.
Switching from Twilio to Telnyx means rewriting everything.
Messages flow into rooms, not silos. Switch channels mid-conversation without losing context.
Swap providers without changing application logic. Twilio today, Telnyx tomorrow.
Resolve unknown senders, handle ambiguity with hooks, merge identities across channels.
Intercept, route, moderate, or transform messages at any point. One place for all your logic.
Query conversations, not channels. Full context regardless of how customers reached you.
There are many tools in this space. Here's where RoomKit fits.
Move bytes between services. No concept of conversations or participants.
Focus on NLP, intent detection, and response generation.
Complete applications with UI, dashboards, and hosted infrastructure.
SaaS services that abstract multiple channels behind one API.
| RoomKit | Chatwoot | Twilio | Kombu | Rasa | |
|---|---|---|---|---|---|
| Open source | ✓ | ✓ | ✗ | ✓ | ✓ |
| Self-hosted | ✓ | ✓ | ✗ | ✓ | ✓ |
| Python library | ✓ | ✗ | ✓ | ✓ | ✓ |
| Multi-channel | ✓ | ✓ | ✓ | ✗ | ✗ |
| Room-based | ✓ | ✗ | ✗ | ✗ | ✗ |
| Identity resolution | ✓ | ~ | ✗ | ✗ | ✗ |
| Hook system | ✓ | ✗ | ✗ | ✗ | ✗ |
| Async-first | ✓ | N/A | ✓ | ✓ | ✗ |
| No per-message fees | ✓ | ✓ | ✗ | ✓ | ✓ |
| AI-ready (llms.txt) | ✓ | ✗ | ✗ | ✗ | ✗ |
A complete framework for building conversation systems at any scale.
Organize conversations into rooms with participants, events, and channel bindings. Each room is a self-contained conversation context.
SMS, Email, WebSocket, AI, HTTP webhooks, and more. Messages flow seamlessly between channels with automatic transcoding.
Built on Python's asyncio from the ground up. Handle thousands of concurrent conversations without blocking.
Intercept, modify, or block events at any point. Build content moderation, analytics, AI routing, and more with sync and async hooks.
Resolve unknown senders to known identities. Handle ambiguous cases with hooks for challenges, verification, or manual resolution.
In-memory defaults for development, plug in Redis, PostgreSQL, or custom implementations for production. Storage, locks, and realtime all pluggable.
Built-in support for popular communication channels with easy extensibility.
Clean, intuitive APIs that make complex operations simple.
from roomkit import RoomKit, HookTrigger, HookResult
kit = RoomKit()
# Content moderation hook
@kit.hook(HookTrigger.BEFORE_BROADCAST)
async def moderate_content(event, ctx):
if contains_profanity(event.content.body):
return HookResult.block("Content policy violation")
return HookResult.allow()
# AI routing hook
@kit.hook(HookTrigger.BEFORE_BROADCAST)
async def route_to_ai(event, ctx):
if needs_ai_response(event, ctx):
return HookResult.inject_to(["ai-channel"])
return HookResult.allow()
from roomkit import RoomKit, HookTrigger, IdentityHookResult
kit = RoomKit(identity_resolver=my_resolver)
# Handle ambiguous identity (multiple matches)
@kit.identity_hook(HookTrigger.ON_IDENTITY_AMBIGUOUS)
async def resolve_ambiguous(event, ctx, id_result):
# Access sender info directly
sender = id_result.address # e.g., "+14185551234"
if sender in known_senders:
identity = get_identity(known_senders[sender])
return IdentityHookResult.resolved(identity)
# Ask user to identify themselves
return IdentityHookResult.pending(
display_name=f"Unknown ({sender})",
candidates=id_result.candidates
)
from roomkit import RoomKit, EphemeralEventType
kit = RoomKit()
# Subscribe to typing indicators and presence
async def on_realtime(event):
if event.type == EphemeralEventType.TYPING_START:
print(f"{event.user_id} is typing...")
elif event.type == EphemeralEventType.PRESENCE_ONLINE:
print(f"{event.user_id} came online")
sub_id = await kit.subscribe_room("room-123", on_realtime)
# Publish typing indicator
await kit.publish_typing("room-123", "user-456")
# Publish read receipt
await kit.publish_read_receipt("room-123", "user-456", "event-789")
RoomKit includes llms.txt and AGENTS.md files that help AI coding assistants understand your codebase and generate correct, idiomatic code.
get_llms_txt()
from roomkit import get_llms_txt, get_agents_md
# Get documentation for LLM context
llms_content = get_llms_txt()
# Get coding guidelines for AI assistants
agents_content = get_agents_md()
# Use in your MCP server or AI tool
context = {
"documentation": llms_content,
"guidelines": agents_content
}
RoomKit is designed for seamless integration with the Model Context Protocol (MCP). Build AI assistants that can manage conversations, send messages, and handle multi-channel communication through a standardized protocol.
Get started with RoomKit in minutes. Check out the documentation for guides, examples, and API reference.