Skip to main content
An environment represents a simulated health system. It composes simulators that your agent interacts with (FHIR servers, phone lines, fax endpoints, payer portals) and the data they contain (patients, conditions, medications, insurance plans).

What Is an Environment?

Think of an environment as a virtual hospital or clinic. It links together all the simulated systems a healthcare AI agent might need:
  • An EHR with patient records (FHIR R4)
  • A phone system for scheduling and follow-ups (Voice/IVR)
  • A fax line for receiving and sending documents (Fax)
  • A payer portal for prior authorizations (Payer)
  • A clearinghouse for eligibility checks (Clearinghouse)
  • An HL7 interface for lab results and ADT messages (HL7v2)
  • Clinical decision support hooks (CDS Hooks)
  • Messaging endpoints for SMS/text (Message)
When you run a benchmark, Verial provisions each linked simulator as a live sandbox instance with real endpoints your agent can connect to.

Creating an Environment

const environment = await verial.environments.create({
  name: 'Regional Medical Center',
})
At this point the environment is a container. You configure it by creating simulators and linking them:
// Create simulators
const fhirSim = await verial.simulators.create({
  type: 'FHIR',
  name: 'Primary EHR',
})

const payerSim = await verial.simulators.create({
  type: 'Payer',
  name: 'BlueCross Portal',
})

// Link simulators to environment
await verial.environments.addSimulator({
  environmentId: environment.id,
  simulatorId: fhirSim.id,
})

await verial.environments.addSimulator({
  environmentId: environment.id,
  simulatorId: payerSim.id,
})

Simulator Types

Environments can include any combination of the following simulator types:
SimulatorProtocolDescription
FHIRREST (FHIR R4)Full EHR with patients, conditions, medications, encounters, and SMART on FHIR auth
VoiceWebSocket / SIPPhone system with IVR menus, hold queues, and recorded call transcripts
HL7HL7v2 over TCPLab results (ORU), admissions (ADT), orders (ORM), and scheduling (SIU)
FaxHTTPInbound and outbound fax with document OCR and delivery tracking
PayerRESTInsurance payer portal with prior auth submission, status checks, and patient lookup
ClearinghouseRESTEligibility verification and claims status queries
CDS HooksRESTClinical decision support with hook registration, invocation, and feedback
MessageRESTSMS/text messaging for appointment reminders and patient communication

Environment Lifecycle

  1. Created. The environment definition exists with linked simulators. You can edit the configuration freely.
  2. Playground. When you create a playground from an environment, Verial provisions all linked simulators as sandboxes. Each sandbox gets a live endpoint (FHIR URL, phone number, fax number, etc.).
  3. Active. The playground is running and your agent can connect. All interactions are logged.
  4. Torn Down. The playground is stopped and all provisioned resources are released. Interaction logs are preserved for review.

Datasets

Datasets contain synthetic patient data that populates simulator sandboxes. You create datasets separately and link them to sandboxes after provisioning:
const dataset = await verial.datasets.create({
  name: 'Primary Care Patients',
  data: {
    patients: [
      {
        name: 'John Smith',
        dob: '1965-03-15',
        gender: 'male',
        conditions: ['Type 2 Diabetes', 'Hypertension'],
        medications: ['Metformin 500mg', 'Lisinopril 10mg'],
        insurance: {
          plan: 'BlueCross PPO',
          member_id: 'BCB123456789',
        },
      },
    ],
  },
})

Reusability

Environments are designed to be reused across multiple benchmarks. Create one environment that models your target health system, then reference it from different benchmarks:
const env = await verial.environments.create({ name: 'Cardiology Practice' })
// ... link simulators ...

const priorAuthBenchmark = await verial.benchmarks.create({
  name: 'Prior Auth Flow',
  environmentId: env.id,
})

const schedulingBenchmark = await verial.benchmarks.create({
  name: 'Appointment Scheduling',
  environmentId: env.id,
})

Next Steps

Simulators

Learn about individual simulator types and their configuration.

Benchmarks

Define tasks and evaluations for your environments.