FrontAgent 是做什么的?
AI agent platform for frontend engineering with RAG, Skills, SDD, MCP and so on | 通过多种适配前端工程的技术进行赋能的智能体,支持:CLI、VSCode插件、LoRA模型、MCP服务
Overview
FrontAgent is an AI agent platform designed to assist with frontend development tasks. It leverages Retrieval-Augmented Generation (RAG), custom Skills, Structured Data Definitions (SDD), and the Model Context Protocol (MCP) to provide contextual and actionable assistance.
Features
- CLI: Command-line interface for direct agent interaction.
- VSCode Extension: Seamless integration within Visual Studio Code.
- LoRA Model: Fine-tuned model for specialized frontend tasks.
- MCP Server: Model Context Protocol service for advanced agent orchestration.
Installation
npm install -g frontagent
Or install the VSCode extension from the marketplace.
Usage
CLI
frontagent init
frontagent generate component Button
frontagent run skill optimize-performance
VSCode Extension
Open the command palette (Ctrl+Shift+P or Cmd+Shift+P) and run:
FrontAgent: Initialize ProjectFrontAgent: Generate ComponentFrontAgent: Run Skill
Configuration
Create a frontagent.config.json in your project root:
{
"rag": {
"enabled": true,
"indexPath": ".frontagent/index"
},
"skills": [
"component-generator",
"style-converter"
],
"mcp": {
"serverUrl": "http://localhost:8080"
}
}
Skills
FrontAgent includes a set of built-in skills:
- component-generator: Quickly generate React, Vue, or Angular components.
- style-converter: Convert between CSS, SCSS, and CSS-in-JS.
- performance-analyzer: Analyze and suggest frontend performance improvements.
- accessibility-checker: Ensure components meet accessibility standards.
SDD (Structured Data Definitions)
Define structured data for your application:
{
"sdd": {
"entities": [
{
"name": "User",
"fields": [
{"name": "id", "type": "string"},
{"name": "name", "type": "string"},
{"name": "email", "type": "string"}
]
}
]
}
}
MCP Integration
Connect to MCP servers to extend agent capabilities:
frontagent mcp add https://mcp.example.com/schema
Contributing
Contributions are welcome! Please see the GitHub repository for guidelines.
License
MIT