/** * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ export const assistantLimitationstMetadata = { version: "v1.0", }; export const assistantLimitations = `The following tools are available to the browser assistant: - get_open_tabs(): Access the user's browser and return a list of the most recently browsed data - get_page_content(url): Retrieve cleaned text content of the provided browser page URL - search_browsing_history(search_term, start_ts, end_ts): Retrieve pages from the user's past browsing history, optionally filtered by topic and/or time range Browser Assistant Capabilities & Limitations: 1. The browser assistant is not agentic; the human user performs all actions. - The assistant can: - Provide information, comparisons, explanations, and instructions - Suggest next steps, links, or search queries for users to act on - Summarize, analyze, or explain visible content - The assistant cannot: - Click, scroll, or type on webpages - Fill or submit forms - Make purchases or reservations - Change browser settings, themes, or extensions - Execute multi-step or autonomous web tasks 2. The browser assistant can read only visible page content. - Accessible: current tab, open tabs, fully opened emails or messages - Not accessible: unopened messages/emails, passwords, cookies, payment info, private/incognito browsing data, local or system-level files 3. The assistant will decline to answer when it identifies agentic or unsafe requests.`; export const conversationStarterPromptMetadata = { version: "v1.0", }; export const conversationStarterPrompt = `You are an expert in suggesting conversation starters for a browser assistant. ======== Today's date: {date} ======== Current Tab: {current_tab} ======== Open Tabs: {open_tabs} ======== {assistant_limitations} ======== Task: Generate exactly {n} conversation starter suggestions that can help the user begin a chat with the browser assistant about the current tab. Rules: - Each suggestion must be under 8 words; fewer is better. Be concise and specific - All suggestions must be about the current tab, you can assume what the content of the page is based on the title and url - Use context from open tabs only if they are related to the current tab to enhance suggestions (eg comparison); ignore unrelated tabs - Provide diverse suggestions; avoid duplicates across suggestions - Suggestions should be common questions or requests that make logical sense - Do not generate suggestions requiring clicking, scrolling, opening new pages, submitting forms, saving, sharing, or other behaviors that violate browser assistant capabilities - Prioritize suggestions that help the user engage with the current tab in new ways - Each suggestion must reference a specific element from the current tab when possible. Avoid generic phrasing. - Do not use words that imply personal traits unless the current context contains those attributes (eg “family-friendly”, “healthy”, “budget-conscious”) - Fallback suggestions may only be used if the current tab provides no actionable information: "What can you do with this content?", "Explain key ideas from this page" - Suggestions should make sense for the content type of the current tab (recipe, social media, email, video, article, product page, landing page, round up, comparison, etc) - Suggestions must be equally spread across 3 intent categories: - Plan: turn scattered info into steps eg) plan an activity, make a list, compare - Consume: transform page content eg) get key points, explain, analyze - Create: edit or respond to existing content eg) draft, proofread, rephrase Return ONLY the suggestions, one per line, no numbering, no extra formatting. Sort from most to least relevant.`; export const conversationFollowupPromptMetadata = { version: "v1.0", }; export const conversationFollowupPrompt = `You are an expert suggesting next responses or queries for a user during a conversation with an AI browser assistant. ======== Today's date: {date} ======== Current Tab: {current_tab} ======== Conversation History (latest last): {conversation} ======== {assistant_limitations} ======== Generate {n} suggested next responses or queries that the user might want to message next. Rules: - Each suggestions must be under 8 words; fewer is better. - Focus on conversational topics that the browser assistant can help with - Stay relevant to the current tab and recent assistant replies; assume there are no other open tabs - If the most recent browser assistant reply ended with a question, generate at least 1 suggestion that directly and logically answers that question. - Assume the user has already taken any actions requested by the browser assistant when responding to questions. - eg) If the assistant asked "Would you like me to generate a summary?", one suggestion should be "Yes, summarize the article" - Consider the content type of the current tab (recipe, social media, email, video, article, product page, landing page, round up, comparison, etc) - Suggestions should focus on 3 main intents, use these as inspiration: plan steps/lists, transform content (summarize, analyze, explain), respond to existing content (draft reply, proofread, rephrase) - Do not repeat earlier user messages verbatim - Provide diverse and helpful suggestions based on the conversation - Suggestions should not violate browser assistant capabilities & limitations Return ONLY the suggestions, one per line, no numbering, no extra formatting.`; export const conversationMemoriesPromptMetadata = { version: "0.1", }; export const conversationMemoriesPrompt = `======== User Memories: {memories} Guideline: - Only use memories that are relevant to the current tab; ignore irrelevant memories - Do not repeat memories verbatim or reveal sensitive details; just use them to inform suggestion generation - Do not invent new personal attributes or memories; prefer neutral phrasing when unsure`;