Python package for the Google Chat AI SDK.
Project description
googlechatai
googlechatai is a polyglot Google Chat AI SDK for building serious Google
Chat apps, AI assistants, and workflow extensions without living at the raw
REST-object layer. This is the Python package (standard library only, Python
3.10+); a matching Node.js package is published as googlechatai on npm,
kept behaviorally aligned through shared fixtures and cross-language
conformance tests.
Highlights:
- Deep normalization of Chat events, messages, actions, cards, and attachments into stable, model-ready structures.
- A webhook router with slash command, mention, reaction, membership, and dialog handlers, plus dedupe, deadline, and inbound request verification (Chat app bearer tokens and Pub/Sub push OIDC, verified with a stdlib-only RS256 implementation).
- Dry-run call plans for sends, replies, threads, reactions, and pins, and an executor that turns plans into real API calls with retries, idempotency, and explicit live-mode safety gates.
- Live streaming of model output through message edits via
stream_chat_reply/astream_chat_reply, driven by a deterministic scheduler with patch cadence, size-limit truncate/split, cancellation, and resume. - AI-first helpers: conversation context builders, attachment pipelines,
placeholder responses, async response handoff, token stores, and queue
adapters. Optional FastAPI/ASGI adapters install with
pip install "googlechatai[fastapi]".
Status: 0.1.0-beta.1 public-beta release candidate (published Python
metadata normalizes this to 0.1.0b1). APIs may change before the stable
0.1.0 release.
Create a first app
The matching Node distribution carries the dependency-free CLI and generates Python projects:
npx googlechatai@next init my-python-chat-app --language python --install
cd my-python-chat-app
.venv/bin/python -m unittest
npx googlechatai@next replay fixtures/mention.json \
--language python \
--python .venv/bin/python \
--handler app.py \
--expect-text "You said"
npx googlechatai@next doctor
The generated app includes a minimal mention handler, verified and body-bounded callback server, sanitized fixture, test, environment template, and guarded smoke metadata example. Offline tests need no Google credentials.
The CLI also provides event inspection, dry-run Chat request planning, card
linting, and configuration diagnosis. It is offline or read-only by default;
the only write-capable path is an explicitly guarded smoke --live run in a
dedicated test space.
Google Cloud project creation, Chat app registration, deployment, OAuth/admin approval, and installation remain operator steps.
googlechatai is an independent project and is not affiliated with or endorsed by Google LLC. Google Chat is a trademark of Google LLC.
Licensed under the Apache License 2.0. See LICENSE and NOTICE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file googlechatai-0.1.0b1.tar.gz.
File metadata
- Download URL: googlechatai-0.1.0b1.tar.gz
- Upload date:
- Size: 208.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7f20a1d58aa7369be3a9fb5abca5359f0a3c4433c129de976508d3f1086a12cf
|
|
| MD5 |
dccb576fd5f93c8c7603bd49985ab974
|
|
| BLAKE2b-256 |
731f0b8b6e7459404bcaec2174296849e243b47ff4c5a7a4fbccd15370328454
|
File details
Details for the file googlechatai-0.1.0b1-py3-none-any.whl.
File metadata
- Download URL: googlechatai-0.1.0b1-py3-none-any.whl
- Upload date:
- Size: 173.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
894cd896331129af52220cb7d28de6ef21819fb43e4fe9b51b1574a6420b5eed
|
|
| MD5 |
377370f7c6fcfe5af1e7b1d1296c6989
|
|
| BLAKE2b-256 |
bb90882c478ed2efa93ab7c0b81b4ed748048c5e4a7d9211da63a14fec02093c
|