Skip to main content

grok-loop-kit (Python)

Automatic Grok 4.5 context compaction for xAI Responses API agent loops.

from grok_loop_kit import GrokLoopClient

client = GrokLoopClient(api_key, compact_every=8, compact_at_tokens=8000, model="grok-4.5")
res = client.send_message("hello")
print(res["_grokLoopKit"].totalCompactions)

Zero runtime dependencies (stdlib urllib). See the repository root README for the full API and the Node/LangGraph packages.

Release files for grok-loop-kit 1.0.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 grok-loop-kit 1.0.0
File Size Uploaded
grok_loop_kit-1.0.0.tar.gz 7.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for grok-loop-kit 1.0.0
File Interpreter ABI Platform
grok_loop_kit-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 15.7 kB

Release files / grok_loop_kit-1.0.0.tar.gz

Download URL grok_loop_kit-1.0.0.tar.gz
Size 7.6 kB
Tags Source
SHA-256 checksum
How to use checksums
1dfe7983c1692e02297fccd6b5c347f52f52a85660c894e759840fc29c3c166c
BLAKE2b-256 checksum
How to use checksums
37c8e2246ff0c556f28e72010eb65467ef1bfc4cb2b3892358d28169dc1142b9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.9

Release files / grok_loop_kit-1.0.0-py3-none-any.whl

Download URL grok_loop_kit-1.0.0-py3-none-any.whl
Size 8.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
326dad233eb0b8b0b15ae5fd08d5a18557e3670aebe341ba87fba91db718eb33
BLAKE2b-256 checksum
How to use checksums
7cb8fa5402dc79aec3b5721b3728e26be81dadf13907d5912fc23d83e5229c32
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.9

Release history Release notifications | RSS feed

This release

1.0.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