In standard mode you write every step yourself —Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Meza-dev/Ghostly/llms.txt
Use this file to discover all available pages before exploring further.
goto, click, fill, and so on. Assisted mode flips this around: you describe what you want the browser to accomplish in plain English, and Ghostly’s AI pipeline plans and executes the steps on your behalf. The AI observes the live page after every action, adapts its plan when something unexpected appears, and keeps running until it achieves your stated goal or hits a configurable time/horizon limit.
Two Generations of Assisted Mode
Ghostly has shipped two versions of the assisted pipeline. Only v2 is actively developed and recommended for new projects.| v1 | v2 | |
|---|---|---|
| Planning strategy | Single-shot: generate all steps upfront | Horizon-based: plan a small batch, execute, observe, repeat |
| Adaptation | None — plan is fixed | Re-plans after failures; evaluates victory after each horizon |
| Self-healing | No | Yes — up to maxHealingAttemptsPerStep per step |
| Memory | No | Yes — adaptive, runtime, or off |
| Field | assisted metadata only | assist.v2: true with full config object |
How v2 Works: The Horizon Loop
The v2 pipeline is a loop that alternates between planning and executing phases, called horizons. Each horizon covers a small window of steps determined bystepsPerHorizon.
Initial Recon
Ghostly navigates to
baseUrl and captures the page’s accessibility tree via the Observer. This snapshot — URL, page title, visible controls, form inputs, and dialog state — is sent to the Strategist as context. A recon event is emitted.Plan a Horizon
The Strategist (an LLM-backed function) receives the goal, the current snapshot, the execution history so far, and the
victory conditions. It returns up to stepsPerHorizon steps as a PlannedChunk. Ghostly emits a plan_chunk event.Execute Steps
Each step in the horizon is run one by one using Playwright. After each successful step, the Observer captures a fresh snapshot. If a step fails and
maxHealingAttemptsPerStep > 0, the Healer agent attempts to recover it before moving on.Check Victory
After every step (and again at the end of each horizon), Ghostly evaluates the configured victory conditions against the current URL, page text, and visible selectors. If all configured conditions are met, the run is marked
pass and the loop exits.Victory Conditions
Victory conditions tell Ghostly when to stop and declare success. They are evaluated after every executed step and at the end of each horizon.textIncludes
The page body, title, or accessibility tree must contain each supplied string (case-insensitive).
selectorVisible
Each CSS selector (or natural-language phrase) must resolve to a visible element. Supports Playwright selectors and plain text descriptions.
urlIncludes
The current page URL must contain each string (case-insensitive substring match).
mustAll
When
true, every condition group must pass. When false (default), any single passing group triggers victory.Key Run Parameters
Allassist parameters are sent inside the assist field of the run body alongside the standard baseUrl, project, and steps fields.
Triggering an Assisted v2 Run
The following example shows how to kick off a v2 assisted run using the Ghostly REST API. Thesteps array provides the initial navigation seed; the AI expands the plan from there.
Assisted mode requires a configured LLM provider. If no provider is available, the API returns
409 assist v2 deshabilitado. Run ghostly config or set the ASSIST_LLM_PROVIDER environment variable before using assisted mode.