Fix the authoring demo: stateless, prompt-routed demo model#18
Merged
Conversation
The demo wired a single shared, stateful ScriptedLLM, so the agent ignored the prompt and — worse — was exhausted after the first request (every later /v1/authoring/propose returned no bot). It did not look like it worked. - New `agent/demo.py::DemoAuthoringLLM`: a deterministic, stateless stand-in model that inspects the conversation each turn (so it works on every request) and routes the user's ask by keyword to one of a few example bots over the seeded demo tables (high-value orders / status timeouts / high CPU), playing schema → sample → propose. Not a real LLM — wire a local/* model for a live agent. - `serve --demo-data` now uses it; the UI greeting says it's an offline demo that recognises a few asks. ScriptedLLM stays for deterministic tests. - Test: two consecutive proposes both return valid, correctly-routed bots (catches the old bug). 219 tests + 2 Playwright e2e green; ruff + mypy clean.
iCodePoet
added a commit
that referenced
this pull request
Jun 30, 2026
The module docstring had a 101-char line; ruff E501 failed CI (#18). Reworded to keep every line <= 100. (Local check had suppressed ruff output, so the failure was missed before merge.)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The demo wired a single shared, stateful
ScriptedLLM— so the agent ignored the prompt and was exhausted after the first request (later/v1/authoring/proposecalls returned no bot). It didn't look like it worked.New
agent/demo.py::DemoAuthoringLLM: deterministic + stateless (inspects the conversation each turn → works on every request) and routes the ask by keyword to a few example bots over the seededorders/metricstables (high-value orders / status timeouts / high CPU), playing schema → sample → propose. Not a real LLM — wirelocal/*for a live agent. UI greeting now says it's an offline demo. Regression test added.219 tests + 2 Playwright e2e green.