Skip to main content

chatpanel

A typed client for the local ChatPanel gateway. Zero dependencies; Python 3.11+; streaming; pairing.

pip install chatpanel
from chatpanel import ChatPanel

cp = ChatPanel.from_environment()      # token from ~/.chatpanel/gateway-token

# Ask a model — through the gateway, so names/emails/numbers are redacted on the way out
for text in cp.chat.text({"model": "claude", "messages": [{"role": "user", "content": "Summarise our rollback decision."}]}):
    print(text, end="", flush=True)

# Search the user's history (chats, notes, meetings, briefs)
hits = cp.history.smart_search({"question": "what did we decide about the rollback?", "queries": ["rollback decision"]})
record = cp.history.get({"id": hits["results"][0]["id"], "maxChars": 4000})

# Memory
recalled = cp.memory.recall({"text": "how does the user like answers written"})
cp.memory.remember({"text": "Prefers short answers with a code sample", "source": {"via": "my-app"}})  # needs the token

# What the model would receive
preview = cp.redaction.preview({"text": "Call Jordan at 555-0100"})   # "Call [[PERSON_1]] at [[PHONE_1]]"

# Follow a team run live
for frame in cp.teams.run_events(run_id, {"after": -1}):
    print(frame.data["type"])

Pairing from an application that cannot read the token file: cp.pair(code) exchanges a code from chatpanel-gateway pair and returns the token for you to keep (keychain or a 0600 file — never a log).

Every failure is a ChatPanelError with status, type and operation: GatewayUnreachableError, GatewayTooOldError (have, need), ForbiddenError, NotFoundError, InvalidRequestError.

ChatPanel(
    base_url="http://127.0.0.1:4320",   # loopback only, unless allow_remote=True + https
    token=lambda: keyring.get_password("chatpanel", "gateway"),
    timeout=20.0, retries=2, version_gate=True,
)

The surface (cp.history, cp.memory, …) is generated from the gateway's OpenAPI contract in the chatpanel-sdk repository; cp.request(op_id, ...) reaches any operation by id. The client is synchronous; wrap calls in asyncio.to_thread from async code.

Release files for chatpanel 0.1.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 chatpanel 0.1.0
File Size Uploaded
chatpanel-0.1.0.tar.gz 25.9 kB Details

Built distribution (wheel)

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

Total release size: 50.0 kB

Release files / chatpanel-0.1.0.tar.gz

Download URL chatpanel-0.1.0.tar.gz
Size 25.9 kB
Tags Source
SHA-256 checksum
How to use checksums
486ceff28c248be72ccc1220b7e0d4f5d78d80bb162af49ba4e523dbaa27289a
BLAKE2b-256 checksum
How to use checksums
2286e6df772825bbe7fbb3e1c6e6f0cd2150c8aa088c6c2e8b4467495f44b838
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 17, 2026.

Transparency log

Release files / chatpanel-0.1.0-py3-none-any.whl

Download URL chatpanel-0.1.0-py3-none-any.whl
Size 24.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9b5d280ac4e0574bd84fc53b0d8ac18b7edaa96607d8db02af95d1cc895f5970
BLAKE2b-256 checksum
How to use checksums
e842c253051fd6d11040bb1a902725811689b8c5573160e20bfb15456781f0ab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 17, 2026.

Transparency log

Release history Release notifications | RSS feed

0.13.0

2 release files

0.12.0

2 release files

0.11.0

2 release files

0.10.0

2 release files

0.8.1

2 release files

0.7.0

2 release files

0.6.0

2 release files

This release

0.1.0 This release

2 release files

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