Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ deploy-inline-staging-execute: check-inline-deploy-ready ## MANUAL ONLY: Execute

smoke-bob-agent-engine-dev: ## Run dev smoke test against Bob's Agent Engine instance
@echo "$(BLUE)🚦 Running Bob Agent Engine dev smoke test...$(NC)"
@echo "$(YELLOW)ℹ️ Requires AGENT_ENGINE_BOB_DEV to be set after dev deployment$(NC)"
@echo "$(YELLOW)ℹ️ Requires AGENT_ENGINE_BOB_ID_DEV to be set after dev deployment$(NC)"
@$(PYTHON) scripts/run_agent_engine_dev_smoke.py
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

While the run_agent_engine_dev_smoke.py script defaults to agent bob, it's more explicit and robust to specify the agent directly in this make target. The smoke-bob-agent-engine-dev target is specifically for 'bob', and relying on the script's default creates a tight coupling. If the script's default ever changes, this target would silently start testing a different agent. Explicitly passing --agent bob makes the Makefile's intent clear and independent of the script's internal defaults.

	@$(PYTHON) scripts/run_agent_engine_dev_smoke.py --agent bob

Comment on lines +435 to +436
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

1. Docs use wrong env var 🐞 Bug ✓ Correctness

Docs/CHANGELOG still instruct setting BOB_AGENT_ENGINE_NAME_DEV (full resource name), but runtime
+ Makefile now require AGENT_ENGINE_BOB_ID_DEV (ID only). Users following docs will be “not
configured” or may paste a full resource name into an *_ID_* var and produce invalid resource paths.
Agent Prompt
### Issue description
Docs and CHANGELOG still instruct `BOB_AGENT_ENGINE_NAME_DEV` (full resource name) while the runtime/Makefile now requires `AGENT_ENGINE_BOB_ID_DEV` (ID only). This will cause users following docs to fail configuration.

### Issue Context
- Runtime reads `AGENT_ENGINE_{AGENT}_ID_{ENV}`.
- Some docs still describe the old env var and a full resource-name value.

### Fix Focus Areas
- Makefile[433-437]
- scripts/run_agent_engine_dev_smoke.py[16-26]
- CHANGELOG.md[629-639]
- 000-docs/000-DR-STND-inline-source-deployment-for-vertex-agent-engine.md[508-546]
- 000-docs/130-AA-REPT-phase-5-first-dev-deploy-and-smoke-test.md[83-91]
- agents/config/agent_engine.py[166-193]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

2. Docs cite wrong smoke script 🐞 Bug ⛯ Reliability

Multiple docs/CHANGELOG reference scripts/smoke_test_bob_agent_engine_dev.py, but the Makefile
target runs scripts/run_agent_engine_dev_smoke.py. This will break the documented smoke workflow
and create confusion about which script is canonical.
Agent Prompt
### Issue description
Docs/CHANGELOG point to `scripts/smoke_test_bob_agent_engine_dev.py` while the Makefile runs `scripts/run_agent_engine_dev_smoke.py`. The documented smoke workflow is inconsistent.

### Issue Context
Users will follow docs for smoke testing and expect the Makefile target to run the same script.

### Fix Focus Areas
- Makefile[433-437]
- CHANGELOG.md[629-639]
- 000-docs/000-DR-STND-inline-source-deployment-for-vertex-agent-engine.md[508-546]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

@echo ""

Expand Down
14 changes: 7 additions & 7 deletions agents/config/agent_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
- AGENT_ENGINE_FOREMAN_ID_DEV: Foreman's Engine ID in dev
- AGENT_ENGINE_BOB_ID_STAGING: Bob's Engine ID in staging
- AGENT_ENGINE_BOB_ID_PROD: Bob's Engine ID in prod
- (Additional agents: AGENT_ENGINE_{AGENT}_{ENV})
- (Additional agents: AGENT_ENGINE_{AGENT}_ID_{ENV})

Related Docs:
- 000-docs/6767-101-AT-ARCH-agent-engine-topology-and-envs.md
Expand Down Expand Up @@ -120,7 +120,7 @@ def get_agent_engine_id(
Get Agent Engine ID for a specific agent role and environment.

Checks environment variables in this order:
1. AGENT_ENGINE_{AGENT}_{ENV} (e.g., AGENT_ENGINE_BOB_DEV)
1. AGENT_ENGINE_{AGENT}_ID_{ENV} (e.g., AGENT_ENGINE_BOB_ID_DEV)
2. Falls back to hardcoded defaults for known agents

Args:
Expand All @@ -131,7 +131,7 @@ def get_agent_engine_id(
Engine ID or None if not configured

Examples:
>>> os.environ["AGENT_ENGINE_BOB_DEV"] = "12345"
>>> os.environ["AGENT_ENGINE_BOB_ID_DEV"] = "12345"
>>> get_agent_engine_id("bob", "dev")
"12345"

Expand All @@ -143,7 +143,7 @@ def get_agent_engine_id(

# Normalize agent role for env var (replace dashes with underscores, uppercase)
agent_var_name = agent_role.replace("-", "_").upper()
env_var_name = f"AGENT_ENGINE_{agent_var_name}_{env.upper()}"
env_var_name = f"AGENT_ENGINE_{agent_var_name}_ID_{env.upper()}"

engine_id = _get_env_var(env_var_name)
if engine_id:
Expand Down Expand Up @@ -237,7 +237,7 @@ def build_agent_config(
AgentEngineConfig if engine ID is configured, None otherwise

Examples:
>>> os.environ["AGENT_ENGINE_BOB_DEV"] = "12345"
>>> os.environ["AGENT_ENGINE_BOB_ID_DEV"] = "12345"
>>> config = build_agent_config("bob", "dev")
>>> print(config.get_full_resource_name())
"projects/my-project/locations/us-central1/reasoningEngines/12345"
Expand Down Expand Up @@ -401,7 +401,7 @@ def validate_config(env: Optional[Environment] = None) -> None:
if not configured_agents:
raise ValueError(
f"No agents configured for {env} environment. "
f"Set at least AGENT_ENGINE_BOB_{env.upper()} environment variable."
f"Set at least AGENT_ENGINE_BOB_ID_{env.upper()} environment variable."
)

print(f"✅ Agent Engine configuration valid for {env}")
Expand Down Expand Up @@ -448,7 +448,7 @@ def validate_config(env: Optional[Environment] = None) -> None:
print(f" No agents configured for {env} environment")
print()
print(" Set environment variables like:")
print(f" export AGENT_ENGINE_BOB_{env.upper()}=your-engine-id")
print(f" export AGENT_ENGINE_BOB_ID_{env.upper()}=your-engine-id")
else:
for role, config in agents.items():
print(f" {role}:")
Expand Down
4 changes: 2 additions & 2 deletions scripts/run_agent_engine_dev_smoke.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

Requirements:
- DEPLOYMENT_ENV=dev
- AGENT_ENGINE_BOB_DEV set (or another agent configured)
- AGENT_ENGINE_BOB_ID_DEV set (or another agent configured)
- GCP Application Default Credentials (gcloud auth application-default login)
- Agent Engine deployed and accessible

Expand Down Expand Up @@ -130,7 +130,7 @@ async def run_smoke_test(
)
print(" To configure:")
print(
f" export AGENT_ENGINE_{agent_role.replace('-', '_').upper()}_DEV=your-engine-id"
f" export AGENT_ENGINE_{agent_role.replace('-', '_').upper()}_ID_DEV=your-engine-id"
)
print()
print("✅ Smoke test completed (agent not configured - non-blocking)")
Expand Down
Loading