Highlights
- New Onboarding sub-agent — registers first-time patients with duplicate detection and input validation. Returns a
patient_idthe patient can immediately use for booking or coverage. - Single-chatbot UX (agents-as-tools refactor) — the patient now talks to one
ClinicOps Assistant. Sub-agents (Onboarding, Scheduler, Eligibility) are exposed to the master asdelegate_to_<name>tools and invoked as stateless subroutines. No more visible routing handoff. - Interactive REPL —
clinicopswith no subcommand drops into aprompt-toolkit-powered session: persistent history at~/.clinicops_history, up/down arrow recall,ctrl+rreverse search, inline autosuggest. - Streaming responses — agent output streams token-by-token via the OpenAI SDK streaming API.
- Trace propagation via
ContextVar— master agent propagatestrace_idinto nested sub-agent runs so every event lands under one trace in the events store.
Added
- Onboarding agent with
lookup_patientandregister_patienttools - Interactive REPL with
prompt-toolkit(history, search, autosuggest) - Streaming responses via the OpenAI SDK streaming API
- Current datetime injection into Scheduler, Onboarding, and master system prompts so agents resolve relative dates
ContextVar-based trace propagation for nested delegate callsregister_builtins()helper shared by CLI and eval runner
Changed
- Architecture: moved from visible triage → scheduler handoff to single user-facing assistant with sub-agents as tools
- Config: provider-agnostic
LLM_API_KEY/LLM_BASE_URL/LLM_MODELreplaceOPENROUTER_*(works with OpenRouter, OpenAI, Ollama, Azure, Groq, any OpenAI-compatible provider) - REPL conversation memory via
prior_messagespassed to the master every turn - Master agent system prompt explicitly suppresses routing disclosure
- CLI
chatsubcommand simplified — one call to the master, no manual orchestration - All markdown docs refreshed for the new architecture
Fixed
register_patientvalidates inputs before any DB I/O so bad inputs fail fast- Dashboard
Recent decisionspanel no longer crashes withValueError: cannot convert float NaN to integeron events without a latency - REPL visual polish:
httpxlogs suppressed, distinctrich.Panelbanner and coloredyou ▶prompt
See CHANGELOG.md for the full list.