Skip to content

YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context

docs: update README and architecture to reflect event-driven capture

Louis Beaumonta469b64de24e
diff --git a/README.md b/README.md
index e806ad7ea..30ff97494 100644
--- a/README.md
+++ b/README.md
@@ -89,9 +89,9 @@ npx screenpipe@latest record
## specs
-- 10% cpu usage
+- 5-10% cpu usage
- 0.5-3gb ram
-- ~15gb storage/month
+- ~5-10gb storage/month
- works offline
- optional encrypted device sync
@@ -135,12 +135,12 @@ screenpipe is an open source application (MIT license) that continuously capture
| Windows 10/11 | ✅ Full support | Native .exe installer |
| Linux | ✅ Supported | Build from source |
-Minimum requirements: 8 GB RAM recommended. ~5–10 GB disk space per month of continuous recording. CPU usage typically 5–15% on modern hardware.
+Minimum requirements: 8 GB RAM recommended. ~5–10 GB disk space per month. CPU usage typically 5–10% on modern hardware thanks to event-driven capture.
## Core features
-### Screen recording with OCR
-Captures all connected monitors simultaneously at configurable intervals. Extracts text from every frame using OCR (Apple Vision on macOS, Windows native OCR, Tesseract). Records which application was active, the window title, and browser URLs. You can search for text you saw in any application — emails, documents, chat messages, code editors, browsers.
+### Event-driven screen capture
+Instead of recording every second, screenpipe listens for meaningful events — app switches, clicks, typing pauses, scrolling — and captures a screenshot only when something actually changes. Each capture pairs a screenshot with the accessibility tree (the structured text the OS already knows about: buttons, labels, text fields). If accessibility data isn't available (e.g. remote desktops, games), it falls back to OCR. This gives you maximum data quality with minimal CPU and storage — no more processing thousands of identical frames.
### Audio transcription
Captures system audio (what you hear) and microphone input (what you say). Real-time speech-to-text using OpenAI Whisper running locally on your device. Speaker identification and diarization. Works with any audio source — Zoom, Google Meet, Teams, or any other application.
@@ -210,10 +210,10 @@ On supported Macs, screenpipe uses Apple Intelligence for on-device AI processin
## Technical architecture
-1. **Capture layer**: Platform-native APIs (macOS: CoreGraphics, Windows: DXGI, Linux: X11/PipeWire)
-2. **Processing layer**: OCR via Apple Vision / Windows OCR / Tesseract. Audio via Whisper (local) or Deepgram (cloud).
-3. **Storage layer**: Local SQLite database with FTS5 full-text search. Frames as compressed images on disk.
-4. **API layer**: REST API on localhost:3030. Search, frames, audio, health, pipe management.
+1. **Event-driven capture**: Listens for OS events (app switch, click, typing pause, scroll, clipboard). When something meaningful happens, captures a screenshot + accessibility tree together with the same timestamp. Falls back to OCR when accessibility data isn't available. Idle fallback captures periodically when nothing is happening.
+2. **Audio processing**: Whisper (local) or Deepgram (cloud) for speech-to-text. Speaker identification and diarization.
+3. **Storage**: Local SQLite with FTS5 full-text search. Screenshots saved as JPEGs on disk (~300 MB/8hr vs ~2 GB with continuous recording).
+4. **API layer**: REST API on localhost:3030. Search, frames, audio, elements, health, pipe management.
5. **Plugin layer**: Pipes — scheduled AI agents as markdown files. Agent executes prompts with access to screenpipe API.
6. **UI layer**: Desktop app built with Tauri (Rust + TypeScript).
@@ -250,10 +250,10 @@ The core engine is open source (MIT license). The desktop app is a one-time life
No. All data is stored locally by default. You can use fully local AI models via Ollama for complete privacy.
**How much disk space does it use?**
-~5–10 GB per month of continuous recording. Configurable retention periods.
+~5–10 GB per month. Event-driven capture only stores frames when something changes, dramatically reducing storage compared to continuous recording.
**Does it slow down my computer?**
-Typical CPU usage is 5–15% on modern hardware. Adjustable capture intervals.
+Typical CPU usage is 5–10% on modern hardware. Event-driven capture only processes frames when something changes, and accessibility tree extraction is much lighter than OCR.
**Can I use it with ChatGPT/Claude/Cursor?**
Yes. screenpipe runs as an MCP server, allowing Claude Desktop, Cursor, and other AI assistants to directly query your screen history.
@@ -261,8 +261,8 @@ Yes. screenpipe runs as an MCP server, allowing Claude Desktop, Cursor, and othe
**Can it record multiple monitors?**
Yes. screenpipe captures all connected monitors simultaneously.
-**What OCR engines are supported?**
-macOS: Apple Vision (native, best quality), Tesseract. Windows: Windows native OCR, Tesseract. Linux: Tesseract.
+**How does text extraction work?**
+screenpipe primarily uses the OS accessibility tree to get structured text (buttons, labels, text fields) — this is faster and more accurate than OCR. When accessibility data isn't available (remote desktops, games, some Linux apps), it falls back to OCR: Apple Vision on macOS, Windows native OCR, or Tesseract on Linux.
## Company
diff --git a/docs/mintlify/docs-mintlify-mig-tmp/architecture.mdx b/docs/mintlify/docs-mintlify-mig-tmp/architecture.mdx
index 3f9df2285..75fc5f382 100644
--- a/docs/mintlify/docs-mintlify-mig-tmp/architecture.mdx
+++ b/docs/mintlify/docs-mintlify-mig-tmp/architecture.mdx
@@ -1,52 +1,57 @@
---
title: "architecture"
sidebarTitle: "architecture"
-description: "How screenpipe captures screens, processes OCR, stores data locally in SQLite, and provides APIs for AI."
+description: "How screenpipe uses event-driven capture, accessibility tree extraction, and OCR fallback to build a searchable local memory."
icon: "sitemap"
---
## overview
-screenpipe is a Rust application that continuously captures your screen and audio, processes them locally, and stores everything in a SQLite database. it serves a REST API on `localhost:3030` for querying your data.
+screenpipe is a Rust application that captures your screen and audio using an event-driven architecture, processes them locally, and stores everything in a SQLite database. instead of recording every second, it listens for meaningful OS events and captures only when something actually changes — pairing each screenshot with accessibility tree data for maximum quality at minimal cost.
```mermaid
graph LR
- subgraph capture["capture"]
- S[screen]
- A[audio]
- U[UI events]
+ subgraph trigger["event triggers"]
+ E1[app switch]
+ E2[click / scroll]
+ E3[typing pause]
+ E4[idle timer]
end
- subgraph process["processing"]
- OCR[OCR]
+ subgraph capture["paired capture"]
+ SS[screenshot]
+ A11Y[accessibility tree]
+ OCR[OCR fallback]
+ end
+
+ subgraph audio["audio"]
+ MIC[microphone]
+ SYS[system audio]
STT[speech-to-text]
- SID[speaker ID]
end
subgraph store["storage"]
DB[(SQLite)]
- FS[media files]
+ FS[JPEG files]
end
subgraph serve["API · localhost:3030"]
REST[REST API]
MCP[MCP server]
- WS[WebSocket]
end
- S --> OCR
- A --> STT
- A --> SID
- U --> DB
-
+ E1 & E2 & E3 & E4 --> SS
+ SS --> A11Y
+ A11Y -->|empty?| OCR
+ A11Y --> DB
OCR --> DB
- STT --> DB
- S --> FS
- A --> FS
+ SS --> FS
+
+ MIC & SYS --> STT --> DB
DB --> REST
DB --> MCP
- FS --> WS
+ FS --> REST
REST --> P[pipes / AI agents]
MCP --> AI[Claude · Cursor · etc.]
@@ -56,22 +61,28 @@ graph LR
```mermaid
sequenceDiagram
- participant Screen
+ participant OS as OS Events
+ participant Capture
+ participant A11Y as Accessibility
+ participant OCR as OCR (fallback)
participant Audio
- participant OCR/STT
participant SQLite
participant API
participant AI
- loop every frame (1 FPS)
- Screen->>OCR/STT: frame
- OCR/STT->>SQLite: extracted text + metadata
- Screen->>SQLite: MP4 recording
+ OS->>Capture: meaningful event (click, app switch, typing pause...)
+ Capture->>Capture: screenshot
+ Capture->>A11Y: walk accessibility tree
+ alt accessibility data available
+ A11Y->>SQLite: structured text + metadata
+ else accessibility empty (remote desktop, games)
+ A11Y->>OCR: fallback
+ OCR->>SQLite: extracted text + metadata
end
+ Capture->>SQLite: JPEG frame
loop every 30s chunk
- Audio->>OCR/STT: audio chunk
- OCR/STT->>SQLite: transcription + speaker
+ Audio->>SQLite: transcription + speaker
Audio->>SQLite: audio file
end
@@ -114,23 +125,36 @@ graph TD
## layers
-### 1. capture
+### 1. event-driven capture
+
+screenpipe listens for meaningful OS events instead of polling at a fixed FPS. when an event fires, it captures a screenshot and walks the accessibility tree together — same timestamp, same frame.
+
+| trigger | description |
+|---------|-------------|
+| **app switch** | user switched to a different application |
+| **window focus** | a new window gained focus |
+| **click / scroll** | user interacted with the UI |
+| **typing pause** | user stopped typing (debounced) |
+| **clipboard copy** | content copied to clipboard |
+| **idle fallback** | periodic capture every ~5s when nothing is happening |
| what | how | crate |
|------|-----|-------|
-| **screen** | per-monitor frame capture at configurable FPS (default 1.0, macOS 0.5) | `screenpipe-vision` |
+| **screen** | event-triggered screenshot of the active monitor | `screenpipe-vision` |
+| **text extraction** | accessibility tree walk (structured text: buttons, labels, fields) | `screenpipe-accessibility` |
+| **OCR fallback** | when accessibility data is empty (remote desktops, games, some Linux apps) | `screenpipe-vision` |
| **audio** | multiple input/output devices in configurable chunks (default 30s) | `screenpipe-audio` |
-| **UI events** | keyboard, mouse, app switches, clipboard via accessibility APIs | `screenpipe-accessibility` |
### 2. processing
-| engine | type | platform |
-|--------|------|----------|
-| Apple Vision | OCR | macOS |
-| Windows native | OCR | Windows |
-| Tesseract | OCR | Linux |
-| Whisper | speech-to-text | local, all platforms |
-| Deepgram | speech-to-text | cloud API |
+| engine | type | platform | when used |
+|--------|------|----------|-----------|
+| accessibility tree | text extraction | macOS, Windows | primary — used for every capture |
+| Apple Vision | OCR | macOS | fallback when accessibility is empty |
+| Windows native | OCR | Windows | fallback when accessibility is empty |
+| Tesseract | OCR | Linux | primary (accessibility support varies) |
+| Whisper | speech-to-text | local, all platforms | audio transcription |
+| Deepgram | speech-to-text | cloud API | optional cloud audio |
additional processing: speaker identification, PII redaction, frame deduplication (skips identical frames).
@@ -138,8 +162,8 @@ additional processing: speaker identification, PII redaction, frame deduplicatio
all data stays local on your machine:
-- **SQLite** at `~/.screenpipe/db.sqlite` — metadata, OCR text, transcriptions, speakers, tags
-- **media** at `~/.screenpipe/data/` — MP4 screen recordings, audio chunks
+- **SQLite** at `~/.screenpipe/db.sqlite` — metadata, accessibility text, OCR text, transcriptions, speakers, tags, UI elements
+- **media** at `~/.screenpipe/data/` — JPEG screenshots (event-driven frames), audio chunks
### 4. API
@@ -147,9 +171,11 @@ REST API on `localhost:3030`:
| endpoint | description |
|----------|-------------|
-| `/search` | filtered content retrieval (OCR, audio, UI events) |
+| `/search` | filtered content retrieval (OCR, audio, accessibility) |
| `/search/keyword` | keyword search with text positions |
+| `/elements` | lightweight UI element search (accessibility tree data) |
| `/frames/{id}` | access captured frames |
+| `/frames/{id}/context` | accessibility text + URLs + OCR fallback for a frame |
| `/health` | system status and metrics |
| `/raw_sql` | direct database queries |
| `/ai/chat/completions` | Apple Intelligence (macOS 26+) |
@@ -196,9 +222,9 @@ key tables:
| table | stores |
|-------|--------|
-| `frames` | captured screen frame metadata |
-| `ocr_text` | text extracted from frames |
-| `video_chunks` | video recording file metadata |
+| `frames` | captured screen frame metadata (includes `snapshot_path`, `accessibility_text`, `capture_trigger`) |
+| `ocr_text` | OCR fallback text extracted from frames |
+| `elements` | UI elements from accessibility tree (buttons, labels, text fields) with FTS5 search |
| `audio_chunks` | audio recording metadata |
| `audio_transcriptions` | text from audio |
| `speakers` | identified speakers |
@@ -218,8 +244,8 @@ runs 24/7 on a MacBook Pro M3 (32 GB) or a $400 Windows laptop:
| metric | typical value |
|--------|---------------|
| RAM | ~600 MB |
-| CPU | ~10% |
-| storage | ~30 GB/month at 1 FPS |
+| CPU | ~5-10% |
+| storage | ~5-10 GB/month (event-driven capture only stores frames when something changes) |
## source code