The Two-Plane Model
One rule explains the whole architecture: data lives where it is consumed.Execution stays local
The agent loop runs directly on your machine, isolated by an OS-level sandbox (macOS Seatbelt). Working with local files, driving the browser, and recording the screen never round-trip through the cloud.
Assets stay in the cloud
Skills, experts, and memory have a single source of truth in the cloud — a skill created on the web is instantly available on desktop, and skills distilled on desktop show up on every other device.
Two-Process Architecture
The desktop app is built from two cooperating processes:- Electron main process: windows, browser automation (CDP), computer use, the recording overlay, and other system capabilities
- Python sidecar: runs the full agent loop; only two kinds of cloud communication remain — an entitlement check when a conversation starts (prepare) and a settlement write-back when it ends (finalize)
Local-First Session State
Desktop session history is stored as append-only JSONL files under~/.profy/ on your machine — the single source of truth for conversations:
1
Every turn lands on disk immediately
Each turn (user message, AI reply, tool calls) is written synchronously to a local rollout file. Cross-turn context is rebuilt from local history — cloud hiccups never break your conversation context.
2
Cloud projection with async compensation
After a conversation ends, a “projection” is sent to the cloud for web-side visibility and billing settlement. Failed write-backs are never dropped: they enter a local retry queue with exponential backoff until eventually consistent.
3
The UI reads local disk directly
Session lists and message history are read straight from local disk on desktop — your full history is browsable offline. Cloud sessions are merged into the view, with the local version winning for the same session.
Authentication: Access + Refresh Credentials
Desktop background processes never hold a server-side secret (server secrets never leave the datacenter). Instead they use the same dual-credential model as leading desktop clients:- Session token = refresh credential: captured at login, revocable server-side at any time, only ever touches the mint endpoint
- JWT = access credential: stateless and verifiable, used on every business-call hot path
The Record → Skill → Replay Loop
A capability loop unique to the desktop:1
Record
Start recording and system-level event capture logs your workflow (clicks, typing, navigation). Recording data stays local.
2
Distill into a skill
Stopping the recording automatically triggers AI analysis: it parses the event stream, extracts intent, and saves a structured skill to your cloud skill library — instantly available on all devices.
3
Replay
Activate the skill in a new conversation and the AI reproduces the workflow through browser automation (trusted input events) and computer use, verifying the result after each step.

