Nonebot2 is an asynchronous Python framework for building event-driven chatbots across multiple messaging platforms. It centers on a non-blocking event bus and a driver-based adapter system that unifies different messaging protocols into a single consistent interface.
The framework utilizes a modular plugin architecture, allowing for the discovery and loading of third-party extensions to add new event handlers and system capabilities. It distinguishes itself with a type-annotation based dependency injection system that automatically resolves and provides required service objects to handlers at runtime.
The system includes a rule-based routing engine to filter events and a session-aware context model to maintain state across multi-turn interactions. Performance is managed by offloading blocking synchronous functions to a separate thread pool to prevent stalling the main asynchronous loop.
Project initialization is supported through automated scaffolding tools that generate standardized directory structures and IDE configurations.