Skip to main content

jchat

Single-file, single-process localhost signal and @tag notification bus for AI agents. Standard library only, SQLite WAL backed, zero runtime dependencies.

Install

Requires Python >= 3.11.

pip install jchat

Verify with the built-in self-test:

jchat doctor

Quick Start

Any command auto-starts the single localhost process (127.0.0.1:8765, guarded by fcntl.flock) on demand. No separate MCP server, ping server, or polling cron is used.

# Event-driven wait (marks agy online while waiting; wakes immediately on send or @agy tag)
jchat wait agy

# Send direct + @tag notifications (auto-starts the bus if not already running)
jchat send agy "@claude review ready" --sender codex --ref git:HEAD --kind verify

# Turn-boundary hook (silent exit 0 when empty; prints untrusted-wrapped data and acks when queued)
jchat hook --agent agy

# Inspect the single running process, online agents, and queue depth
jchat status

Harness Hooks

jchat install-hooks claude --agent claude
jchat install-hooks agy --agent agy

Python API

from jchat import LocalBus, wait_messages, wrap_untrusted

with LocalBus("/tmp/jchat.db", port=0) as bus:
    bus.store.send(sender="claude", recipient="agy", body="@agy check this", ref="git:HEAD")
    for msg in wait_messages("agy", url=bus.url, timeout=2.0):
        print(wrap_untrusted(msg))

Contract

  • Localhost only (127.0.0.1): wildcard binds are rejected; ensure_running uses flock so concurrent cold starts spawn exactly one daemon PID.
  • Inbox + @tag routing: send delivers once to the explicit recipient plus every unique @agent mention in body.
  • Event-driven wakeups (wait): per-agent threading.Condition wakes waiting agents immediately when messages land; connected waiters appear in online_agents.
  • 1,000-char pointer envelope & delete-on-read: body <= 1000 chars, ref <= 512 chars without embedded secrets; ack hard-deletes rows and leaves only a 1 h in-memory receipt (queued / delivered / read / failed).

Metadata

Release files for jchat 0.2.1

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

Source distribution (sdist)

Source distribution for jchat 0.2.1
File Size Uploaded Provenance Actions
jchat-0.2.1.tar.gz 16.5 kB With provenance Details for jchat-0.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for jchat 0.2.1
File Interpreter ABI Platform Actions
jchat-0.2.1-py3-none-any.whl Python 3 none any Details for jchat-0.2.1-py3-none-any.whl

Total release size: 30.5 kB

Release files / jchat-0.2.1.tar.gz

Download URL jchat-0.2.1.tar.gz
Size 16.5 kB
Tags Source
SHA-256 checksum
How to use checksums
53a62cdffb905e67296a6032680072454f633ad49be89e32269996bc7a02375f
BLAKE2b-256 checksum
How to use checksums
2e00fb36e53ecf52033a36de5372950a81c453872b11564a2d4cad4de422fe69
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Dec 1, 2026.

Transparency log

Release files / jchat-0.2.1-py3-none-any.whl

Download URL jchat-0.2.1-py3-none-any.whl
Size 14.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3db656d442ec271289439d781a092c728d142ff27feedc209e81c0dce2ffd233
BLAKE2b-256 checksum
How to use checksums
aff93354f09b32a2e2dd55d7e9ab11e271ab16bcc7cc419101570a8ac7648297
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Dec 1, 2026.

Transparency log

Security for jchat 0.2.1

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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for jchat-0.2.1.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 Dec 1, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files Full provenance

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