Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

googlechatai-0.1.0b1.tar.gz (208.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

googlechatai-0.1.0b1-py3-none-any.whl (173.4 kB view details)

Uploaded Python 3

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

Hashes for googlechatai-0.1.0b1.tar.gz
Algorithm Hash digest
SHA256 7f20a1d58aa7369be3a9fb5abca5359f0a3c4433c129de976508d3f1086a12cf
MD5 dccb576fd5f93c8c7603bd49985ab974
BLAKE2b-256 731f0b8b6e7459404bcaec2174296849e243b47ff4c5a7a4fbccd15370328454

See more details on using hashes here.

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

Hashes for googlechatai-0.1.0b1-py3-none-any.whl
Algorithm Hash digest
SHA256 894cd896331129af52220cb7d28de6ef21819fb43e4fe9b51b1574a6420b5eed
MD5 377370f7c6fcfe5af1e7b1d1296c6989
BLAKE2b-256 bb90882c478ed2efa93ab7c0b81b4ed748048c5e4a7d9211da63a14fec02093c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page