pyagy
Antigravity CLI (agy 1.5.14) wire-compatible CLI harness built on top of pycodex and responses_server.
Quick Start
Start from config_examples/pyagy.config.toml and save it as ~/.codex/pyagy.config.toml (with GEMINI_API_KEY set in the environment or ~/.codex/.env):
model = "gemini-4-carbon-high"
model_provider = "gemini"
compat_api = "gemini"
harness = "pyagy"
model_reasoning_effort = "high"
[model_providers.gemini]
base_url = "https://api.example.invalid/v1beta"
env_key = "GEMINI_API_KEY"
Run from the CLI against any profile with compat_api = "gemini":
env -u VIRTUAL_ENV PYTHONPATH=.:packages/pyagy \
uv run python -m pyagy --profile pyagy -p "Hello"
Compaction & Multi-Agent Messaging
- Context Compaction & Tool Output Truncation (
agy 1.5.14wire parity):- Pre-invocation auto-compaction triggers when estimated context tokens reach the model's threshold (
512000for Gemini 4 Neon/Carbon/Argon,256000for Gemini 4 Hydrogen / 3.8 / 3.7 / 3.6 Flash / 3.1 Pro, orAGY_CLI_AUTO_COMPACT_OVERRIDEinteger /1..100%), with automatic overflow fallback onContextLengthExceeded. - Sync and background
run_commandoutputs (as well as other non-read_fileplain-text tool outputs exceeding10,240UTF-8 bytes) apply exact middle truncation and persist full output under.system_generated/steps/<step_index>/output.txt. - Manual
/compactand/compact <follow-up>emit the on-demand compaction prompt (maxOutputTokens32768/16384), replace conversation history with<CONTEXT_SUMMARY>, and persistCHECKPOINTtranscript steps across--continue/--conversation.
- Pre-invocation auto-compaction triggers when estimated context tokens reach the model's threshold (
- Subagent -> Root Messaging:
- Subagents spawned via
invoke_subagentreceive the caller'sconversation_idand can proactively send progress or questions back to root (or any live peer) viasend_message(Recipient=<root_id>, Message=...), in addition to automatic idle reporting.
- Subagents spawned via
Web Workspace (pycodex-ws) Profile Integration
Add harness = "pyagy" (default is harness = "pycodex") to any Gemini profile (compat_api = "gemini", such as ~/.codex/gemini-pool.config.toml) to switch pycodex-ws Web sessions for that profile to the pyagy backend:
- Optional Context Alignment: When created from
pycodex-ws, optionalContextConfiginputs (extra_contextual_user_messagessuch as Canvas board instructions whenenable_board=Trueand<external_call_context>,include_environment_context,developer_instructions,user_instructions,base_instructions_override, andcodex_home/skillswheninclude_skills_instructions=True) are injected dynamically without altering pure CLI wire parity. - Disabled
ask_questionRuntime:ask_questionretains its official declaration intoolsfor 100% wire parity, and immediately returnsEncountered error in tool execution: ask_question is disabledwhen called (without prompting). - Web UI Features: Supports
/compact,/model,/effort,/cd, live subagent tree (/api/sessions/<id>/agents), background task & subagent tracking (idle: sleepingstatus and/api/sessions/<id>/background-work), rollout tab persistence, and in-place Reload PyCodex. - An idle session shows
idle: sleepingwhile a background command or schedule can wake it, including daemon jobs. Print mode can exit with daemons still pending. - Pending one-shot timers and cron jobs store their next deadline, prompt and progress under the conversation’s
.system_generated/tasks/. Web rollout restore,--continueand--conversationrearm them. An overdue timer fires on resume. A cron delivers one overdue notification, then continues on its calendar with its remaining iteration budget. Timers created by older versions with only a task log need to be scheduled again. Shell processes end when the session closes. - The workspace enables
preview_reasoningfor pyagy Web views and Feishu cards. Root and subagent previews show the full current reasoning text or summary, including paragraph breaks. The next assistant delta replaces it with the accumulated reply text. Recorded items retain their original roles for Gemini replay.
Verification
See ALIGNMENT.md for the detailed alignment status (unaligned/placeholder items vs verified wire-compatible contracts) against official agy 1.5.14.
env -u VIRTUAL_ENV PYTHONPATH=.:packages/pyagy \
uv run --dev pytest packages/pyagy/tests
Metadata
Release files for pyagy 0.7.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyagy-0.7.2.tar.gz | 96.2 kB | With provenance | Details for pyagy-0.7.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyagy-0.7.2-py3-none-any.whl | Python 3 | none | any | Details for pyagy-0.7.2-py3-none-any.whl |
Total release size: 188.8 kB
Release files / pyagy-0.7.2.tar.gz
| Download URL | pyagy-0.7.2.tar.gz |
|---|---|
| Size | 96.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
49cef7d21ed78d8ea5f0416874e9ad86ec2348fdf3faec0e60fbd16889647dab
|
|
BLAKE2b-256 checksum How to use checksums |
3fb2e8f331917d5a575d78de6af7f5683e66e8f850304dcc668b67ea3ac4b89a
|
| 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 Nov 23, 2026.
Transparency logRelease files / pyagy-0.7.2-py3-none-any.whl
| Download URL | pyagy-0.7.2-py3-none-any.whl |
|---|---|
| Size | 92.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3f254c3c7477be64ba6d4553010b9233f718f522fea2b2619eed99a64037e929
|
|
BLAKE2b-256 checksum How to use checksums |
1b2080dba5e220010cb91550333c80c6f3126ea6edab8a0983a54e7834f31e6b
|
| 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 Nov 23, 2026.
Transparency logSecurity for pyagy 0.7.2
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.
Attestation for pyagy-0.7.2.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 Nov 23, 2026.
Transparency logA 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.