-
Notifications
You must be signed in to change notification settings - Fork 75
Add gRPC Streaming for Harness interface and integration #34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+948
−286
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
7b7d8bd
feat: Integrate Antigravity harness in Controller V2 with Registry-ce…
anj-s 4f3a4b2
Merge branch 'main' into u/anj/harness-interface-3
anj-s cf7b353
AX V2 Harness Redesign: Implement Antigravity WebSocket Streaming
anj-s e4a2e14
examples: Refactor antigravity agent.py to perform real-time token st…
anj-s 9767aa4
examples: Refactor agent.py to use low-level L2 Conversation and Loca…
anj-s 1a65a28
harness: Add full E2E ToolCall streaming and local execution support
anj-s 25f8f84
examples: Consolidate agent.py and weather_agent.py into a single ult…
anj-s 4c857c6
harness: Cleanly relocate Go E2E program to cmd/e2e/main.go
anj-s ef0342e
harness: Add explicit compile-time interface assertions in antigravit…
anj-s bccd63f
python: Add mandatory Google license headers to regenerated proto mod…
anj-s b950b89
harness: Re-architect always-on streaming harness to use standard gRP…
anj-s 27b2e4a
Merge branch 'main' into u/anj/harness-interface-3
anj-s b216469
docs: Add architectural note comments to agent.py and harness_server.py
anj-s e6e595e
Merge branch 'main' into u/anj/harness-interface-3
anj-s 300cb35
docs: Add E2E setup and running instructions header to cmd/e2e/main.go
anj-s c1e2b69
feat: Upgrade agent.py to support an interactive multi-turn console c…
anj-s 598976a
revert: Revert interactive multi-turn console chat loop to preserve s…
anj-s a0e96f5
revert: Revert comment above RegisterHarness to keep the TODO for reg…
anj-s 60830d7
refactor: remove obsolete local script path checks in E2E main
anj-s File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,74 @@ | ||
| #!/bin/bash | ||
| # Copyright 2026 Google LLC | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| set -e | ||
|
|
||
| # Check if GEMINI_API_KEY is set | ||
| if [ -z "$GEMINI_API_KEY" ]; then | ||
| echo "ERROR: GEMINI_API_KEY environment variable is not set." | ||
| echo "Please set it using: export GEMINI_API_KEY=\"your-key\"" | ||
| exit 1 | ||
| fi | ||
|
|
||
| PORT=50053 | ||
| ADDRESS="localhost:$PORT" | ||
| AGENT_FILE="examples/antigravity_agent/agent.py" | ||
|
|
||
| # 1. Start Python gRPC server in the background | ||
| echo "Starting Python gRPC Harness Server on port $PORT..." | ||
| PYTHONPATH=python:. .venv/bin/python -m python.antigravity.harness_server --agent_file "$AGENT_FILE" --port "$PORT" > /tmp/antigravity_harness.log 2>&1 & | ||
| SERVER_PID=$! | ||
|
|
||
| # Register trap to ensure server is killed on script exit | ||
| cleanup() { | ||
| echo "Cleaning up: killing Python server (PID: $SERVER_PID)..." | ||
| kill "$SERVER_PID" || true | ||
| wait "$SERVER_PID" 2>/dev/null || true | ||
| echo "Cleanup complete!" | ||
| } | ||
| trap cleanup EXIT | ||
|
|
||
| # 2. Wait for the Python server to be healthy | ||
| echo "Waiting for Python server to become healthy..." | ||
| MAX_ATTEMPTS=30 | ||
| ATTEMPT=1 | ||
| HEALTHY=false | ||
|
|
||
| while [ $ATTEMPT -le $MAX_ATTEMPTS ]; do | ||
| # We can check if the port is open using nc (netcat) | ||
| if nc -z localhost "$PORT"; then | ||
| HEALTHY=true | ||
| break | ||
| fi | ||
| sleep 0.2 | ||
| ATTEMPT=$((ATTEMPT + 1)) | ||
| done | ||
|
|
||
| if [ "$HEALTHY" = false ]; then | ||
| echo "ERROR: Python server failed to start within 6 seconds." | ||
| echo "Server logs (/tmp/antigravity_harness.log):" | ||
| cat /tmp/antigravity_harness.log | ||
| exit 1 | ||
| fi | ||
| echo "Python server is active!" | ||
|
|
||
| # 3. Build and run the Go E2E V2 demonstration | ||
| echo "Building e2e..." | ||
| /opt/homebrew/bin/go build -o bin/e2e ./cmd/e2e | ||
|
|
||
| echo "Executing E2E Demo with Antigravity gRPC Harness..." | ||
| bin/e2e | ||
|
|
||
| echo "Success!" |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feel free to use a more structured format like JSONL.