API reference¶
These pages are generated directly from the docstrings and type annotations in
the installed triagesim package, so they always reflect the released version
rather than a hand-maintained copy.
For task-oriented explanation, start with the User guide.
Public surface¶
| Module | Exports |
|---|---|
triagesim | TriageRunner, RunnerConfig, __version__ |
triagesim.agents | BaseLLM, OpenRouterLLM, NurseAgent, PatientAgent |
triagesim.core | BaseAgentOutput, NurseOutput, PatientOutput |
triagesim.personas | PatientPersona, NursePersona, loaders, samplers, filters |
triagesim.utils | compute_all_metrics and the individual metric functions |
triagesim.audio | SpeechRenderer (requires the audio extra) |
Import conventions¶
The three most-used symbols come straight off the top-level package:
Everything else lives in a subpackage:
from triagesim.agents import OpenRouterLLM, NurseAgent, PatientAgent
from triagesim.core import NurseOutput, PatientOutput
from triagesim.personas import load_patient_personas, sample_patient_personas
from triagesim.utils import compute_all_metrics
One exception
SpeechRenderer is not re-exported from triagesim.audio. Import it
from the module directly:
Internal modules¶
triagesim.core contains more than it exports — environment, belief_graph,
belief_updater, state_store, actions, action_mapper, vitals, and
llm_detectors. These are documented in the User guide
where they help explain behaviour, but they are not part of the public API and
may change between releases without notice.
The one you are most likely to reach for deliberately is RedisStateStore, when
you need a non-default Redis host or port:
Type checking¶
The package ships a py.typed marker, so mypy and pyright resolve its
annotations without additional stubs.