Firefox Assistant Digital Twin Skill
Skill Definition
Name: firefox_assistant
Version: 0.1.0
Type: Browser Assistant
Description: Provides AI-powered assistance for Firefox browser users, enabling content extraction, summarization, and workflow automation.
Input Contract
Required Inputs
- •
url: string - The URL of the page to analyze - •
title: string - The page title - •
visible_text: string - The visible text content from the page - •
user_task: string - The task description (e.g., "Summarize as checklist", "Explain workflow", "Draft SOP")
Optional Inputs
- •
workflow_id: string - Optional identifier for workflow tracking
Output Contract
Response Schema
json
{
"summary": "Markdown-formatted response text",
"steps": [
{
"step": 1,
"action": "Click X",
"why": "Reason for this action"
},
{
"step": 2,
"action": "Enter Y",
"why": "Reason for this action"
}
],
"risks": ["List of potential risks or concerns"],
"unknowns": ["List of items that need clarification"]
}
Field Descriptions
- •
summary: Main markdown response addressing the user's task - •
steps: Array of actionable steps (optional, for automation workflows) - •
risks: Array of identified risks or concerns - •
unknowns: Array of items requiring clarification
API Endpoints
POST /analyze
Analyze page content with AI based on user task.
Request:
json
{
"url": "https://example.com",
"content": "Page text content...",
"task": "Summarize as checklist"
}
Response:
json
{
"result": "Markdown-formatted response"
}
GET /health
Health check endpoint.
Response:
json
{
"ok": true
}
Extension Interface
Content Script Message
getPageContent
Request page content from content script.
Request:
javascript
{ action: "getPageContent" }
Response:
json
{
"url": "https://example.com",
"title": "Page Title",
"content": "Page text content..."
}
Configuration
Environment Variables
- •
OPENAI_API_KEY: OpenAI API key (required) - •
OPENAI_MODEL: Model to use (default:gpt-4o-mini) - •
MAX_PAGE_CHARS: Maximum characters to process (default:12000)
Security Notes
- •Backend runs on localhost only (no external exposure)
- •API keys are never embedded in the extension
- •CORS should be configured only if needed for future remote access
Integration
This skill can be integrated into digital twin runtimes through the adapter interface defined in adapter.py. The adapter provides async methods for content extraction and analysis.