Skip to content

Fix the authoring demo: stateless, prompt-routed demo model#18

Merged
iCodePoet merged 1 commit into
mainfrom
feat/authoring-demo-model
Jun 30, 2026
Merged

Fix the authoring demo: stateless, prompt-routed demo model#18
iCodePoet merged 1 commit into
mainfrom
feat/authoring-demo-model

Conversation

@iCodePoet

Copy link
Copy Markdown
Contributor

The demo wired a single shared, stateful ScriptedLLM — so the agent ignored the prompt and was exhausted after the first request (later /v1/authoring/propose calls 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 seeded orders/metrics tables (high-value orders / status timeouts / high CPU), playing schema → sample → propose. Not a real LLM — wire local/* for a live agent. UI greeting now says it's an offline demo. Regression test added.

219 tests + 2 Playwright e2e green.

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 iCodePoet merged commit 727b4fa into main Jun 30, 2026
1 of 2 checks passed
@iCodePoet iCodePoet deleted the feat/authoring-demo-model branch June 30, 2026 10:25
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.)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant