nanobot-rs is a standalone Rust workspace extracted from the Rust rewrite of nanobot.
It currently includes:
- A Cargo workspace with the core app, CLI, config, provider, session, tools, cron, heartbeat, and generic channel runtime crates
- A runnable CLI binary in
crates/cli - A generic channel abstraction in
crates/channelsthat host applications can wire to concrete transports - The existing WhatsApp bridge assets under
bridge/
.
├── Cargo.toml
├── crates/
│ ├── app
│ ├── bus
│ ├── channels
│ ├── cli
│ ├── config
│ ├── core
│ ├── cron
│ ├── heartbeat
│ ├── provider
│ ├── session
│ └── tools
└── bridge/
- Rust stable toolchain
- Cargo
curlavailable inPATHfor the current provider/channel HTTP helpers- Node.js only if you need the optional
bridge/assets
cargo buildcargo testInitialize a local config:
cargo run -p nanobot-cli -- onboardShow status:
cargo run -p nanobot-cli -- statusSend a one-off message:
cargo run -p nanobot-cli -- agent -m "hello"Start the service loop:
cargo run -p nanobot-cli -- serve- This repository is intentionally Rust-only. The original Python package, Python tests, and packaging files were not carried over.
- The current implementation is the extracted Rust rewrite as it exists today, not a full feature-parity port of the original nanobot project.
- Concrete inbound and outbound channels are no longer bundled in this workspace. Integrators are expected to provide channel implementations against the shared runtime contract.
- A built-in Telegram Bot channel is available via long polling for private text chats.
Configure a Telegram Bot channel in .nanobot-rs/config.json:
{
"channels": [
{
"kind": "telegram",
"enabled": true,
"allowFrom": ["123456789"],
"settings": {
"botToken": "123456:telegram-bot-token",
"apiBase": "https://api.telegram.org",
"pollTimeoutSeconds": 20,
"dropPendingUpdatesOnStart": true
}
}
]
}Current scope:
- Long polling only
- Private chats only
- Text message receive/send only
allowFrommust contain Telegram numericuser_idvalues