- cross-posted to:
- fediverse@lemmy.world
- activitypub
- activitypub@programming.dev
- cross-posted to:
- fediverse@lemmy.world
- activitypub
- activitypub@programming.dev
Hey everyone! I’m excited to introduce BotKit, a new framework specifically designed for creating standalone ActivityPub bots.
What makes BotKit different from typical Mastodon bot approaches is that it creates fully independent ActivityPub servers. This means your bots aren’t constrained by platform-specific limitations like character limits or attachment restrictions. Each bot is a complete ActivityPub server in itself.
The API is designed to be extremely straightforward. You can create a complete bot in a single TypeScript file, with intuitive event handlers for follows, mentions, replies, and more. Here’s a quick example:
const bot = createBot<void>({
username: "mybot",
name: "My Bot",
summary: text`A bot powered by BotKit.`,
kv: new MemoryKvStore(),
queue: new InProcessMessageQueue(),
});
bot.onMention = async (session, message) => {
await message.reply(text`Hi, ${message.actor}!`);
};
BotKit currently supports Deno, with plans to add Node.js and Bun support in future releases. It leverages all the federation capabilities of Fedify but abstracts away the complexity, letting you focus purely on your bot’s behavior.
The framework is still in early development, but we’d love to hear your thoughts and feedback. Feel free to try it out and let us know what kind of bots you build with it!
- Repository: https://github.com/dahlia/botkit
- Documentation: https://botkit.fedify.dev/