Docs · 07
How Twinly executes
Twinly does not throw every task at an AI model. It tries cheap, certain steps first and only spends a model on what genuinely needs reasoning. Each layer falls through to the next on a miss, and the whole thing sits on a memory that keeps learning who you are. That is why it gets more reliable and cheaper the more you use it.
01The idea: cheap and certain first
Most AI assistants answer every request by calling a large model, even when the answer is obvious and fixed. That is slow, costly, and unpredictable. Twinly inverts it: a task drops through several layers, fastest and most certain first, and only reaches the model if nothing simpler can do the job.
- Recipe — a built-in, hard-coded operation for common web actions, zero AI cost.
- Learned Pathway — a sequence of steps the twin learned from a past run and now replays, zero AI cost, self-healing.
- Full AI run — the twin reasons through a genuinely new task, and its success teaches the layers above.
Two more things sit alongside this sequence: targeting (how every step finds the right thing on screen) and verification (how the twin confirms an action actually happened). Underneath all of it is memory, fed into every run. All covered below.
02Recipes (built-in, zero cost)
A recipe is a hand-built operation for web actions whose path is one hundred percent stable, a site search through its standard search box (Google, Reddit, YouTube, Amazon, eBay, Wikipedia, GitHub, Stack Overflow, Maps) or a direct open (Gmail, Calendar, Drive, LinkedIn, and more). For these there is nothing to infer, so the twin goes straight there with no AI call at all.
The matcher is deliberately careful: it only fires when it is confident, so a nuanced request is never hijacked by a recipe that half-fits. And it composes: a simple navigate or search finishes right there, but if your request has a follow-on (text it to me, save the top five to a sheet), the recipe just opens the right page and hands off to the layers below to finish the job.
03Learned Pathways (it learns your recurring tasks)
After the twin completes a task by driving your apps, it quietly records the sequence of steps as a reusable Pathway. Anything that came from your wording becomes a fill-in-the-blank placeholder, anything secret is dropped, and commit buttons (Post, Send, Buy) are kept exactly as written so they can never be silently skipped on replay.
The next time a matching task arrives, the twin replays the saved steps instead of re-figuring it out with the model. That is the honest framing: it learns your recurring tasks and replays them. It is not magic, and it does not claim to work every time.
It self-heals
- A new Pathway is treated as still learning until a clean replay proves it trusted.
- A single failed replay drops it straight back to learning.
- If anything drifts mid-replay, it stops and falls through to a full AI run, which recovers the task and re-records a corrected version.
04On-screen targeting (finding things by name)
This is how every step actually finds things on screen without guessing pixel coordinates. The model names a target by its visible label (the Send button, the search field), and the engine resolves the real location locally, or honestly reports that nothing matched.
- First it reads the macOS accessibility tree, the most reliable source, because it sees the control the way the system does.
- If that misses, it falls back to on-device text recognition, finding the label as text on the pixels.
It re-checks live on every step, so a window that rearranged itself between steps never causes a stale-coordinate misclick.
05Closed-loop verification (did it actually work?)
After a committing action, the twin does not just take the tool's word that it worked, it checks. A created calendar event is confirmed against your real calendar, a sent Gmail is confirmed in your Sent box, a written file is confirmed to exist with the right content. This kills the it said it did it but it didn't failure that plagues other agents.
When a check proves something did not happen, the twin tells you honestly (couldn't confirm it went through, check before relying on it) rather than reporting a false success. When a check simply cannot verify (some actions cannot be checked deterministically), it reports exactly what the tool said, never downgrading on a check that itself failed.
06The AI model, for the genuinely new
When no recipe and no trusted pathway matches, the full agent runs on your chosen model (see Powering your twin). This is the only layer that spends real money, and it is reserved for genuinely novel or multi-step reasoning. Its successful runs feed back up the stack: a new task becomes a learned pathway, so the next similar task is cheaper and more certain.
07In one line
Twinly tries a built-in recipe (free), then replays a path it learned from you (free, self-healing), finds on-screen targets by name instead of guessing pixels, verifies that committing actions really happened, and only calls an AI model for the genuinely new, while continuously learning your preferences.