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
Rust agentsagiaiai-memoryaudio-recordingcomputer-visionhermeshermes-agentllmlocal-ailocal-firstmachine-learningmcpmultimodalopenclawprivacyrewindscreen-recordingspeech-to-textycombinator
fix: wire pipe manager into embedded server, fix open folder button, add pipes docs
Louis Beaumontffc0f631db53
diff --git a/apps/screenpipe-app-tauri/components/settings/pipes-section.tsx b/apps/screenpipe-app-tauri/components/settings/pipes-section.tsxindex 06aaa8890..7c986341c 100644--- a/apps/screenpipe-app-tauri/components/settings/pipes-section.tsx+++ b/apps/screenpipe-app-tauri/components/settings/pipes-section.tsx@@ -17,8 +17,8 @@ import { Textarea } from "@/components/ui/textarea";import { Input } from "@/components/ui/input";import { Label } from "@/components/ui/label";import { Badge } from "@/components/ui/badge";-import { open } from "@tauri-apps/plugin-shell";import { homeDir, join } from "@tauri-apps/api/path";+import { revealItemInDir } from "@tauri-apps/plugin-opener";interface PipeConfig {name: string;@@ -113,7 +113,7 @@ export function PipesSection() {const openPipesFolder = async () => {const home = await homeDir();const path = await join(home, ".screenpipe", "pipes");- open(path);+ revealItemInDir(path);};const toggleExpand = (name: string) => {diff --git a/apps/screenpipe-app-tauri/src-tauri/Cargo.lock b/apps/screenpipe-app-tauri/src-tauri/Cargo.lockindex fb04f4444..412d5f098 100755--- a/apps/screenpipe-app-tauri/src-tauri/Cargo.lock+++ b/apps/screenpipe-app-tauri/src-tauri/Cargo.lock@@ -8719,7 +8719,7 @@ dependencies = [[[package]]name = "screenpipe-app"-version = "2.0.424"+version = "2.0.426"dependencies = ["anyhow","async-stream",diff --git a/apps/screenpipe-app-tauri/src-tauri/gen/schemas/capabilities.json b/apps/screenpipe-app-tauri/src-tauri/gen/schemas/capabilities.jsonindex ae0b386ad..987ab2d84 100644--- a/apps/screenpipe-app-tauri/src-tauri/gen/schemas/capabilities.json+++ b/apps/screenpipe-app-tauri/src-tauri/gen/schemas/capabilities.json@@ -1 +1 @@-{"migrated":{"identifier":"migrated","description":"permissions that were migrated from v1","remote":{"urls":["http://localhost:*","https://api.openai.com/*","https://*.openai.com/*","https://api.screenpi.pe/*","https://*.anthropic.com/*","https://*.ollama.ai/*","https://*"]},"local":true,"windows":["*"],"permissions":["core:event:allow-listen","core:event:default","core:app:allow-version","process:allow-restart","process:allow-exit","notification:default","core:resources:default","core:menu:default","core:tray:default","shell:default",{"identifier":"shell:allow-open","allow":[{"url":"^https?://.*"},{"url":"^mailto:.*"},{"url":"^tel:.*"},{"url":"^x-apple-reminderkit://.*"}]},"store:default","fs:allow-watch","fs:allow-open","fs:default","fs:allow-read-file","fs:allow-read-dir","fs:allow-read","fs:allow-write-file","fs:read-dirs","fs:allow-copy-file","fs:allow-exists","fs:allow-read-text-file","fs:allow-create","fs:allow-mkdir","fs:allow-remove","global-shortcut:allow-is-registered","global-shortcut:allow-register","global-shortcut:allow-unregister","global-shortcut:allow-unregister-all","global-shortcut:default","sentry:default","opener:allow-open-url","core:window:default","core:window:allow-get-all-windows","core:window:allow-close","core:window:allow-destroy","core:window:allow-start-dragging",{"identifier":"fs:scope","allow":[{"path":"$XDG_DATA_HOME","requireLiteralLeadingDot":false},{"path":"$XDG_DATA_HOME/**","requireLiteralLeadingDot":false},{"path":"$LOCALAPPDATA/*","requireLiteralLeadingDot":false},{"path":"$LOCALAPPDATA/**","requireLiteralLeadingDot":false},{"path":"$APPLOCALDATA/*","requireLiteralLeadingDot":false},{"path":"$APPLOCALDATA/**","requireLiteralLeadingDot":false},{"path":"$APPDATA/*","requireLiteralLeadingDot":false},{"path":"$APPDATA/**","requireLiteralLeadingDot":false},{"path":"$APPCONFIG/*","requireLiteralLeadingDot":false},{"path":"$RESOURCE/*","requireLiteralLeadingDot":false},{"path":"$RESOURCE/.screenpipe/*","requireLiteralLeadingDot":false},{"path":"$HOME/*","requireLiteralLeadingDot":false},{"path":"$HOME/.screenpipe/*","requireLiteralLeadingDot":false},{"path":"$APP/*","requireLiteralLeadingDot":false},{"path":"$HOME/.screenpipe/data/**","requireLiteralLeadingDot":false},{"path":"$HOME/.screenpipe/**","requireLiteralLeadingDot":false},{"path":"$RESOURCE/.screenpipe/**","requireLiteralLeadingDot":false}]},{"identifier":"shell:allow-execute","allow":[{"args":["-c",{"validator":"\\S+"}],"cmd":"sh","name":"exec-sh","sidecar":false}]},{"identifier":"shell:allow-execute","allow":[{"args":true,"cmd":"screenpipe","name":"screenpipe","sidecar":true}]},"cli:default","shell:allow-spawn","dialog:default","updater:default","os:default","os:allow-arch","os:allow-hostname","os:allow-os-type","core:path:default","process:default","core:webview:allow-internal-toggle-devtools","core:webview:allow-create-webview-window",{"identifier":"shell:allow-execute","allow":[{"args":["pipe","list","--output","json"],"cmd":"screenpipe","name":"screenpipe-pipe-list","sidecar":true}]},{"identifier":"shell:allow-execute","allow":[{"args":["pipe","download",{"validator":"\\S+"},"--output","json"],"cmd":"screenpipe","name":"screenpipe-pipe-download","sidecar":true}]},{"identifier":"shell:allow-execute","allow":[{"args":["pipe","enable",{"validator":"\\S+"}],"cmd":"screenpipe","name":"screenpipe-pipe-enable","sidecar":true}]},{"identifier":"shell:allow-execute","allow":[{"args":["pipe","disable",{"validator":"\\S+"}],"cmd":"screenpipe","name":"screenpipe-pipe-disable","sidecar":true}]},{"identifier":"shell:allow-execute","allow":[{"args":["pipe","update",{"validator":"\\S+"},{"validator":"\\{.*\\}"}],"cmd":"screenpipe","name":"screenpipe-pipe-update","sidecar":true}]},{"identifier":"shell:allow-execute","allow":[{"args":["pipe","delete",{"validator":"\\S+"},"--yes"],"cmd":"screenpipe","name":"screenpipe-pipe-delete","sidecar":true}]},{"identifier":"shell:allow-execute","allow":[{"args":["pipe","info",{"validator":"\\S+"},"--output","json"],"cmd":"screenpipe","name":"screenpipe-pipe-info","sidecar":true}]},{"identifier":"http:default","allow":[{"methods":["GET","POST","PUT","DELETE","PATCH","HEAD","OPTIONS"],"url":"http://**/*"},{"methods":["GET","POST","PUT","DELETE","PATCH","HEAD","OPTIONS"],"url":"https://**/*"}]},"deep-link:default","fs:allow-write-text-file",{"identifier":"fs:scope","allow":[{"path":"$APPLOCALDATA"},{"path":"$APPLOCALDATA/**"},{"path":"$TEMP"},{"path":"$TEMP/*"},{"path":"$TEMP/**"}]},"opener:default",{"identifier":"shell:allow-execute","allow":[{"args":true,"cmd":"open","name":"open","sidecar":false}]},{"identifier":"shell:allow-execute","allow":[{"args":true,"cmd":"cmd","name":"cmd","sidecar":false}]}]}}\ No newline at end of file+{"migrated":{"identifier":"migrated","description":"permissions that were migrated from v1","remote":{"urls":["http://localhost:*","https://api.openai.com/*","https://*.openai.com/*","https://api.screenpi.pe/*","https://*.anthropic.com/*","https://*.ollama.ai/*","https://*"]},"local":true,"windows":["*"],"permissions":["core:event:allow-listen","core:event:default","core:app:allow-version","process:allow-restart","process:allow-exit","notification:default","core:resources:default","core:menu:default","core:tray:default","shell:default",{"identifier":"shell:allow-open","allow":[{"url":"^https?://.*"},{"url":"^mailto:.*"},{"url":"^tel:.*"},{"url":"^x-apple-reminderkit://.*"}]},"store:default","fs:allow-watch","fs:allow-open","fs:default","fs:allow-read-file","fs:allow-read-dir","fs:allow-read","fs:allow-write-file","fs:read-dirs","fs:allow-copy-file","fs:allow-exists","fs:allow-read-text-file","fs:allow-create","fs:allow-mkdir","fs:allow-remove","global-shortcut:allow-is-registered","global-shortcut:allow-register","global-shortcut:allow-unregister","global-shortcut:allow-unregister-all","global-shortcut:default","sentry:default",{"identifier":"opener:allow-open-url","allow":[{"url":"^https?://.*"},{"url":"^mailto:.*"},{"url":"^tel:.*"},{"url":"^x-apple-reminderkit://.*"}]},"core:window:default","core:window:allow-get-all-windows","core:window:allow-close","core:window:allow-destroy","core:window:allow-start-dragging",{"identifier":"fs:scope","allow":[{"path":"$XDG_DATA_HOME","requireLiteralLeadingDot":false},{"path":"$XDG_DATA_HOME/**","requireLiteralLeadingDot":false},{"path":"$LOCALAPPDATA/*","requireLiteralLeadingDot":false},{"path":"$LOCALAPPDATA/**","requireLiteralLeadingDot":false},{"path":"$APPLOCALDATA/*","requireLiteralLeadingDot":false},{"path":"$APPLOCALDATA/**","requireLiteralLeadingDot":false},{"path":"$APPDATA/*","requireLiteralLeadingDot":false},{"path":"$APPDATA/**","requireLiteralLeadingDot":false},{"path":"$APPCONFIG/*","requireLiteralLeadingDot":false},{"path":"$RESOURCE/*","requireLiteralLeadingDot":false},{"path":"$RESOURCE/.screenpipe/*","requireLiteralLeadingDot":false},{"path":"$HOME/*","requireLiteralLeadingDot":false},{"path":"$HOME/.screenpipe/*","requireLiteralLeadingDot":false},{"path":"$APP/*","requireLiteralLeadingDot":false},{"path":"$HOME/.screenpipe/data/**","requireLiteralLeadingDot":false},{"path":"$HOME/.screenpipe/**","requireLiteralLeadingDot":false},{"path":"$RESOURCE/.screenpipe/**","requireLiteralLeadingDot":false}]},{"identifier":"shell:allow-execute","allow":[{"args":["-c",{"validator":"\\S+"}],"cmd":"sh","name":"exec-sh","sidecar":false}]},{"identifier":"shell:allow-execute","allow":[{"args":true,"cmd":"screenpipe","name":"screenpipe","sidecar":true}]},"cli:default","shell:allow-spawn","dialog:default","updater:default","os:default","os:allow-arch","os:allow-hostname","os:allow-os-type","core:path:default","process:default","core:webview:allow-internal-toggle-devtools","core:webview:allow-create-webview-window",{"identifier":"shell:allow-execute","allow":[{"args":["pipe","list","--output","json"],"cmd":"screenpipe","name":"screenpipe-pipe-list","sidecar":true}]},{"identifier":"shell:allow-execute","allow":[{"args":["pipe","download",{"validator":"\\S+"},"--output","json"],"cmd":"screenpipe","name":"screenpipe-pipe-download","sidecar":true}]},{"identifier":"shell:allow-execute","allow":[{"args":["pipe","enable",{"validator":"\\S+"}],"cmd":"screenpipe","name":"screenpipe-pipe-enable","sidecar":true}]},{"identifier":"shell:allow-execute","allow":[{"args":["pipe","disable",{"validator":"\\S+"}],"cmd":"screenpipe","name":"screenpipe-pipe-disable","sidecar":true}]},{"identifier":"shell:allow-execute","allow":[{"args":["pipe","update",{"validator":"\\S+"},{"validator":"\\{.*\\}"}],"cmd":"screenpipe","name":"screenpipe-pipe-update","sidecar":true}]},{"identifier":"shell:allow-execute","allow":[{"args":["pipe","delete",{"validator":"\\S+"},"--yes"],"cmd":"screenpipe","name":"screenpipe-pipe-delete","sidecar":true}]},{"identifier":"shell:allow-execute","allow":[{"args":["pipe","info",{"validator":"\\S+"},"--output","json"],"cmd":"screenpipe","name":"screenpipe-pipe-info","sidecar":true}]},{"identifier":"http:default","allow":[{"methods":["GET","POST","PUT","DELETE","PATCH","HEAD","OPTIONS"],"url":"http://**/*"},{"methods":["GET","POST","PUT","DELETE","PATCH","HEAD","OPTIONS"],"url":"https://**/*"}]},"deep-link:default","fs:allow-write-text-file",{"identifier":"fs:scope","allow":[{"path":"$APPLOCALDATA"},{"path":"$APPLOCALDATA/**"},{"path":"$TEMP"},{"path":"$TEMP/*"},{"path":"$TEMP/**"}]},"opener:default",{"identifier":"shell:allow-execute","allow":[{"args":true,"cmd":"open","name":"open","sidecar":false}]},{"identifier":"shell:allow-execute","allow":[{"args":true,"cmd":"cmd","name":"cmd","sidecar":false}]}]}}\ No newline at end of filediff --git a/apps/screenpipe-app-tauri/src-tauri/src/embedded_server.rs b/apps/screenpipe-app-tauri/src-tauri/src/embedded_server.rsindex cf78ea0a4..0d93d9e58 100644--- a/apps/screenpipe-app-tauri/src-tauri/src/embedded_server.rs+++ b/apps/screenpipe-app-tauri/src-tauri/src/embedded_server.rs@@ -578,6 +578,40 @@ pub async fn start_embedded_server(config.video_quality.clone(),);+ // Initialize pipe manager+ let pipes_dir = config.data_dir.join("pipes");+ std::fs::create_dir_all(&pipes_dir).ok();++ let user_token = config.user_id.clone();+ let pi_executor = std::sync::Arc::new(+ screenpipe_core::agents::pi::PiExecutor::new(user_token),+ );+ let mut agent_executors: std::collections::HashMap<+ String,+ std::sync::Arc<dyn screenpipe_core::agents::AgentExecutor>,+ > = std::collections::HashMap::new();+ agent_executors.insert("pi".to_string(), pi_executor.clone());++ let mut pipe_manager =+ screenpipe_core::pipes::PipeManager::new(pipes_dir, agent_executors);+ pipe_manager.install_builtin_pipes().ok();+ if let Err(e) = pipe_manager.load_pipes().await {+ tracing::warn!("failed to load pipes: {}", e);+ }+ if let Err(e) = pipe_manager.start_scheduler().await {+ tracing::warn!("failed to start pipe scheduler: {}", e);+ }+ let shared_pipe_manager = std::sync::Arc::new(tokio::sync::Mutex::new(pipe_manager));+ let server = server.with_pipe_manager(shared_pipe_manager);++ // Install pi agent in background+ tokio::spawn(async move {+ use screenpipe_core::agents::AgentExecutor;+ if let Err(e) = pi_executor.ensure_installed().await {+ tracing::warn!("pi agent install failed: {}", e);+ }+ });+// Bind the HTTP listener BEFORE returning success.// This ensures port conflicts (AddrInUse) are caught and propagated// instead of silently failing in a background task.diff --git a/docs/mintlify/docs-mintlify-mig-tmp/docs.json b/docs/mintlify/docs-mintlify-mig-tmp/docs.jsonindex 6da754a2a..4d3419ee2 100644--- a/docs/mintlify/docs-mintlify-mig-tmp/docs.json+++ b/docs/mintlify/docs-mintlify-mig-tmp/docs.json@@ -27,7 +27,7 @@},{"group": "guides",- "pages": ["mcp-server", "mcp-apps", "cloud-sync"]+ "pages": ["pipes", "mcp-server", "mcp-apps", "cloud-sync"]},{"group": "integrations",diff --git a/docs/mintlify/docs-mintlify-mig-tmp/pipes.mdx b/docs/mintlify/docs-mintlify-mig-tmp/pipes.mdxnew file mode 100644index 000000000..cb3f90b3f--- /dev/null+++ b/docs/mintlify/docs-mintlify-mig-tmp/pipes.mdx@@ -0,0 +1,228 @@+---+title: "pipes"+description: "scheduled AI agents that run on your screen data"+---++## what are pipes?++pipes are automated workflows that run on your screenpipe data at regular intervals. each pipe is a markdown file with a prompt and a schedule. under the hood, screenpipe runs a coding agent (like [pi](https://github.com/mariozechner/pi-coding-agent)) that can query your screen data, call APIs, write files, and take actions.++**a pipe is just one file: `pipe.md`**++```+~/.screenpipe/pipes/+├── daily-journal/+│ └── pipe.md+├── toggl-sync/+│ ├── pipe.md+│ └── .env # secrets (api keys)+└── obsidian-sync/+ └── pipe.md+```++## creating a pipe++create a folder in `~/.screenpipe/pipes/` with a `pipe.md` file:++```bash+mkdir -p ~/.screenpipe/pipes/my-pipe+cat > ~/.screenpipe/pipes/my-pipe/pipe.md << 'EOF'+---+name: my-pipe+schedule: every 30m+lookback: 30m+enabled: true+---++Summarize my screen activity for the last 30 minutes.+Query screenpipe at http://localhost:3030/search.+Write the summary to ./output/{{date}}.md+EOF+```++## pipe.md format++every pipe.md starts with YAML frontmatter between `---` markers, followed by the prompt:++```markdown+---+name: my-pipe+schedule: every 2h+lookback: 2h+enabled: true+agent: pi+model: claude-haiku-4-5@20251001+---++Your prompt goes here. This is what the AI agent will execute.+You can reference screenpipe's API, write files, call external APIs, etc.+```++### frontmatter fields++| field | required | default | description |+|-------|----------|---------|-------------|+| `name` | no | folder name | pipe identifier |+| `schedule` | yes | `manual` | `every 1m`, `every 30m`, `every 2h`, `daily`, `manual` |+| `lookback` | no | matches schedule | how far back to query screen data: `30m`, `2h`, `8h` |+| `enabled` | no | `true` | whether the scheduler runs this pipe |+| `agent` | no | `pi` | which coding agent CLI to use |+| `model` | no | `claude-haiku-4-5@20251001` | which LLM the agent uses |++### template variables++these get replaced in the prompt body before execution:++| variable | example value |+|----------|---------------|+| `{{start_time}}` | `2026-02-11T20:00:00Z` |+| `{{end_time}}` | `2026-02-11T20:30:00Z` |+| `{{date}}` | `2026-02-11` |+| `{{timezone}}` | `PST` |+| `{{timezone_offset}}` | `-08:00` |++## cli commands++```bash+# list all pipes+screenpipe pipe list++# install a pipe from file, folder, or URL+screenpipe pipe install ./my-pipe.md+screenpipe pipe install https://raw.githubusercontent.com/user/repo/main/pipe.md++# enable/disable+screenpipe pipe enable my-pipe+screenpipe pipe disable my-pipe++# run once manually+screenpipe pipe run my-pipe++# view run history+screenpipe pipe logs my-pipe++# delete+screenpipe pipe delete my-pipe+```++## http api++when screenpipe is running, pipes are also manageable via the local API:++```bash+# list all pipes+curl http://localhost:3030/pipes++# run a pipe+curl -X POST http://localhost:3030/pipes/my-pipe/run++# enable/disable+curl -X POST http://localhost:3030/pipes/my-pipe/enable \+ -H "Content-Type: application/json" \+ -d '{"enabled": true}'++# view logs+curl http://localhost:3030/pipes/my-pipe/logs++# install from URL+curl -X POST http://localhost:3030/pipes/install \+ -H "Content-Type: application/json" \+ -d '{"source": "https://example.com/pipe.md"}'+```++## app ui++go to **settings → pipes** to see all installed pipes, toggle them on/off, run them manually, and view logs.++## examples++### time tracking (toggl)++```markdown+---+name: toggl-sync+schedule: every 1m+lookback: 2m+enabled: true+---++You automatically update my Toggl time tracking based on screen activity.++1. Query screenpipe: curl "http://localhost:3030/search?content_type=ocr&limit=20&start_time={{start_time}}&end_time={{end_time}}"+2. Read API key: source .env+3. Check current Toggl timer+4. If activity changed, stop old timer and start new one+5. If activity matches, do nothing++Activity rules:+- VSCode/Cursor/Terminal → "coding"+- Chrome with GitHub → "code review"+- Slack/Discord → "communication"+- Zoom/Meet → "meeting"+```++### daily journal (obsidian)++```markdown+---+name: daily-journal+schedule: every 2h+lookback: 2h+enabled: true+---++Summarize my screen activity into a daily journal entry.+Query screenpipe at http://localhost:3030/search.+Write to ~/obsidian-vault/screenpipe/{{date}}.md+Use [[wiki-links]] for people and projects.+Include timeline deep links: [time](screenpipe://timeline?timestamp=ISO8601)+```++### standup report++```markdown+---+name: standup+schedule: daily+lookback: 8h+enabled: true+---++Generate a standup report from yesterday's screen activity.+Format: what I did, what I'm doing, blockers.+Write to ./output/{{date}}.md+```++## secrets++store API keys in `.env` files inside the pipe folder:++```bash+echo "TOGGL_API_KEY=your_key_here" > ~/.screenpipe/pipes/toggl-sync/.env+```++the pipe prompt can reference them: `source .env && curl -u $TOGGL_API_KEY:api_token ...`++**never put secrets in pipe.md** — the prompt may be visible in logs.++## architecture++```+pipe.md (prompt + config)+ → pipe manager (parses frontmatter, schedules runs)+ → agent executor (pi, claude-code, etc.)+ → agent queries screenpipe API + executes actions+ → output saved to pipe folder+```++- **agent ≠ model**: the agent is the CLI tool (pi, claude-code). the model is the LLM (haiku, opus, llama).+- **one pipe runs at a time** (global semaphore prevents overlap)+- **lookback capped at 8h** to prevent context overflow+- **logs saved** to `~/.screenpipe/pipes/{name}/logs/` as JSON++## built-in pipes++screenpipe ships with two template pipes (disabled by default):++- **obsidian-sync** — sync screen activity to obsidian vault+- **reminders** — scan activity for todos and create apple reminders