ClinicalGym Contact us ↘

Clinical RL environment as a service

From patient complaints.
To clinical decisions.

An EHR-like simulation your agent can act in - not just answer.
Gather evidence, choose a next step, and learn from the trajectory.

Interactive episodesTyped clinical actionsYour training loop
Environment serviceepisode → trajectory
01 / Start with a patientComplaint + initial case context
HistoryFindingsOrders
Only revealed information reaches the agent↓
02 / Act, then observeYour agent ⇄ ClinicalGym
observation → actionfinding ← step(action)
Decisions and results become a trajectory↓
03 / Feed the learning loopTrajectory + feedback → your trainerUpdated policy → next episode ↺

Granted access · contact us for API credentials and integration details.

01 Patient complaint02 Evidence-seeking actions03 Clinical decisions04 Feedback for learning

Open showcase dataset

Six recorded encounters. Every step.

GPT-6.1-Sol on acute intermittent porphyria and VIPoma / WDHA, three attempts each. Full transcripts with analyst review of diagnosis and whole-patient care. Recorded runs, not authored illustrations.

Open on Hugging Face ↗

Environment / 01

A complaint is the start.
Not the whole case.

An EHR-like encounter unfolds through actions.
The next observation depends on what the agent does.

Medical Q&A

Read the supplied facts.
Produce an answer.

Clinical agent

Decide which facts to obtain.
Choose, observe, revise, act.

The action changes the information available - not just the wording of a reply.

Initial observation / same case for all 8 rollouts

Setting / simulated EDBatch / 8 trajectoriesPolicy / same snapshot

Authored training illustrationRound 0 / 8
Cumulative return / 8 trajectories

Same start. Different paths. Different returns.

Inspect one path

T1 / Focused assessment

Agent → ClinicalGym

ClinicalGym → agent

Process points-

Revealed decisionsReturn -
    How this illustration assigns rewards

    Process points, per action

    Relevant history +2 · vital assessment +3 · focused exam +3 · targeted test +6

    No points

    Repeated, irrelevant or incorrect actions earn 0 · finish 0

    Result points, at closure

    Correct diagnosis +10 · appropriate management +10 · budget kept +10

    Illustrative point values, not the production reward policy. As in the live environment, each relevant step earns its own points and the final reward depends on the result. Different valid paths can receive the same return.

    Group-relative feedback

    Eight returns.
    One relative signal.

    All eight rollouts share an initial case and policy snapshot.

    Complete the batch to reveal final returns and group-relative advantages.

    Granted-access API / 02

    Your policy.
    Our clinical environment.

    01 / Request access

    Get your API key

    Contact us with your research or training use case. Credentials and integration details are shared after access is granted.

    Request an API key ↘
    02 / Run episodes

    Send actions. Receive observations.

    Use authenticated environment endpoints to start an encounter, inspect permitted actions and advance the episode.

    Your worker → clinical actionClinicalGym → observation + feedback
    03 / Train on rollouts

    Collect trajectories and returns

    Route episode feedback into your training pipeline. Keep held-out cases separate when measuring progress.

    Discuss rollout integration →
    Access is granted, not self-service.

    Endpoint URLs, authentication format, quotas and the final reward contract come with onboarding. The batch above illustrates the training flow; it does not call the service.

    Policy learning / 03

    From one decision.
    To a better decision policy.

    01 / Episode

    Start from a complaint

    Initial context. Hidden findings. A permitted clinical action space.

    o₀
    02 / Rollout

    Acquire evidence & act

    Questions, examinations, tests, diagnosis and treatment choices.

    o[t] → a[t] → o[t+1]
    03 / Feedback

    Inspect the whole path

    Points per category, missed findings and budget use.

    trajectory + scores
    04 / Your trainer

    Update, then try again

    Use the rollout in your RL or preference-learning pipeline.

    πθ → πθ′ ↺
    What the policy must decide
    • What to ask next
    • Which examination matters
    • When a test adds evidence
    • When to revise a diagnosis
    • How to treat or stop

    A correct answer ≠ a good trajectory

    What you reward shapes what the agent does.

    A / Transitions

    State → action → next state

    Step-wise observations, actions, rewards and termination.

    transitions.jsonl
    B / Preferences

    Compare trajectories

    Trajectory pairs with score gaps and behavior diagnostics.

    dpo_training.jsonl
    C / Reward-model data

    Make feedback inspectable

    Trajectory records, scoring metadata and filter reports.

    reward_model_training.jsonl
    You own the training loop.

    Online PPO/GRPO training is not bundled. Process and result points, verifier scores and export rewards are research signals, not evidence of clinical safety. Measure progress on held-out encounters with ClinicalBench.

    Two layers. Different jobs.

    ClinicalGym executes.
    ClinicalBench measures.

    Build and inspect an agent in the environment.
    Compare its performance on ClinicalBench.

    Explore ClinicalBench ↗

    Work with us / 04

    Bring your agent.

    Request API access. Tell us about your model, rollout workload and research use case.

    Mariusz Kurman · ClinicalGym