@@ -33,6 +33,7 @@ CONTINUE_ON_ERROR=false
3333SINGLE_TUTORIAL=" "
3434VIEW_LOGS=false
3535FROM_REPO_ROOT=false
36+ BUILD_CLI=false
3637
3738for arg in " $@ " ; do
3839 if [[ " $arg " == " --continue-on-error" ]]; then
@@ -41,6 +42,8 @@ for arg in "$@"; do
4142 VIEW_LOGS=true
4243 elif [[ " $arg " == " --from-repo-root" ]]; then
4344 FROM_REPO_ROOT=true
45+ elif [[ " $arg " == " --build-cli" ]]; then
46+ BUILD_CLI=true
4447 else
4548 SINGLE_TUTORIAL=" $arg "
4649 fi
@@ -55,15 +58,15 @@ ALL_TUTORIALS=(
5558 # base tutorials
5659 " 10_async/00_base/000_hello_acp"
5760 " 10_async/00_base/010_multiturn"
58- " 10_agentic /00_base/020_streaming"
59- " 10_agentic /00_base/030_tracing"
60- " 10_agentic /00_base/040_other_sdks"
61- " 10_agentic /00_base/080_batch_events"
62- # "10_agentic /00_base/090_multi_agent_non_temporal" This will require its own version of this
61+ " 10_async /00_base/020_streaming"
62+ " 10_async /00_base/030_tracing"
63+ " 10_async /00_base/040_other_sdks"
64+ " 10_async /00_base/080_batch_events"
65+ # "10_async /00_base/090_multi_agent_non_temporal" This will require its own version of this
6366 # temporal tutorials
64- " 10_agentic /10_temporal/000_hello_acp"
65- " 10_agentic /10_temporal/010_agent_chat"
66- " 10_agentic /10_temporal/020_state_machine"
67+ " 10_async /10_temporal/000_hello_acp"
68+ " 10_async /10_temporal/010_agent_chat"
69+ " 10_async /10_temporal/020_state_machine"
6770)
6871
6972PASSED=0
@@ -92,7 +95,7 @@ check_prerequisites() {
9295wait_for_agent_ready () {
9396 local name=$1
9497 local logfile=" /tmp/agentex-${name} .log"
95- local timeout=30 # seconds
98+ local timeout=45 # seconds
9699 local elapsed=0
97100
98101 echo -e " ${YELLOW} ⏳ Waiting for ${name} agent to be ready...${NC} "
@@ -132,6 +135,18 @@ start_agent() {
132135 return 1
133136 fi
134137
138+ if [ " $BUILD_CLI " = true ]; then
139+ # Use wheel from dist directory at repo root
140+ local wheel_file=$( ls /home/runner/work/* /* /dist/agentex_sdk-* .whl 2> /dev/null | head -n1)
141+ if [[ -z " $wheel_file " ]]; then
142+ echo -e " ${RED} ❌ No built wheel found in dist/agentex_sdk-*.whl${NC} "
143+ echo -e " ${YELLOW} 💡 Please build the local SDK first by running: uv build${NC} "
144+ echo -e " ${YELLOW} 💡 From the repo root directory${NC} "
145+ cd " $original_dir "
146+ return 1
147+ fi
148+ fi
149+
135150 # Determine how to run the agent
136151 local pid
137152 if [[ " $FROM_REPO_ROOT " == " true" ]]; then
@@ -141,14 +156,26 @@ start_agent() {
141156
142157 local original_dir=" $PWD "
143158 cd " $repo_root " || return 1
144- uv run agentex agents run --manifest " $abs_manifest " > " $logfile " 2>&1 &
159+ if [ " $BUILD_CLI " = true ]; then
160+ local wheel_file=$( ls /home/runner/work/* /* /dist/agentex_sdk-* .whl 2> /dev/null | head -n1)
161+ # Use the built wheel
162+ uv run --with " $wheel_file " agentex agents run --manifest " $manifest_path " > " $logfile " 2>&1 &
163+ else
164+ uv run agentex agents run --manifest " $abs_manifest " > " $logfile " 2>&1 &
165+ fi
145166 pid=$!
146167 cd " $original_dir " # Return to examples/tutorials
147168 else
148169 # Traditional mode: cd into tutorial and run
149170 local original_dir=" $PWD "
150171 cd " $tutorial_path " || return 1
151- uv run agentex agents run --manifest manifest.yaml > " $logfile " 2>&1 &
172+ if [ " $BUILD_CLI " = true ]; then
173+ local wheel_file=$( ls /home/runner/work/* /* /dist/agentex_sdk-* .whl 2> /dev/null | head -n1)
174+ # Use the built wheel
175+ uv run --with " $wheel_file " agentex agents run --manifest " $manifest_path " > " $logfile " 2>&1 &
176+ else
177+ uv run agentex agents run --manifest " $abs_manifest " > " $logfile " 2>&1 &
178+ fi
152179 pid=$!
153180 cd " $original_dir "
154181 fi
@@ -341,6 +368,38 @@ execute_tutorial_test() {
341368 fi
342369}
343370
371+ # Function to check if built wheel is available
372+ check_built_wheel () {
373+
374+ # Navigate to the repo root (two levels up from examples/tutorials)
375+ local repo_root=" ../../"
376+ local original_dir=" $PWD "
377+
378+ cd " $repo_root " || {
379+ echo -e " ${RED} ❌ Failed to navigate to repo root${NC} "
380+ return 1
381+ }
382+
383+ # Check if wheel exists in dist directory at repo root
384+ local wheel_file=$( ls /home/runner/work/* /* /dist/agentex_sdk-* .whl 2> /dev/null | head -n1)
385+ if [[ -z " $wheel_file " ]]; then
386+ echo -e " ${RED} ❌ No built wheel found in dist/agentex_sdk-*.whl${NC} "
387+ echo -e " ${YELLOW} 💡 Please build the local SDK first by running: uv build${NC} "
388+ echo -e " ${YELLOW} 💡 From the repo root directory${NC} "
389+ cd " $original_dir "
390+ return 1
391+ fi
392+
393+ # Test the wheel by running agentex --help
394+ if ! uv run --with " $wheel_file " agentex --help > /dev/null 2>&1 ; then
395+ echo -e " ${RED} ❌ Failed to run agentex with built wheel${NC} "
396+ cd " $original_dir "
397+ return 1
398+ fi
399+ cd " $original_dir "
400+ return 0
401+ }
402+
344403# Main execution function
345404main () {
346405 # Handle --view-logs flag
@@ -367,6 +426,15 @@ main() {
367426
368427 # Check prerequisites
369428 check_prerequisites
429+
430+ # Check built wheel if requested
431+ if [ " $BUILD_CLI " = true ]; then
432+ if ! check_built_wheel; then
433+ echo -e " ${RED} ❌ Failed to find or verify built wheel${NC} "
434+ exit 1
435+ fi
436+ echo " "
437+ fi
370438
371439 echo " "
372440
0 commit comments