Agent Executor (AX) is Google's open agentic orchestration runtime
Go
feat: Support preinstalled skills in Antigravity harness (#173)
anj-s9949a45cba5d
diff --git a/cmd/ax/Dockerfile b/cmd/ax/Dockerfileindex e842ae4..0cb8b45 100644--- a/cmd/ax/Dockerfile+++ b/cmd/ax/Dockerfile@@ -47,6 +47,8 @@ RUN pip install --no-cache-dir -r /tmp/requirements.txt# binary built in stage 1.COPY python/ /app/pythonCOPY examples/antigravity_agent/ /app/examples/antigravity_agent+COPY examples/skills/ /app/skills/+ENV SKILLS_DIR=/app/skillsCOPY --from=build /out/ax /ax# `from python.proto import ...` needs /app on the path; the generated stubs dodiff --git a/python/antigravity/harness_server.py b/python/antigravity/harness_server.pyindex baff180..9e358a8 100644--- a/python/antigravity/harness_server.py+++ b/python/antigravity/harness_server.py@@ -355,6 +355,17 @@ def resolve_localhost():print(f"WARNING: could not ensure localhost in /etc/hosts: {e}", file=sys.stderr)+def enhance_config_from_env(config) -> None:+ skills_dir = os.environ.get("SKILLS_DIR")+ if skills_dir and os.path.isdir(skills_dir):+ print(f"Adding preinstalled skills directory to agent config: {skills_dir}")+ if not hasattr(config, "skills_paths") or config.skills_paths is None:+ config.skills_paths = []+ config.skills_paths = list(config.skills_paths)+ if skills_dir not in config.skills_paths:+ config.skills_paths.append(skills_dir)++def main():parser = argparse.ArgumentParser(description="Antigravity gRPC Harness Server")parser.add_argument("--agent_file", default="examples/antigravity_agent/agent.py", help="Path to the agent config file")@@ -368,6 +379,7 @@ def main():global loaded_configtry:loaded_config = load_agent_config(args.agent_file)+ enhance_config_from_env(loaded_config)except Exception as e:print(f"ERROR: Failed to load agent config: {e}", file=sys.stderr)sys.exit(1)diff --git a/python/antigravity/harness_server_test.py b/python/antigravity/harness_server_test.pyindex 29afcf0..639244c 100644--- a/python/antigravity/harness_server_test.py+++ b/python/antigravity/harness_server_test.py@@ -323,6 +323,23 @@ def test_grpc_connect_programmatic_credentials(monkeypatch):asyncio.run(_run())+def test_enhance_config_from_env(monkeypatch, tmp_path):+ from python.antigravity.harness_server import enhance_config_from_env+ from google.antigravity import LocalAgentConfig+ import os++ # Create a mock skills dir+ skills_dir = tmp_path / "skills"+ skills_dir.mkdir()++ cfg = LocalAgentConfig(system_instructions="test")++ # Test: Using SKILLS_DIR env var+ monkeypatch.setenv("SKILLS_DIR", str(skills_dir))+ enhance_config_from_env(cfg)+ assert str(skills_dir) in cfg.skills_paths++def test_grpc_connect_buffering(mock_config, monkeypatch):async def _run():server = grpc.aio.server()