BotLane
Run a Grok-powered bot from Telegram.
Open-source bridge that connects a Grok (xAI) bot to Telegram and lets you drive it straight from chat — one-to-one, in groups, or with scheduled tasks. No server to babysit, no webhooks to configure.
Why it exists
People who run agent bots on X want to reach them from Telegram too — the same bot, the same memory, no extra setup. BotLane is that bridge:
- Dependency-free — the Python SDK and local bridge use only the standard
library. No pip installs beyond
talocode-botlane. - 1:1 and group mode — private chats work out of the box; in groups the
bot responds only to
@mention,/commands, and replies. - Session memory — per-chat conversation history persisted to disk.
- Secure by default — an allowlist gates who can talk to the bot so your credits don't get drained by strangers.
- Hosted path available — use the open tool locally, or run it on Talocode
Cloud under
/v1/botlane/*for managed power.
Part of Talocode: open tools people trust, hosted power behind them.
Install
pip install talocode-botlane
Node version (CLI, SDK, MCP server, HTTP API):
npm install -g @talocode/botlane
Quickstart
Talk to a hosted BotLane instance
from botlane import BotLaneClient
client = BotLaneClient() # uses TALOCODE_API_KEY + TALOCODE_BASE_URL
print(client.health())
client.send(chat_id=123456789, text="Hello from the bot")
reply = client.chat("Summarize the last 3 messages")
print(reply)
Run a local bridge from Python
from botlane import BotLaneBridge
bridge = BotLaneBridge() # uses TELEGRAM_BOT_TOKEN + XAI_API_KEY
bridge.run() # long-polls Telegram and replies with Grok
Auth / env
The Python SDK reads the same environment the hosted path uses:
| Env var | Default | Purpose |
|---|---|---|
TALOCODE_API_KEY |
— | API key for hosted/self-hosted BotLane API. |
TALOCODE_BASE_URL |
https://api.talocode.site |
Hosted API base URL. |
TELEGRAM_BOT_TOKEN |
— | Required for the local bridge. Bot token from @BotFather. |
XAI_API_KEY |
— | Required for the local bridge. xAI (Grok) key. |
BOTLANE_MODEL |
grok-3-mini |
Model used for completions. |
API surface
Hosted routes (Talocode Cloud)
| Method | Path | Description |
|---|---|---|
| GET | /v1/botlane/health |
Liveness + config summary. |
| POST | /v1/botlane/chat |
One-off Grok completion. |
| POST | /v1/botlane/send |
Send a message from the bot. |
| GET | /v1/botlane/history |
Per-chat conversation history. |
| POST | /v1/botlane/reset |
Clear a chat's history. |
Auth:
Authorization: Bearer $TALOCODE_API_KEY
# or
X-Api-Key: $TALOCODE_API_KEY
SDK methods
| Method | Description |
|---|---|
BotLaneClient.health() |
Check instance health. |
BotLaneClient.chat(prompt, ...) |
One-off Grok completion. |
BotLaneClient.send(chat_id, text) |
Send a message from the bot. |
BotLaneClient.history(chat_id) |
Read per-chat history. |
BotLaneClient.reset(chat_id) |
Clear a chat's history. |
BotLaneBridge.run() |
Start the local long-polling bridge. |
CLI
botlane check # validate config, print bot identity
botlane run --model grok-3-mini # start the local bridge
botlane send 123456789 "Hello" # one-off message from the bot
botlane chat "What is 2+2?" # one-off completion via hosted API
botlane health # check a hosted instance
MCP server
The npm package ships a dependency-free Model Context Protocol
server (botlane-mcp) so agent runtimes (Cursor, Claude Code, OpenCode,
Codra) can drive the bot directly. Tools: botlane_check, botlane_send,
botlane_history, botlane_reset, botlane_chat.
Develop
git clone https://github.com/talocode/botlane
cd botlane/python
pip install -e .
python -m botlane.cli check
Related packages
| Package | Install |
|---|---|
| BotLane (this package) | pip install talocode-botlane |
| Tera | pip install talocode-tera |
| Codra | pip install talocode-codra |
| SearchLane | pip install talocode-searchlane |
| StackLane | pip install talocode |
| ContextLane | pip install contextlane |
| ScreenLane | pip install talocode-screenlane |
| Tradia | pip install tradia |
| DevTool | pip install talocode-devtool |
| XProLane | pip install talocode-xprolane |
Talocode ecosystem
| Product | Repo | Notes |
|---|---|---|
| BotLane | talocode/botlane |
(this package) Telegram bridge for Grok bots |
| Tera | talocode/tera |
Hosted writing/coding capability API |
| Codra | talocode/codra |
Coding agent runtime |
| SearchLane | talocode/searchlane |
Agent web search & research |
| StackLane | talocode/stacklane |
Cloud control plane, keys, wallet |
| GateLane | talocode/gatelane |
Policy / gate tooling |
| ContextLane | talocode/contextlane |
Context infrastructure |
| ScreenLane | talocode/screenlane |
Screen/agent UI tooling |
| MemoryLane | talocode/memorylane |
Memory for agents |
| Tradia | talocode/tradia |
Trading tooling |
| DevTool | talocode/devtool |
Developer utilities |
| XProLane | talocode/xprolane |
X Pro setup & signal dashboard |
| XSearchLane | talocode/xsearchlane |
Realtime X search MCP/API |
| Agent Browser | talocode/agent-browser |
Browser automation API |
| InvoiceLane | talocode/invoicelane |
Invoicing |
| GeoLane | talocode/geolane |
Geo visibility |
| ClipLoop | talocode/cliploop |
Short-form video loop |
More: github.com/talocode · talocode.site · docs.talocode.site
Links
- GitHub: https://github.com/talocode/botlane
- npm: https://www.npmjs.com/package/@talocode/botlane
- PyPI: https://pypi.org/project/talocode-botlane
- Docs: https://docs.talocode.site
- API base:
https://api.talocode.site
License
MIT © Talocode
Metadata
Release files for talocode-botlane 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 | Provenance | Actions |
|---|---|---|---|---|
| talocode_botlane-0.1.0.tar.gz | 7.9 kB | Without provenance | Details for talocode_botlane-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| talocode_botlane-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for talocode_botlane-0.1.0-py3-none-any.whl |
Total release size: 16.6 kB
Release files / talocode_botlane-0.1.0.tar.gz
| Download URL | talocode_botlane-0.1.0.tar.gz |
|---|---|
| Size | 7.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
657b5dade6d221b23b16ef154259a0c6e50ef843b03749d86340bef12425a45c
|
|
BLAKE2b-256 checksum How to use checksums |
b673527921bae6cb02d4f9f564a890456f01a75ea3bcc18e1744c1c1e8b64522
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Release files / talocode_botlane-0.1.0-py3-none-any.whl
| Download URL | talocode_botlane-0.1.0-py3-none-any.whl |
|---|---|
| Size | 8.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a97fe045fa755aee34fc9c06b909071d615d89c7019e183a965139c40322978e
|
|
BLAKE2b-256 checksum How to use checksums |
da544d29cefe39d26072c82e39423604eead4c47a2f10701521f3f682237bb56
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Security for talocode-botlane 0.1.0
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.