kajenn-bot-application
Document version: 0.3 · Last updated: 2026-10-08 · Status: 🔴 UNDER REVIEW
Run Telegram and WhatsApp bots as kajenn applications. Receive centrally, send from local services, and keep each bot's configuration and conversations separate.
Use it for developer notifications, review conversations, administrator-approved
access, announcements and scheduled follow-ups. Bot behavior lives in ordinary
RoutingClass methods; configuration uses class-owned grammars.
Read the documentation · Getting started · API reference
What it provides
| Capability | Telegram | WhatsApp Business |
|---|---|---|
| Receive events | Secret-checked webhook | Signed webhook and verification handshake |
| Send from a local service | Same bot token; known reachable chat | Same business credentials; template or known service window |
| Multiple bot instances | Independent BotFather tokens and configuration | Independent business numbers and configuration |
| Conversations | Multiple participants, correlated replies and buttons | Multiple participants, correlated replies and buttons |
| Optional admission | First/all administrator approval; edits settled requests | First/all approval; follow-up notices and optional templates |
| Outbound content | Text, files, media, typing and native polls | Text, files, media, buttons and approved templates |
| Background work | Queued announcements and persistent reminders | Queued announcements and persistent reminders |
| Delivery information | Send API result and task outcome | API acceptance plus webhook receipts |
BotBaseApplication owns shared registration, conversation and task behavior.
TelegramBotApplication and WhatsAppBotApplication preserve each provider's
capabilities and constraints. Persistence is delegated to one route per application;
encrypted filesystem providers are included in the examples.
Install
Python 3.11–3.14 is tested. kajenn>=0.3.0 is installed as a dependency.
Bot versions and releases are independent from the server.
Install the published package in a virtual environment:
python -m venv .venv
source .venv/bin/activate
python -m pip install kajenn-bot-application
To run the included examples or contribute, clone the repository and install it:
git clone https://github.com/kajenn-org/kajenn-bot-application.git
cd kajenn-bot-application
python -m pip install .
On Windows, activate the environment with .venv\Scripts\Activate.ps1.
The distribution is named kajenn-bot-application; Python imports use
kajenn_bot_application. No kajenn source checkout is needed.
from kajenn_bot_application import TelegramBotApplication, WhatsAppBotApplication
Run your first bot
The getting started guide
walks through credentials, persistent storage, the public webhook and the first
/hello reply. From the repository root, after configuring that environment:
kajenn serve examples/telegram_bot/config.py --port 8000
# Or run the WhatsApp example:
kajenn serve examples/whatsapp_bot/config.py --port 8000
Both examples provide /hello and /echo. Each has a local_config.py recipe
that sends directly without replacing the central webhook. Within an initialized
application, a local job can notify a user:
telegram = server.applications["telegram"]
await telegram.send_message("alpha", mario_chat_id, "You have a new PR")
The bot must already be registered, and Mario must have started a private chat with it. The local service needs the bot token, not only the chat ID. Replies go to the central webhook. WhatsApp notifications use approved templates outside the known customer service window.
Learn and deploy
| Task | Guide |
|---|---|
| Install, configure and get the first reply | Getting started |
| Understand classes, instances and application mounts | Architecture |
| Write commands and instance configuration | Writing a bot |
| Coordinate concurrent requests and approvals | Conversation recipes |
| Configure Telegram or WhatsApp features | Telegram · WhatsApp |
| Run, recover and diagnose a deployment | Operations |
| Replace filesystem storage with application persistence | Persistence |
| Move imports from the original kajenn branch | Migration |
Scope and delivery guarantees
This package uses official bot/business APIs. It does not provide personal-account sessions, group history imports, automatic application-user provisioning, or a public bot-management API. Admission does not grant kajenn router permissions.
The filesystem examples support one receiving process per registry. Webhook acknowledgement means work has been staged, not that a reply was delivered. Provider sends and persistence writes are separate operations; delivery is not exactly once. See the operations guide before replaying failed or uncertain work.
Contributing
python -m pip install -e ".[dev,docs]"
git config core.hooksPath hooks
pytest -q
ruff check src tests examples tools
python tools/check_boundary.py
sphinx-build -W -b html docs docs/_build/html
CI installs the built wheel, runs the integration suite on Python 3.11–3.14, checks the minimum kajenn version, uploads coverage to Codecov and builds the documentation with warnings treated as errors. Provider HTTP is mocked; routing, tasks and encrypted persistence use the real server services.
Changes go through pull requests to develop. See
development and releases for the package boundary and checks.
Apache-2.0 · Copyright Softwell S.r.l. · Based on genropy history and genro-modules.
Metadata
Release files for kajenn-bot-application 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| kajenn_bot_application-0.1.0.tar.gz | 88.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| kajenn_bot_application-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 133.9 kB
Release files / kajenn_bot_application-0.1.0.tar.gz
| Download URL | kajenn_bot_application-0.1.0.tar.gz |
|---|---|
| Size | 88.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e2dde437bd4bdf99dc4e8053af25dc81e2fa4ab8e122568238a42dd2766f4afb
|
|
BLAKE2b-256 checksum How to use checksums |
3275c0681e41993c9370a4c074a91ab06189e541e29a0cfa04dabda7ca5d990f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 8, 2026.
Transparency logRelease files / kajenn_bot_application-0.1.0-py3-none-any.whl
| Download URL | kajenn_bot_application-0.1.0-py3-none-any.whl |
|---|---|
| Size | 45.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9706bc2775ccb2ab540e30afb28972a7646c7e57d9cb643b65b1c73a82be55a8
|
|
BLAKE2b-256 checksum How to use checksums |
277e8e5a4b42437ab4af5fb79e1fdcd7590522c6567d4ccefe5fc9a0220789ca
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 8, 2026.
Transparency log