AI-powered web accessibility assistant that detects user struggles and provides personalized, simplified content summaries.
FlowState is a Chrome extension designed to help neurodivergent users, elderly people, and anyone who finds complex web content overwhelming. It uses behavioral AI to detect when you're struggling with a page and offers context-aware assistance.
- Passive Monitoring: Tracks scroll patterns, dwells, text selections, and clicks without intrusion
- Smart Classification: AI classifier detects struggling users based on behavioral signals
- Scroll reversals (going back to re-read)
- Long dwells (stuck on content)
- Text highlighting (trying to focus)
- Rage clicks and dead clicks
- Personalized Triggers: Only offers help when you actually need it
FlowState uses a sophisticated multi-agent pipeline to transform complex content:
- Navigator: Analyzes page structure and identifies key actions
- Security Sentinel: Detects dark patterns, hidden fees, and risky actions
- Compassionate Writer: Creates warm, simple summaries (5th-6th grade level)
- Technical Writer: Produces direct, efficient summaries with specifics
- Arbiter: Merges both approaches for the best result
- Guardian: Quality-checks output before delivery
- Simplified Language: Complex jargon explained in plain terms
- Structured Summaries: Key points, warnings, and actions clearly highlighted
- Legal Translation: Fine print converted to understandable language
- Security Alerts: Warnings about suspicious patterns or risky actions
- Custom Prompts: AI adapts to your specific struggles (e.g., "user highlighted medical terms")
- Dyslexia-Friendly Font: Optional Lexend font with optimized spacing
- Resizable Sidebar: Drag to adjust width (300px - 800px)
- Clean Interface: Isolated iframe prevents style conflicts
- Keyboard Friendly: All actions accessible via keyboard
FlowState learns your reading patterns over time and personalizes summaries accordingly:
User Metrics Tracked:
| Metric | What It Measures | How It Affects Summaries |
|---|---|---|
| Attentiveness | Focus ability (dwell patterns) | Short attention β shorter paragraphs, more headers |
| Reading Speed | Content processing speed | Slow β simpler sentences; Fast β executive summaries |
| Comprehension | Understanding level (reversals) | Low β define all terms, use analogies |
| Patience | Detail tolerance (frustration) | Low β TL;DR style; High β full context |
| Technical Familiarity | Comfort with jargon | Low β plain language; High β standard terminology |
How It Works:
- Baseline: All metrics start at 0.5 (neutral)
- Learning: Each session updates metrics based on behavior
- Convergence: After ~20 sessions, profile stabilizes (learning rate decreases)
- Personalization: LLMs receive your profile and adapt their writing style
Example:
User with low attention (0.33) + low patience (0.28):
β "Use very short paragraphs, bullet points only, skip background info,
get to the action items immediately"
User with high comprehension (0.82) + high patience (0.75):
β "Can handle nuanced explanations, include context and background,
use standard terminology without excessive simplification"
-
Clone the repository
git clone https://github.com/yourusername/flowstate.git cd flowstate -
Install dependencies
npm install
-
Add your OpenRouter API key
Edit
src/agents/llm.tsand replace the placeholder API key:const devKey = 'your-openrouter-api-key-here';
Or configure it in the extension after installation.
-
Build the extension
npm run build
-
Load in Chrome
- Open
chrome://extensions/ - Enable "Developer mode"
- Click "Load unpacked"
- Select the
distfolder
- Open
- Browse Normally: FlowState passively monitors your behavior
- Automatic Detection: After 15 seconds, AI analyzes your interactions
- Help Popup: If you're struggling, a friendly popup appears:
- "Having trouble with this section? Let me simplify it."
- Accept Help: Click to open the sidebar with AI-generated summary
- Review Summary: See simplified content, security warnings, and key actions
Click the floating π button (bottom-right) to manually open the sidebar anytime.
- Reading-Optimized Font: Toggle Lexend font for easier reading
- Sidebar Width: Drag the left edge to resize (300-800px)
flowstate/
βββ src/
β βββ agents/ # Multi-agent AI system
β β βββ agents.ts # Agent implementations
β β βββ classifier.ts # Behavior classifier
β β βββ graph.ts # Agent orchestration
β β βββ llm.ts # OpenRouter API client
β β βββ orchestrator.ts # State management
β β βββ prompts.ts # All LLM prompts
β β βββ types.ts # TypeScript types
β βββ content.ts # Main content script
β βββ popup.ts # Help popup UI
β βββ tracker.ts # Behavior tracking
β βββ parse.ts # Content parsing
β βββ background.ts # Service worker
βββ web/ # Landing page
βββ dist/ # Built extension
βββ manifest.json # Chrome extension manifest
- Framework: TypeScript + Vite
- AI: OpenRouter API (supports multiple LLM providers)
- Classifier: Google Gemini 2.0 Flash
- Agents: Configurable per-agent models
- Parsing: Mozilla Readability
- UI: Vanilla TypeScript (iframe isolation)
User Behavior β Tracker β Event Log
β
Classifier Agent (LLM)
β
Need Help? + Custom Prompt
β
Show Popup
β
User Accepts Help
β
Multi-Agent Pipeline (6 specialized agents)
β
Personalized Summary
β
Display in Sidebar
npm run dev # Development mode with watch
npm run build # Production build
npm run preview # Preview built extension
npm run lint # Run ESLint-
Define agent function in
src/agents/agents.ts:export async function myAgent(state: AgentState): Promise<Partial<AgentState>> { // Agent logic }
-
Add prompts in
src/agents/prompts.ts:myAgent: { system: `You are...`, human: `Analyze...` }
-
Wire into graph in
src/agents/graph.ts:workflow.addNode("my_agent", myAgent); workflow.addEdge("previous_agent", "my_agent");
Edit thresholds in src/agents/classifier.ts:
function checkObviousStruggles(features: Features) {
// Adjust detection sensitivity here
if (features.scroll_reversal_count >= 1) { // Lower = more sensitive
signals.push('User struggling');
}
}FlowState uses OpenRouter for LLM access. Get a free API key at openrouter.ai.
Estimated costs: ~$0.01-0.05 per summary (depends on page complexity and model choice)
Configure models in src/agents/classifier.ts and src/agents/agents.ts:
// Classifier model
model: 'google/gemini-2.0-flash-001' // Fast, cheap, reliable
// Agent models (in agents.ts)
model: 'google/gemini-2.5-flash-lite' // Default for most agentsAdjust detection sensitivity in src/content.ts:
const CLASSIFICATION_INTERVAL = 15000; // How often to check (ms)
const MIN_EVENTS_FOR_CLASSIFICATION = 2; // Minimum events needed- Local Processing: Behavior tracking happens entirely in your browser
- No Telemetry: FlowState does not collect or send usage data
- API Calls: Page content is sent to OpenRouter only when you accept help
- No Tracking: No analytics, no cookies, no third-party scripts
Contributions are welcome! Areas for improvement:
- Support for more LLM providers (Anthropic, OpenAI direct)
- Offline mode with local models
- More granular user preferences
- A/B testing framework for prompts
- Multi-language support
- Screen reader compatibility testing
MIT License - see LICENSE for details.
- Mozilla Readability for content extraction
- OpenRouter for unified LLM API access
- Inspired by accessibility research and neurodivergent community feedback
- Issues: GitHub Issues
- Discussions: GitHub Discussions
Note: FlowState is a research project exploring AI-powered accessibility. It's not a replacement for professional medical or educational support.