What is the OpenChat Bot SDK?
The OpenChat Bot SDK is a Motoko-based framework that simplifies bot development for OpenChat. It provides:- Ready-to-deploy bot implementations (TallyBot and ProposalBot)
- Complete OpenChat API integration for messaging, community management, and user interactions
- NNS governance integration for proposal tracking and voting
- Robust infrastructure including logging, error handling, and access control
- Production-ready patterns for canister deployment and upgrade management
Key Capabilities
Bot Registration
Register your bot with OpenChat, configure avatars, and manage bot identity
Community Integration
Join groups, communities, and channels programmatically with invite code support
Messaging
Send and edit messages in groups, channels, and threads with full content type support
Governance Tracking
Monitor NNS proposals, track voting tallies, and broadcast updates in real-time
Access Control
Custodian-based permissions system with comprehensive logging and metrics
Canister Management
Deploy, upgrade, and monitor your bot canisters on the Internet Computer
Architecture Overview
The SDK is organized into focused, composable modules:Use Cases
Governance Bots
Track NNS proposals and broadcast voting updates to OpenChat communities. TallyBot monitors proposal tallies and posts updates as votes change, helping communities stay informed about governance activity.Notification Bots
Monitor blockchain events, proposal submissions, or custom triggers and notify OpenChat channels in real-time.Custom Integrations
Build bots that bridge OpenChat with other Internet Computer services, external APIs, or traditional web services.Community Management
Automate community tasks like welcoming new members, moderating content, or providing information on demand.Technology Stack
Motoko
Safe, simple language designed for the Internet Computer
Internet Computer
Decentralized cloud platform with true ownership
OpenChat
Fully on-chain, decentralized chat platform
Mops
On-chain package manager for Motoko dependencies
dfx
Internet Computer SDK for canister deployment
mo-dev
Live reload development server for rapid iteration
Why Use This SDK?
Production-Ready: Both TallyBot and ProposalBot are deployed and running in production on OpenChat. Type-Safe: Written in Motoko with comprehensive type definitions for all OpenChat and NNS governance APIs. Modular Design: Use the entire SDK or cherry-pick components for your custom bot. Well-Documented: Extensive API documentation, guides, and real-world examples. Battle-Tested: Handles edge cases, upgrades, and error conditions that you’d discover only in production.Getting Started
Ready to build your first OpenChat bot? Follow our quickstart guide to get up and running in minutes:Quickstart Guide
Build and deploy your first OpenChat bot in under 10 minutes
Next Steps
Installation
Set up your development environment with dfx and dependencies
Bot Architecture
Understand the SDK’s module structure and design patterns
TallyBot
Learn about the governance proposal tracking bot
API Reference
Explore the complete API documentation
Community and Support
- GitHub Repository: AleDema/OC-Sample-Bot
- OpenChat: Join the OpenChat platform at oc.app
- Internet Computer Forum: Get help from the IC community
- Motoko Documentation: Official Motoko docs