Skip to main content

Source: docs/manual/scripts-demos.md

This page is generated by site/scripts/sync-manual-docs.mjs.

Scripts and Demos

Demo scripts validate real agent workflows using simulated tools and approvals. They exercise the full execution path — Temporal workflow, LLM decision loop, tool routing, approval gates, and cost tracking — without requiring external service dependencies. Use them to verify that the runtime works end-to-end after configuration changes or upgrades.

This document is for developers running validation checks and operators verifying deployment health.

Prerequisites: Running Temporal dev server, seeded tool registry (version v2.0.7 or later), Postgres available.

Available Demos

ArgoCD ApplicationSet Alert Demo

Script: scripts/argocd_applicationset_alert_demo.sh

What it demonstrates: An agent responding to an ArgoCD application health alert. The agent inspects the application status, identifies the failing component, and recommends a remediation action. Exercises the http_get and bash_exec simulated tools with approval gates.

How to run:

bash scripts/argocd_applicationset_alert_demo.sh

What to look for: The workflow should complete with a halt decision after 3-4 steps. Check that approval signals were sent and acknowledged, and that the cost summary shows non-zero token usage.

Introduced in: Phase 3 (tool execution and approvals)

Ticket New Runtime Demo

Script: scripts/ticket_new_runtime_demo.sh

What it demonstrates: An agent processing a new support ticket. The agent triages the ticket, gathers context from simulated APIs, and drafts a response. Exercises multi-step tool chaining with the sim_ticket_read, sim_search, and sim_draft tools.

How to run:

bash scripts/ticket_new_runtime_demo.sh

What to look for: The workflow should show a clear triage → research → draft sequence in the decision log. Verify that each tool call has valid schema-conformant arguments.

Introduced in: Phase 4 (memory and context)

Incident Cost Regression Demo

Script: scripts/incident_cost_regression_demo.sh

What it demonstrates: An agent investigating a cost regression incident. Exercises cost tracking, model preference lookups, and the cost query CLI. Uses simulated tools that return cost metrics.

How to run:

bash scripts/incident_cost_regression_demo.sh

What to look for: The cost summary at the end should reflect the models used. Check that the agent selected the preferred model from the model preferences configuration.

Introduced in: Phase 6 (models and cost tracking)

Phase 7A Smoke Test

Script: scripts/phase7a_smoke_test.sh

What it demonstrates: End-to-end smoke test covering supervisor patterns, graph workflows, and approval flows. Validates that all Phase 7 features (supervisor broadcast, delegate, debate) work together.

How to run:

bash scripts/phase7a_smoke_test.sh

What to look for: Each supervisor pattern should complete without errors. The script prints pass/fail for each test case.

Introduced in: Phase 7A (supervisor patterns)

Writing a New Demo Script

To create a new demo:

  1. Create a script in scripts/ following the naming convention <topic>_demo.sh.
  2. Use simulated tools (prefixed sim_) to avoid external dependencies. Simulated tools force approval gates so the demo exercises the approval flow.
  3. Seed the registry with the required version before running the workflow.
  4. Include clear output messages indicating what the demo is testing and whether each step passed.
  5. Exit with a non-zero code on failure so CI can detect regressions.

Example skeleton:

#!/usr/bin/env bash
set -euo pipefail

echo "=== My Demo: testing feature X ==="

# Seed registry
go run ./cmd/seed-registry --version v2.0.7

# Run workflow
go run ./cmd/run --prompt "Test feature X" --max-steps 4

# Query result
go run ./cmd/query --workflow-id <id> --query current_state

echo "=== Demo complete ==="

Notes

  • Simulated tools are prefixed sim_ and force approval gates.
  • Registry must be seeded with version v2.0.7 or later for all demos.
  • Demo scripts are not run in CI by default. Add them to the CI workflow if you want automated validation.