turborg
A Python framework for chat-network agents — an IRC bouncer + browser UI + bot orchestrator in one process. Optional LLM hookup for AI features.
from turborg.core import Agent, OutboundEnvelope
from turborg.connectors.irc import IRCConnector, IRCSettings
agent = Agent()
agent.add_connector(IRCConnector(IRCSettings(hostname="irc.libera.chat", nick="myturborg")))
@agent.on_command("ping")
async def ping(envelope):
return OutboundEnvelope.reply(envelope, "pong")
agent.run()
That's a working IRC bot — no LLM required. Add a WebGateway and a Bouncer and you've also got a browser-side IRC client and a HexChat/irssi tunnel through the same process.
What turborg gives you
- A real IRC connector, not a toy — TLS, SASL PLAIN, NickServ identify, IRCv3
server-time, full WHOIS / NAMES / MODE handling, and tracking of every channel you're in. See docs/connectors/irc.md. - A built-in IRC bouncer. Local clients (HexChat, irssi, mIRC) connect to the bot's loopback port, authenticate with a password, and tunnel through the bot's upstream session. The bot stays in control while a human can lurk and chat from their own client.
- A WebSocket gateway + reference web UI. A vanilla-JS single-page client at
/with channel sidebar, member list, slash commands, autocomplete, IndexedDB-backed per-channel scrollback that survives reloads, browser notifications, and clear UX for kicks/bans. SaaS deployments can swap in their own polished UI; the protocol is documented and stable. - A normalized
Envelopeso the same handler that runs on IRC will also run on Discord / Telegram / Web when those connectors land. - Optional LLM, not the centerpiece. If you set an API key,
!askis wired in. If you don't, the rest of the bot doesn't care.
The design separates how the bot talks to a network (the connector) from how it thinks (any LLM, or none) from what it does (your handlers).
For the long-term vision — hive.xshellz.com, a shared-intelligence cloud any turborg instance can attach to — see docs/hive.md.
Status
v0.6.0 — alpha. The IRC connector, the bouncer, and the WebSocket gateway with reference UI are production-grade and well-tested (≥95% coverage gate enforced in CI). Other connectors are roadmap.
| Connector | Status | Install |
|---|---|---|
| IRC | Stable | pip install turborg |
| Web | Stable | pip install turborg[web] |
| Discord | Roadmap | pip install turborg[discord] (TBD) |
| Telegram | Roadmap | pip install turborg[telegram] (TBD) |
| Roadmap | pip install turborg[whatsapp] (TBD) |
LLM providers are optional. turborg runs perfectly fine as a pure command-driven bot without any LLM. When you do want one, both Anthropic (default, with prompt caching) and OpenAI ship as extras — see docs/llm-providers.md.
Install
pip install turborg # or: uv add turborg
pip install turborg[web] # if you want the WebSocket gateway / reference UI
Configure via environment variables (everything is TURBORG_*-prefixed) or a .env file. The most common minimum:
TURBORG_IRC_HOSTNAME=irc.libera.chat
TURBORG_IRC_NICK=myturborg
TURBORG_IRC_CHANNELS='["#turborg-test"]'
See docs/configuration.md for the full list — including SASL, NickServ identify, the bouncer, the web gateway, idle-shutdown, rate limits, logging.
Quickstart
The full 5-minute tutorial is at docs/quickstart.md. The 30-second version:
pip install turborg
export TURBORG_IRC_HOSTNAME=irc.libera.chat
export TURBORG_IRC_NICK=myturborg
export TURBORG_IRC_CHANNELS='["#turborg-test"]'
turborg run
You're online. To enable the AI command, also set TURBORG_ANTHROPIC_API_KEY (or use the OpenAI extra). To attach HexChat through the built-in bouncer, set TURBORG_IRC_BOUNCER_PASSWORD. To open the reference web UI at http://127.0.0.1:8765/, set TURBORG_WEB_PASSWORD. Each is independent — pick what you need.
Run with Docker
cp .env.example .env # fill in TURBORG_IRC_* (and optionally LLM / web / bouncer)
docker compose up
Or without compose:
docker run --env-file .env turborg/turborg:latest
Mount your own bot script with -v "$PWD/mybot.py:/app/mybot.py". The image is multi-stage, ~150 MB, and runs as a non-root user.
Documentation
- Quickstart — get a bot online in 5 minutes
- Architecture — the agent / connector / LLM / Envelope model
- IRC connector — bouncer, SASL, web gateway, channel state, and every IRC-specific design decision
- Configuration — every environment variable, every default
- LLM providers (optional) — Anthropic (default), OpenAI, custom
- Writing a connector — add Discord, Telegram, your own
- Hive — the future shared-intelligence cloud
Examples
examples/minimal_irc_bot.py— the smallest possible bot (!ping→pong), no LLMexamples/claude_powered_irc.py—!ask <question>proxies to Claude
Project layout
turborg/
├── src/turborg/
│ ├── core/ Agent, envelope, event bus, command registry
│ ├── connectors/ Connector ABC + per-protocol implementations
│ │ └── irc/ IRC connector + bouncer + protocol parser
│ ├── web/ WebSocket gateway + reference HTML/JS UI
│ ├── llm/ LLM provider ABC + Anthropic / OpenAI adapters
│ ├── hive/ Hive client extension hook (noop default)
│ ├── config/ pydantic-settings config
│ └── cli.py turborg CLI entry point
├── tests/ unit + integration suites (≥95% coverage gate)
├── examples/ runnable example bots
└── docs/ full documentation
Testing
uv sync --extra dev
uv run pytest # tests + coverage gate
uv run ruff check . && uv run ruff format --check .
uv run mypy src/turborg # strict mode
CI runs the same four gates and enforces ≥95% branch coverage.
Contributing
Contributions are welcome. See CONTRIBUTING.md for the dev setup, branching strategy, and PR rules. By submitting a contribution you agree to the Contributor License Agreement — the cla-assistant bot will guide you on first PR.
License
Apache License 2.0 — see TRADEMARKS.md for the trademark policy on the names "turborg" and "xshellz".
Security
Found a vulnerability? Please do not open a public issue. See SECURITY.md for the responsible-disclosure process.
Style
- Conventional Commits for PR titles (
feat:,fix:,docs:,refactor:,chore:) - Squash-merge to
main; linear history - 100-char line limit, ruff-formatted, mypy-strict
- pytest with branch coverage; fail under 95%
Part of the xshellz ecosystem. The future hosted hive lives at hive.xshellz.com.
Metadata
Release files for turborg 0.8.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 | |
|---|---|---|---|---|
| turborg-0.8.0.tar.gz | 86.4 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| turborg-0.8.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 189.2 kB
Release files / turborg-0.8.0.tar.gz
| Download URL | turborg-0.8.0.tar.gz |
|---|---|
| Size | 86.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7c3814f2cc6bba98c7b563f8e5fbb1c73d9cf292d1111f02e31da22df60cebc2
|
|
BLAKE2b-256 checksum How to use checksums |
c748b7b2833c6b6bb0fe66b2888f733eaff89c0327a8093b78a54d52fee2cb39
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 May 11, 2026.
Transparency logRelease files / turborg-0.8.0-py3-none-any.whl
| Download URL | turborg-0.8.0-py3-none-any.whl |
|---|---|
| Size | 102.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8966e3d4fbe69d25d81b46302d841b6ab003efd4a04c04ab0fcef22d72aef751
|
|
BLAKE2b-256 checksum How to use checksums |
f118dc49cc576c358677129bc1fd7b2c6ae48d67b350bff8516d09a275a31099
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 May 11, 2026.
Transparency logSecurity for turborg 0.8.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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for turborg-0.8.0.tar.gz
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 May 11, 2026.
Transparency logA 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.