# The Guided Terminal
## Architecture of a budget-governed, brandable AI intake system

**Eudai Gestalt Integrations · workflowtech.ai · 2026**

---

## The problem

Public AI chat widgets fail their operators in two directions at once. Left
open, they burn API spend on whatever visitors type and say things the
business never approved. Locked down, they become decoration: a search box
that apologizes. Most teams ship one, discover both failure modes, and quietly
remove it.

The terminal at workflowtech.ai is our answer, and this paper describes how it
works. The same architecture runs as GestaltWorkframe, the reusable framework
the terminal is built on.

## Guided intake, not open chat

The terminal never starts as a blank prompt. A short structured intake — what
are you hoping to accomplish, what are you building, how automated are you
today, what would help right now — routes every session into one of three
persona modes (service inquiry, practitioner assistance, education) before the
first model call happens. The router, not the model, decides mode transitions,
tool access, and escalation. Models are workers; the backend owns
orchestration.

## Local-first routing with operator-controlled escalation

Every turn resolves through a provider router with an ordered route table:

- **Local first.** A self-hosted model endpoint is the primary route when it
  is healthy. A sub-second health gate skips it when it is not, instead of
  letting a dead endpoint eat the whole request timeout.
- **Cloud as governed escalation.** Cloud routes exist behind a budget gate:
  per-turn, per-session, per-day, and per-month call caps, plus dollar caps
  that are the true ceiling. Visitors choose the question; they never choose
  the spend.
- **A key broker, not embedded keys.** Model access runs through an on-host key
  broker fronting multiple upstream providers behind short-lived
  virtual keys. Rotating a provider key is a broker operation, not a code
  deploy.

## The ledger that says no

Spend governance is only as honest as its accounting. Every successful cloud
completion must report token usage the ledger can read; a completion that
cannot be metered trips a persistent accounting breaker that takes every cloud
route offline until an operator clears it. We have watched this breaker fire
in production on a healthy response with an unreadable usage format. That is
the design working: unmetered spend is treated as an outage, not a rounding
error.

The public status indicator reports the same truth. "Online" is computed from
whether a route can actually serve the next turn, not from whether keys are
configured.

## Brandable by bundle, not by fork

Deployments are configuration, not forks. A deployment bundle — brand palette,
logo, identity, intake questions, personas, routing policy, copy — is a
directory of YAML the framework loads at runtime. The chaos entry animation on
workflowtech.ai (the ant mark that assembles from particles and converges
into the terminal frame) is a framework capability any deployment
can switch on with its own logo; the particle engine samples whatever mark the
bundle provides.

## The research-and-publish loop

The same system curates its own public material. A discovery watchlist (RSS,
GitHub repositories and topics, subreddits, YouTube channels, web diffs) feeds
scheduled polling; a scout scores finds; notable items flow to a public
ticker, a curated every-ten-days digest, and a Git-backed public library
(CODEX) that is both human-browseable and machine-readable. Featuring,
curation, and newsletter queueing are explicit operator actions with audit
records.

## Limitations

- Guided intake trades reach for control: visitors who want a free-form
  chatbot will not find one here, by design.
- Local-first routing assumes an operator who runs local inference; without
  it, the system leans on capped cloud escalation and inherits provider
  pricing.
- The accounting breaker is deliberately blunt. A single unmeterable
  completion halts all cloud routing until cleared — correct for spend
  safety, and operationally noisy under provider-format drift.
- Retrieval grounding is only as good as the curated corpus behind it.

## Roadmap

- CLI-style terminal presentation: intake and responses as a live prompt
  session rather than card UI.
- Completion of the framework/implementation package split
  (GestaltWorkframe as a pip-installable dependency).

## Verification

- Live terminal: https://workflowtech.ai/terminal
- Public library: https://workflowtech.ai/codex
- Credentials: Claude Partner Badge: Claude Code (Anthropic, via Credly:
  https://www.credly.com/badges/0286ae54-7b3c-4f37-8fde-c950c83a89f4);
  Claude Certified Architect: Professional (CCAR-P) and Foundations.
- Contact: contact@workflowtech.ai
