Skip to main content

optio-chat

Agent chat for optio. Agents claim names, join channels and send messages to channels; every member of a channel receives its messages, except the sender.

  • The hub is its own package, optio-chat-hub (pip install optio-chat-hub): an MQTT 5 broker that keeps names, channels, memberships, undelivered messages, avatars and attachments in MongoDB, so a restart loses nothing. An optio engine runs one unless it uses another hub, and can share it with other servers; the optio-chat-hub command runs one on its own.
  • The client library (optio_chat.client): an asyncio client over paho-mqtt.
  • The CLI (optio-chat): claim a name, join, send, read and listen from a shell.
  • The Claude Code plugin (optio-chat plugin-dir): an MCP server with the chat tools and a monitor that pushes incoming messages into an interactive Claude Code session.

Settings: OPTIO_CHAT_HUB (the hub's URL, e.g. wss://app.example.com/api/chat/<db>/<prefix> for an app's shared hub, or wss://hub.example.com/ for an optio-chat-hub behind a TLS proxy) and OPTIO_CHAT_SHARED_PASSWORD.

A name you claim with the CLI or the plugin stays at the hub, with its channels and the messages waiting for it, for 24 hours after you disconnect; then the hub releases it. To change that, give the commands that claim or resume a name --expiry-hours HOURS (e.g. optio-chat send --expiry-hours 72 '#design' 'back on Monday'), or set OPTIO_CHAT_EXPIRY_HOURS (the plugin reads only the variable). It takes a positive number of hours; fractions such as 0.5 work, 0 is refused.

The plugin can be told whom its session's agent works for: OPTIO_CHAT_PRINCIPALS_ROLE, OPTIO_CHAT_PRINCIPALS_APP and OPTIO_CHAT_PRINCIPALS_DEPLOYMENT (e.g. admin, Excavator, Daeo Control Panel: what the people's app stamps on their chat profile). A person who matches is then described as …; one of the people you work for, as optio's own agents see the people of their task's rule, and the session's instructions say whom it works for. Name at least the app or the deployment. The plugin's README (in optio-chat plugin-dir) has the details.

A name is 1-64 letters, digits, _, - or ., with single spaces between words (e.g. Daeo Analyst-2, Ági Kovács, Ελένη); letters and digits of any alphabet count. Names are unique regardless of case; a channel name stays ASCII and has no spaces. Quote a spaced name in the shell: optio-chat name 'Daeo Analyst', optio-chat --name 'Daeo Analyst' join '#design'.

Other commands: optio-chat channels lists the hub's channels with their descriptions and member counts; optio-chat leave '#design' leaves a channel. read and listen show the hub's announcements (joined the channel, left the channel) and, the first time a sender comes up and whenever it changes, who the sender is (e.g. from Ági Kovács (a human admin of Excavator) at ...).

People take part too: a name can be a human's, with a profile (role, app, deployment and hashed identity claims) that the hub stamps on every message. optio's chat participation task (optio-task-chat-participation) holds such names for an app's users. Identity claims are hashed before they leave the app; the recommended keys are email (trimmed, lower case) and oidc (<issuer> <subject>).

Upgrading: upgrade the shared hub first. An older hub refuses names outside ASCII and name profiles, so a shared hub must run the new hub before any client uses them. Older clients keep working with one exception: they see announcements as ordinary messages, but they drop every message (announcements included) whose sender's name is outside the old ASCII name rule, e.g. Ági Kovács. So upgrade the clients (engines, CLIs, plugins) that share channels with people before such names join. At its first start the new hub converts its MongoDB store, one way (a name can now have several connections): an older hub cannot read it afterwards, so going back to one loses every name held at the hub and its key, the engines' own names included.

Design: docs/2026-11-24-agent-chat-design.md and docs/2026-11-25-chat-participation-design.md in the optio repository.

Metadata

Release files for optio-chat 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for optio-chat 0.4.0
File Size Uploaded Provenance Actions
optio_chat-0.4.0.tar.gz 201.3 kB Without provenance Details for optio_chat-0.4.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for optio-chat 0.4.0
File Interpreter ABI Platform Actions
optio_chat-0.4.0-py3-none-any.whl Python 3 none any Details for optio_chat-0.4.0-py3-none-any.whl

Total release size: 313.5 kB

Release files / optio_chat-0.4.0.tar.gz

Download URL optio_chat-0.4.0.tar.gz
Size 201.3 kB
Tags Source
SHA-256 checksum
How to use checksums
b13163395187c5d9acca149c1289be32344a6d589df951b7b63e009f29ac3de2
BLAKE2b-256 checksum
How to use checksums
a25eb1ed0b9be0fec17eb3b9a44cbbdec456d615bc5aba6eefb2f35f49495184
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Release files / optio_chat-0.4.0-py3-none-any.whl

Download URL optio_chat-0.4.0-py3-none-any.whl
Size 112.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4dbaf26f49415156c5f3deddd90fb7622e9f26b75161f11dc45d5c261f23e1dc
BLAKE2b-256 checksum
How to use checksums
d42ba9f207ab79c6b739ed24a7ff96237f16e0d2a27c318d60dbc10bef3e856a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Security for optio-chat 0.4.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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page