Skip to main content
This tutorial builds a provider search tool for Grow Therapy — a therapy marketplace that handles insurance credentialing for providers. We combine structured output with saved scripts to build a fast, repeatable search pipeline.

What you’ll build

A script that:
  1. Searches Grow Therapy’s provider directory with filters (location, insurance, specialty)
  2. Extracts therapist profiles with ratings and availability
  3. Caches a successful search flow for reruns with different locations and specialties

Setup

1. Define the output schema

2. Create a workspace

3. Search for providers

This tutorial uses API V3 automatic script caching. Mark changing values with @{{value}}; plain {{value}} does not activate caching. Keep the rest of the task text and the workspace unchanged so later requests can find the same cached script. The first successful generation uses the agent and incurs normal usage charges.

4. Sweep across locations and specialties

After a successful first run caches the search flow, change only the marked values. A successful cached script execution avoids agent LLM inference, but browser and network usage still apply. Cache misses, validation, and automatic repair can invoke the agent and incur LLM charges; a rerun is not a guarantee of zero LLM cost.

Summary

Therapy platforms have dynamic UIs that can change frequently. V3 can automatically repair a cached flow when it fails. For new V4 integrations, use saved scripts; the V3 @{{value}} convention is specific to this tutorial’s API version.

Next steps

  • Structured output — Learn more about extracting typed data with Pydantic and Zod schemas.
  • Human in the loop — Let a human review or interact with the browser mid-task, useful for auth flows or approving results before continuing.
  • Scripts — Save, reuse, and repair browser workflows.