-
Notifications
You must be signed in to change notification settings - Fork 996
fix: wire the lit orchestrator demo to its required subagents #838
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,12 +10,15 @@ | |
| "scripts": { | ||
| "serve:agent:restaurant": "cd ../../agent/adk/restaurant_finder && uv run .", | ||
| "serve:agent:contact_lookup": "cd ../../agent/adk/contact_lookup && uv run .", | ||
| "serve:agent:orchestrator": "cd ../../agent/adk/orchestrator && uv run .", | ||
| "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", | ||
| "serve:shell": "cd shell && npm run dev", | ||
| "build:renderer": "cd ../../../renderers && for dir in 'web_core' 'markdown/markdown-it' 'lit'; do (cd \"$dir\" && npm install && npm run build); done", | ||
| "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\"" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 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": "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": "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\"" |
||
| }, | ||
| "devDependencies": { | ||
| "concurrently": "9.2.1" | ||
|
|
||
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.
The ports for the subagents (10003, 10004, 10005) are hardcoded in this script and also in the
serve:agent:*:orchestratorscripts 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 likecross-envto set environment variables for the ports and reference them in the scripts, making them more robust and easier to maintain.