Capability: demo
One harness instance on Temporal Cloud with
gpt-6.1-sol, two MCP servers, a skill and both renderers on one task; its e2e tests prove the flow and crash recovery.
What it is
The definition of done of issue-3, kept runnable: examples/demo is an Agent Plugin (the orders and policy stdio MCP servers, the support-agent skill, a prompt extension) with a config.toml, started by python -m examples.demo. The support agent example is the walkthrough.
Current behaviour
python -m examples.demo [CONFIG]SHALL start the A2A server with an in-process worker on127.0.0.1:8080throughtiny_harness.service.serve, serve the built web renderer under/uiand print how to start the TUI; both surfaces reach the same instance.CONFIGdefaults toconfig.toml(Temporal Cloud);config.embedded.tomlruns the same demo on an embedded Temporal with no Temporal account.- WHEN the complaint about order #48213 is sent THEN the agent SHALL load the skill, create a plan, call
get_orderandpolicy.lookup, emit an A2UI card with the resolution options and a Confirm button, ask the reporter and wait inINPUT_REQUIRED; on the reply or the card's action it SHALL act withship_replacementorrefundand complete with a two-sentence summary. - The
ordersserver SHALL append every call to$PLUGIN_DATA/orders-ledger.jsonland, while$PLUGIN_DATA/slow-get-orderexists, holdget_orderopen, so a test can kill the worker mid-activity. tests/e2e/test_demo.pySHALL drive the conversation through the A2A client (pressing the card's button for the first question) and assert the states, the artifact, the ledger (a non-idempotent tool at most once), onechatspan perinvoke_llmrun, cached tokens from turn two and no secret in the trace or log.tests/e2e/test_crash_recovery.pySHALL run the server and the worker as separate processes, kill the worker withSIGKILLduringget_orderand again while the task waits for input, restart it, and assert from Temporal's history that everyinvoke_llmwas scheduled once and completed once and that the ledger showsship_replacementat most once.tests/e2e/test_demo_embedded.pySHALL run the demo in embedded mode as oneserveprocess with noTEMPORAL_API_KEYin its environment and assert the task completes, the embedded server's start and warning are logged, and no secret is in the trace or log.tests/e2e/test_demo_ollama.pySHALL run the demo withconfig.ollama.toml's settings — embedded Temporal, a loopback Ollama over Chat Completions — with neitherOPENAI_API_KEYnorTEMPORAL_API_KEYin its environment, and assert the task completes, themodel endpointline names the loopback endpoint, and no secret is in the trace or log. It skips with the reason when no Ollama answers on127.0.0.1:11434or the model (TINY_HARNESS_OLLAMA_MODEL, defaultqwen3:8b) is not pulled.- The e2e tests SHALL skip with the missing variable's name when a variable they need is absent (
OPENAI_API_KEYandTEMPORAL_API_KEY;OPENAI_API_KEYalone for the embedded demo); each run uses its own task queue, port and state directory, and writes redacted evidence toTINY_HARNESS_E2E_EVIDENCEwhen set.
Design
design.md § Testing strategy, testing-plan.md rows T4 and T12.
History
| Work item | What changed | Links |
|---|---|---|
| issue-3 | The demo plugin, configuration and e2e tests (Layer 9) | spec, issue #3 |
| issue-17 | config.embedded.toml, the optional config path, the embedded-mode e2e | spec, PR #18 |
| issue-19 | config.ollama.toml, the offline Ollama e2e | spec, PR #22 |