A performance insights and knowledge assistant agent built on top of Chrome DevTools internals, Mastra, AI SDK and NextJS
# PerfAgent - AI-Powered Web Performance Analysis
PerfAgent is an advanced web performance analysis tool that leverages AI to help
developers analyze and optimize their web applications. It provides detailed
insights into Core Web Vitals and other performance metrics through interactive
visualizations and AI-assisted recommendations.
## Features
- **AI-Powered Analysis**: Utilizes large language models to analyze performance
traces and provide actionable insights.
- **Performance Visualization**:
- Flame graph visualization for CPU profile analysis
- Network waterfall charts for request timing analysis
- Interactive timeline views for user interactions
- **Core Web Vitals Analysis**: Comprehensive analysis of LCP, INP, CLS, and
other performance metrics.
- **Chat Interface**: Engage with the AI assistant through a familiar chat
interface to get targeted performance advice.
- **Trace Processing**: Upload and process Chrome DevTools performance traces
for detailed analysis.
- **Report Generation**: Generate markdown reports with actionable optimization
recommendations.
## Project Structure
### Main Directories
- `/app`: Next.js app router pages and API routes
- `/api`: Backend API routes for AI integration, suggestions, and more
- `/chat`: The main chat interface for interacting with the AI
- `/actions`: Server actions for subscription management
- `/workers`: Web workers for handling CPU-intensive tasks
- `/components`: React components
- `/flamegraph`: Flame graph visualization components
- `/network-activity`: Network request visualization
- `/trace-details`: Components for displaying trace insights
- `/app-sidebar`: Navigation and sidebar components
- `/ui`: shadcn base components built with Radix UI
- `/lib`: Utilities and shared code
- `/ai`: AI-related code and prompts
- `/mastra`: Mastra AI agents and workflows
- `/stores`: Zustand state management stores
### Core Components
- **Flame Graph Visualization**: IntGoogle's AI-powered research notebook that ingests your documents and becomes an expert on your content. Generates audio overviews, study guides, FAQs, and interactive discussions from uploaded sources.
Google DeepMind's experimental AI agent that can navigate websites, fill forms, and complete multi-step browser tasks autonomously. Uses Gemini's multimodal understanding to interact with web interfaces.
Google DeepMind's universal AI assistant prototype that can see, hear, and respond in real-time through your device camera and microphone. Demonstrates the future of multimodal AI interaction.
Google Cloud's enterprise platform for building, deploying, and managing AI agents powered by Gemini. Supports multi-agent orchestration, tool integration, and enterprise governance.
Gemini's agentic research capability that autonomously browses the web, synthesizes information from dozens of sources, and produces comprehensive research reports on any topic.
Interactive coding and content creation agent that generates, previews, and iterates on code, documents, and interactive applications in a side panel. Supports HTML/CSS/JS, Python, and more.