Skip to content

fix: wire the lit orchestrator demo to its required subagents#838

Open
stablegenius49 wants to merge 1 commit intogoogle:mainfrom
stablegenius49:pr-factory/issue-586-demo-orchestrator
Open

fix: wire the lit orchestrator demo to its required subagents#838
stablegenius49 wants to merge 1 commit intogoogle:mainfrom
stablegenius49:pr-factory/issue-586-demo-orchestrator

Conversation

@stablegenius49
Copy link

Description

This wires the Lit orchestrator sample to the ports already documented in the orchestrator README so npm run demo:orchestrator can actually boot the full sample stack.

What changed:

  • added orchestrator-specific subagent scripts for the restaurant, contact lookup, and rizzcharts agents
  • updated serve:agent:orchestrator to pass the default --subagent_urls values the orchestrator requires
  • updated demo:orchestrator to launch the shell plus all three subagents before starting the orchestrator

Fixes #586.

Pre-launch Checklist

Tests:

  • added a local Node assertion that validates the updated package.json scripts wire the documented ports and subagent URLs.

Fixes google#586 by giving the lit orchestrator sample default subagent URLs and starting the required restaurant/contact/rizzcharts agents on the documented ports when running demo:orchestrator.

Validation: package.json script assertions via Node.
@google-cla
Copy link

google-cla bot commented Mar 13, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request successfully wires up the Lit orchestrator demo by adding and updating the necessary npm scripts in package.json. The changes appear to be functionally correct. My review includes two suggestions to improve the maintainability and robustness of these new scripts by reducing a very long command and eliminating duplicated port numbers.

"serve:agent:restaurant:orchestrator": "cd ../../agent/adk/restaurant_finder && uv run . --port=10003",
"serve:agent:contact_lookup:orchestrator": "cd ../../agent/adk/contact_lookup && uv run . --port=10004",
"serve:agent:rizzcharts:orchestrator": "cd ../../agent/adk/rizzcharts && uv run . --port=10005",
"serve:agent:orchestrator": "cd ../../agent/adk/orchestrator && uv run . --port=10002 --subagent_urls=http://localhost:10003 --subagent_urls=http://localhost:10004 --subagent_urls=http://localhost:10005",
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The ports for the subagents (10003, 10004, 10005) are hardcoded in this script and also in the serve:agent:*:orchestrator scripts on lines 13-15. This duplication means that if a port number changes, it must be updated in two places, which is error-prone and violates the DRY principle. Consider using a mechanism to define these ports only once. For example, you could use a tool like cross-env to set environment variables for the ports and reference them in the scripts, making them more robust and easier to maintain.

"demo:restaurant": "npm install && npm run build:renderer && concurrently -k -n \"SHELL,REST\" -c \"magenta,blue\" \"npm run serve:shell\" \"npm run serve:agent:restaurant\"",
"demo:contact": "npm install && npm run build:renderer && concurrently -k -n \"SHELL,CONT1\" -c \"magenta,green\" \"npm run serve:shell\" \"npm run serve:agent:contact_lookup\"",
"demo:orchestrator": "npm install && npm run build:renderer && concurrently -k -n \"SHELL,ORCH\" -c \"magenta,cyan\" \"npm run serve:shell\" \"npm run serve:agent:orchestrator\""
"demo:orchestrator": "npm install && npm run build:renderer && concurrently -k -n \"SHELL,REST,CONT,RIZZ,ORCH\" -c \"magenta,blue,green,yellow,cyan\" \"npm run serve:shell\" \"npm run serve:agent:restaurant:orchestrator\" \"npm run serve:agent:contact_lookup:orchestrator\" \"npm run serve:agent:rizzcharts:orchestrator\" \"npm run serve:agent:orchestrator\""
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

This script definition is very long, which harms readability and maintainability. To make it cleaner, you could extract the logic for running the subagents into a separate helper script.

For example, you could add a serve:subagents:orchestrator script:

"serve:subagents:orchestrator": "concurrently -k -n \"REST,CONT,RIZZ\" -c \"blue,green,yellow\" \"npm run serve:agent:restaurant:orchestrator\" \"npm run serve:agent:contact_lookup:orchestrator\" \"npm run serve:agent:rizzcharts:orchestrator\""

Then, the demo:orchestrator script would be much simpler:

"demo:orchestrator": "npm install && npm run build:renderer && concurrently -k -n \"SHELL,AGENTS,ORCH\" -c \"magenta,white,cyan\" \"npm run serve:shell\" \"npm run serve:subagents:orchestrator\" \"npm run serve:agent:orchestrator\""

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

demo:orchestrator fails: missing required --subagent_urls argument

1 participant