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
feat: connections skill for progressive discovery, remove hardcoded context injection
Louis Beaumont40b8ffdfb6aa
diff --git a/apps/screenpipe-app-tauri/src-tauri/src/embedded_server.rs b/apps/screenpipe-app-tauri/src-tauri/src/embedded_server.rsindex 5683b1082..a26f9ee1d 100644--- a/apps/screenpipe-app-tauri/src-tauri/src/embedded_server.rs+++ b/apps/screenpipe-app-tauri/src-tauri/src/embedded_server.rs@@ -436,13 +436,6 @@ pub async fn start_embedded_server(if let Some(cb) = on_pipe_output {pipe_manager.set_on_output_line(cb);}- // Inject connected integrations context into pipe prompts- let connections_ctx = screenpipe_integrations::connections::render_context(- &local_data_dir,- config.port,- );- pipe_manager.set_extra_context(connections_ctx);-pipe_manager.install_builtin_pipes().ok();if let Err(e) = pipe_manager.load_pipes().await {tracing::warn!("failed to load pipes: {}", e);diff --git a/crates/screenpipe-core/assets/skills/screenpipe-connections/SKILL.md b/crates/screenpipe-core/assets/skills/screenpipe-connections/SKILL.mdnew file mode 100644index 000000000..29540e120--- /dev/null+++ b/crates/screenpipe-core/assets/skills/screenpipe-connections/SKILL.md@@ -0,0 +1,101 @@+---+name: screenpipe-connections+description: Manage the user's connected integrations (Telegram, Slack, Discord, Email, Todoist, Teams). Use when the user wants to send messages, create tasks, or interact with any connected service. Query the connections API to discover which services are connected and get their credentials.+---++# Screenpipe Connections++The user can connect external services (Telegram, Slack, Discord, Email, Todoist, Microsoft Teams) through Screenpipe's connections system. Credentials are stored locally at `~/.screenpipe/connections.json`.++The API runs at `http://localhost:3030/connections`.++## List all connections++```bash+curl http://localhost:3030/connections+```++Returns all available integrations and whether they are connected:++```json+{+ "data": [+ { "id": "telegram", "name": "Telegram", "connected": true, ... },+ { "id": "slack", "name": "Slack", "connected": false, ... }+ ]+}+```++## Get saved credentials for a connection++```bash+curl http://localhost:3030/connections/telegram+```++Returns:++```json+{+ "credentials": {+ "bot_token": "123456:ABC-DEF...",+ "chat_id": "5776185278"+ }+}+```++## How to use connected services++Once you have the credentials from the API, use them directly:++### Telegram+```bash+BOT_TOKEN="<from credentials>"+CHAT_ID="<from credentials>"+curl -X POST "https://api.telegram.org/bot${BOT_TOKEN}/sendMessage" \+ -H "Content-Type: application/json" \+ -d "{\"chat_id\": \"${CHAT_ID}\", \"text\": \"Hello from Screenpipe!\"}"+```++### Slack+```bash+WEBHOOK_URL="<from credentials>"+curl -X POST "$WEBHOOK_URL" \+ -H "Content-Type: application/json" \+ -d '{"text": "Hello from Screenpipe!"}'+```++### Discord+```bash+WEBHOOK_URL="<from credentials>"+curl -X POST "$WEBHOOK_URL" \+ -H "Content-Type: application/json" \+ -d '{"content": "Hello from Screenpipe!"}'+```++### Email (SMTP)+Credentials: `smtp_host`, `smtp_port`, `smtp_user`, `smtp_pass`, `from_address`.+Use curl or a script to send via SMTP.++### Todoist+```bash+API_TOKEN="<from credentials>"+curl -X POST "https://api.todoist.com/rest/v2/tasks" \+ -H "Authorization: Bearer ${API_TOKEN}" \+ -H "Content-Type: application/json" \+ -d '{"content": "Task from Screenpipe"}'+```++### Microsoft Teams+```bash+WEBHOOK_URL="<from credentials>"+curl -X POST "$WEBHOOK_URL" \+ -H "Content-Type: application/json" \+ -d '{"text": "Hello from Screenpipe!"}'+```++## Workflow++1. First, call `GET /connections` to see which services are connected+2. For any connected service, call `GET /connections/:id` to get credentials+3. Use the credentials directly to interact with the service's API+4. If a service is not connected, tell the user to connect it in Settings > Connectionsdiff --git a/crates/screenpipe-server/src/bin/screenpipe-server.rs b/crates/screenpipe-server/src/bin/screenpipe-server.rsindex 465695b32..ada1f4267 100644--- a/crates/screenpipe-server/src/bin/screenpipe-server.rs+++ b/crates/screenpipe-server/src/bin/screenpipe-server.rs@@ -740,12 +740,6 @@ async fn main() -> anyhow::Result<()> {analytics::capture_event_nonblocking("pipe_scheduled_run", props);},));- // Inject connected integrations context into pipe prompts- let connections_ctx = screenpipe_integrations::connections::render_context(- &local_data_dir,- config.port,- );- pipe_manager.set_extra_context(connections_ctx);pipe_manager.install_builtin_pipes().ok();if let Err(e) = pipe_manager.load_pipes().await {tracing::warn!("failed to load pipes: {}", e);