Skip to main content
Every Simplex workflow goes through two phases: build and run.

1. Build in the Editor

You start by providing a URL and test data — the form data the agent will use to fill fields. The Simplex agent navigates the form, writing and executing Python scripts to fill fields, handle dropdowns, click buttons, and move through pages. You guide the agent through chat: “fill out the patient demographics,” “handle the California-specific fields,” “scrape the confirmation number.” As you edit, Simplex continuously builds a deterministic flow.py production file from your conversation. Branching logic is automatically inferred — if you test different form paths with different test data, conditional branches are created in the production code. A variables schema is generated based on the shape of your test data, and you can define structured outputs that the workflow should return (approval status, reference numbers, etc.).

2. Run in Production

Production workflows execute the generated Python code — no LLM inference needed. This makes runs fast, cheap, and deterministic: same inputs produce the same outputs. Trigger runs via the REST API or SDKs (TypeScript, Python). Pass variables (your form data), get back structured outputs, files, and replay videos. Workflows can pause for human review before sensitive actions like form submission. Monitor execution via webhooks or polling.
import { SimplexClient } from 'simplex-ts';

const client = new SimplexClient({
  apiKey: process.env.SIMPLEX_API_KEY
});

const result = await client.workflows.run('workflow-id', {
  variables: {
    patient_name: 'Jane Smith',
    date_of_birth: '1985-03-15',
    insurance_provider: 'Blue Cross',
    policy_number: 'BCB-9876543',
    procedure_code: '99213'
  }
});

// Poll for completion
let status;
do {
  status = await client.getSessionStatus(result.session_id);
  if (status.in_progress) await new Promise(r => setTimeout(r, 5000));
} while (status.in_progress);

if (status.success) {
  console.log('Structured output:', status.structured_output);
  // e.g. { authorization_number: "AUTH-2024-78901", status: "APPROVED" }
}