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

fix: keep minimal API hint for local models (Ollama/custom)

Louis Beaumont6d1d507f8d2a
diff --git a/apps/screenpipe-app-tauri/src-tauri/src/pi.rs b/apps/screenpipe-app-tauri/src-tauri/src/pi.rs
index 831f45e1c..8e67fe845 100644
--- a/apps/screenpipe-app-tauri/src-tauri/src/pi.rs
+++ b/apps/screenpipe-app-tauri/src-tauri/src/pi.rs
@@ -1213,6 +1213,22 @@ pub async fn pi_start_inner(
}
}
+ // For local/small models (Ollama, custom), inject minimal API context directly
+ // because they often skip reading skill files.
+ // Auth details are in the skill file — this just gives them enough to make a call.
+ let is_local_model = matches!(pi_provider.as_str(), "ollama" | "custom");
+ if is_local_model {
+ let api_hint = concat!(
+ "You have access to the Screenpipe API at http://localhost:3030.\n",
+ "Auth: add -H \"Authorization: Bearer $SCREENPIPE_LOCAL_API_KEY\" to ALL curl requests.\n",
+ "Search: curl -H \"Authorization: Bearer $SCREENPIPE_LOCAL_API_KEY\" ",
+ "\"http://localhost:3030/search?content_type=all&limit=10&start_time=1h%20ago\"\n",
+ "Params: q, content_type (all|ocr|audio), limit (1-20), start_time (REQUIRED, ISO 8601 or relative like '2h ago').\n",
+ "Read the screenpipe-api skill file for full docs."
+ );
+ cmd.args(["--append-system-prompt", api_hint]);
+ }
+
// Append the user's AI preset system prompt (enables Anthropic prompt caching —
// Pi's built-in system prompt + this text form the cached prefix, reducing
// input costs by 90% on subsequent messages in the same conversation)