Kesoku âĄī¸
Welcome to the official documentation for Kesoku (įģæ / Kessoku).
Kesoku is a minimal, readable, and highly modular autonomous AI agent framework. Designed around a decoupled gateway architecture with a pure pub/sub broker pattern, Kesoku enables robust, asynchronous communication between multiple chat frontends (such as Discord and Google Chat) and an autonomous reasoning loop featuring concurrency, thought interruption, and tool execution.
đ Core Features
- Decoupled Gateway Broker: Adapters (Discord, Google Chat, WeChat) and backend agents are decoupled, communicating purely via state-driven message queues.
- Asynchronous Concurrency: Dispatcher spawns a dedicated task loop (
SessionWorker) for each session to prevent multi-user collisions. - Anti-Stall & Interruption: Agent workers support thought interruption when a new user prompt is received mid-turn, without killing active safe tools.
- Structured TOML Config: Manage models, database settings, and credentials centrally in
config.toml. - Extensible Skills & Decorators: Discover and apply domain-specific instruction manuals (
SKILL.md) dynamically. - OS Daemon Integration: Register and manage the agent easily as a
systemdorlaunchdservice.
đēī¸ Documentation Roadmap
To get started, choose one of the guides below:
đĨ User Guides
- Installation: Set up the Python environment using
uv. - Configuration: Learn about the keys and schemas in
config.toml. - Platforms: Connect the agent to Discord, Google Chat, or WeChat.
- Service Management: Set up Kesoku to run permanently in the background.
đģ Developer Guides
- Architecture & Design: Deep dive into the Broker gateway, workers, and concurrency models.
- Agent Loop Cycle: Step-by-step walkthrough of how prompt events flow through the system.
- Custom Skills: Teach the agent new capabilities by creating your own skill bundles.