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

ModuleExports
triagesimTriageRunner, RunnerConfig, __version__
triagesim.agentsBaseLLM, OpenRouterLLM, NurseAgent, PatientAgent
triagesim.coreBaseAgentOutput, NurseOutput, PatientOutput
triagesim.personasPatientPersona, NursePersona, loaders, samplers, filters
triagesim.utilscompute_all_metrics and the individual metric functions
triagesim.audioSpeechRenderer (requires the audio extra)

Import conventions

The three most-used symbols come straight off the top-level package:

from triagesim import TriageRunner, RunnerConfig, __version__

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:

from triagesim.audio.renderer import SpeechRenderer

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:

from triagesim.core.state_store import RedisStateStore

Type checking

The package ships a py.typed marker, so mypy and pyright resolve its annotations without additional stubs.