Every time Ghostly completes an assisted run successfully, it has learned something valuable: the exact sequence of browser actions that achieves a given goal on a specific application. Assist Memory is the system that captures this knowledge and puts it to work on future runs. Instead of asking the LLM to plan the entire flow from scratch each time, Ghostly seeds the planner with the steps that worked last time — turning what was once a multi-horizon planning exercise into a near-instant replay that only falls back to AI planning when the remembered flow breaks.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.
Three Memory Modes
ThememoryMode field controls how aggressively Ghostly persists and reuses learned flows:
- off
- runtime
- adaptive (default)
Memory is completely disabled. Every run starts from scratch — the strategist plans the full flow from the initial page snapshot with no prior knowledge. Use this when you explicitly want the AI to explore the application without any bias from past runs, or when testing that a UI change is reflected in new plans.
How Memory Is Persisted
After a run completes withstatus: "pass", the API checks whether memoryMode is not "off" and then upserts the learned flow into the database:
UNIQUE constraint on (userId, project, baseUrl, goal) — so each unique combination of user, project, URL, and goal has at most one memory entry. When a new passing run arrives, the stored steps are overwritten with the freshest successful flow.
The assist_memories Database Table
hits counter increments every time a memory entry is loaded for replay. This makes it easy to identify the most frequently reused flows and to monitor memory health over time.
How Replay Works at Runtime
When a run starts withmemoryMode: "adaptive", the API looks up existing memory before launching the browser:
Memory Lookup
getAssistMemory({ userId, project, baseUrl, goal }) queries the assist_memories table. If no entry exists, the lookup returns an empty array.Seed Injection
If steps are found, they are passed into the assisted run input as
seedMemorySteps and replayFromMemory: true. The pipeline treats these as the initial pendingSteps queue rather than the seed goto step.Memory Hit or Miss Event
The pipeline emits either a
memory_hit event (with candidates count and source: "durable") or a memory_miss event. Both are visible in the live event stream and stored in the run’s event log.Replay Execution
The replayed steps execute exactly as they did in the original successful run. If a step fails (because the UI changed), the healer activates and self-healing begins — effectively updating the remembered flow in real time. The new successful steps are written back on the next pass.
Memory Hit and Miss Events
Sanitization Rules
Before a flow is stored,sanitizeMemorySteps() applies two filters:
- No
[REDACTED]values — fill steps where the value was redacted (e.g. passwords) are excluded to avoid storing useless placeholders that would break replays. - Deduplication and size cap — identical consecutive steps are collapsed and at most 40 steps are stored per memory entry.