前端工程AI助手 是 AI Skill Hub 本期精选AI工具之一。综合评分 7.8 分,整体质量较高。我们推荐使用将其纳入你的 AI 工具库,帮助提升工作效率。
前端工程AI助手 是一款基于 TypeScript 开发的开源工具,专注于 前端开发、AI代理、MCP协议 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。
前端工程AI助手 是一款基于 TypeScript 开发的开源工具,专注于 前端开发、AI代理、MCP协议 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。
# 方式一:npm 全局安装 npm install -g frontagent # 方式二:npx 直接运行(无需安装) npx frontagent --help # 方式三:项目依赖安装 npm install frontagent # 方式四:从源码运行 git clone https://github.com/ceilf6/FrontAgent cd FrontAgent npm install npm start
# 命令行使用
frontagent --help
# 基本用法
frontagent [options] <input>
# Node.js 代码中使用
const frontagent = require('frontagent');
const result = await frontagent.run(options);
console.log(result);
# frontagent 配置说明 # 查看配置选项 frontagent --config-example > config.yml # 常见配置项 # output_dir: ./output # log_level: info # workers: 4 # 环境变量(覆盖配置文件) export FRONTAGENT_CONFIG="/path/to/config.yml"
Enterprise-grade AI Agent System - Constrained by SDD, Powered by MCP for Controlled Perception and Execution
中文文档 | Quick Start | Architecture | Design Doc
FrontAgent is an AI Agent system designed specifically for frontend engineering, addressing core challenges faced when deploying agents in real-world engineering scenarios:
Distilled Planner Model: FrontAgent's Planner stage has been distilled into a standalone small model frontagent-planner-7B-lora. Load the LoRA adapter on top of Qwen2.5-Coder-7B to generate frontend execution plans directly, without calling large LLM APIs. The training workflow, prompts, evaluation scripts, and Hugging Face release metadata live in models/frontagent-planner.
fa run "Where is FrontAgent RAG implemented?" \ --rag-source openviking \ --open-viking-endpoint https://openviking.example.com/query \ --disable-open-viking-fallback
| Variable | Description | Example Value |
|---|---|---|
PROVIDER | LLM provider | openai or anthropic |
API_KEY | API key | sk-... |
MODEL | Model name | gpt-4 or claude-sonnet-4-20250514 |
BASE_URL | API endpoint | https://api.openai.com/v1 |
EXECUTION_ENGINE | Execution engine | native or langgraph |
LANGGRAPH_CHECKPOINT | Enable LangGraph checkpoint | true / false |
MAX_RECOVERY_ATTEMPTS | Max recovery attempts per phase | 3 |
npm install -g frontagent
fa mcp serve
node /absolute/path/to/FrontAgent-app/apps/cli/dist/index.js \ mcp serve
By default, FrontAgent resolves the project root from the MCP host's workspace roots when the host exposes exactly one file root. If host roots are unavailable, it falls back to the MCP server process current working directory.
Use `--project-root` only when you want to pin the server to a specific project, or when the host exposes multiple workspace roots and FrontAgent cannot choose safely:
bash fa mcp serve --project-root /absolute/path/to/your-project
One MCP server process is bound to one resolved project root.
Useful server options:
bash fa mcp serve \ --security-mode balanced \ --rag-repo https://github.com/ceilf6/Lab.git \ --rag-branch main ```
react-router-dom, axios
pnpm build
```bash
cd examples
fa run "Create an e-commerce frontend project using React + TypeScript + Vite + Tailwind CSS"
Agent will automatically: 1. Analyze project requirements 2. Generate execution plan 3. Create package.json and config files 4. Request to execute npm install (requires user approval) 5. Generate page components and style files
fa run "Modify vite.config.ts to add path alias configuration"
Agent will: 1. Read existing vite.config.ts 2. Understand current configuration 3. Generate new config code 4. Apply minimal patches
fa run "Add user authentication feature, including login, registration, and token management"
Agent will: 1. Analyze existing project structure 2. Plan files to create 3. Generate auth-related components 4. Create API integration code 5. Update route configuration
fa run "Analyze and optimize homepage loading performance"
Agent will: 1. Read relevant component code 2. Analyze performance issues 3. Propose optimization solutions 4. Implement code-level optimizations (lazy loading, code splitting, etc.)
fa run "Add route configuration in App.tsx"
Execution process shows self-healing:
Phase 1: Analysis Phase
✓ Step 1: Read package.json
Phase 2: Creation Phase
✗ Step 2: Modify App.tsx
Error: Cannot apply patch: file not found in context
🔄 Error recovery in progress...
Analysis: App.tsx not read into context
✓ Recovery Step 1: Read src/App.tsx into context
✓ Recovery Step 2: Reapply patch to App.tsx
Phase 3: Validation Phase
✓ Step 3: Run type check
✅ Task complete! Auto-fixed 1 error
Key Features: - 🎯 Phase-Based Execution - Clear execution phases (Analysis, Creation, Validation) - 🔄 Auto-Fix - Detected file not read, auto-insert read step - 📊 Facts Tracking - System knows which files are read/unread - ⚡ No Retry Needed - One-shot completion, no manual re-runs needed
fa run "Implement user profile page and open PR" \
--type create \
--engine langgraph \
--langgraph-checkpoint \
--max-recovery-attempts 5
Notes: - --engine langgraph enables graph-based phase orchestration - --langgraph-checkpoint enables in-memory checkpointing for the run - After acceptance passes, repository management phase can run git/gh actions
export PROVIDER="openai"
export BASE_URL="https://api.openai.com/v1"
export MODEL="gpt-4"
export API_KEY="sk-..."
export PROVIDER="anthropic"
export BASE_URL="https://api.anthropic.com"
export MODEL="claude-sonnet-4-20250514"
export API_KEY="sk-ant-..."
export PROVIDER="openai" export BASE_URL="https://api.openai.com/v1" export MODEL="gpt-4" export API_KEY="sk-..."
export PROVIDER="anthropic" export BASE_URL="https://api.anthropic.com" export MODEL="claude-sonnet-4-20250514" export API_KEY="sk-ant-..."
fa run "Add route guards and open a PR" --engine langgraph --langgraph-checkpoint ```
Most MCP hosts use the same mcpServers shape. Start with the simple config:
{
"mcpServers": {
"frontagent": {
"command": "fa",
"args": [
"mcp",
"serve"
]
}
}
}
If your host UI has separate fields, use:
famcp, serveDo not put fa mcp serve into the command field as one string.
If the host reports command "fa" not found or env: node: No such file or directory, the GUI host probably does not inherit your terminal shell PATH. Then use absolute paths:
which node
which fa
{
"mcpServers": {
"frontagent": {
"command": "/opt/homebrew/bin/node",
"args": [
"/opt/homebrew/bin/fa",
"mcp",
"serve"
]
}
}
}
If you are using a source checkout instead of a globally linked package, point node at the built CLI file after pnpm build:
{
"mcpServers": {
"frontagent": {
"command": "/opt/homebrew/bin/node",
"args": [
"/absolute/path/to/FrontAgent-app/apps/cli/dist/index.js",
"mcp",
"serve"
]
}
}
}
For direct LLM fallback, pass environment variables through the host config:
{
"mcpServers": {
"frontagent": {
"command": "fa",
"args": [
"mcp",
"serve"
],
"env": {
"PROVIDER": "openai",
"BASE_URL": "https://api.openai.com/v1",
"MODEL": "gpt-4",
"API_KEY": "sk-..."
}
}
}
}
Examples of where to put the config:
mcpServers in claude_desktop_config.json.mcpServers in your Cursor MCP config, for example .cursor/mcp.json.fa run "Where is FrontAgent RAG implemented?" \ --rag-source composite \ --open-viking-endpoint https://openviking.example.com/query \ --open-viking-corpus wiki \ --open-viking-namespace docs/openviking \ --open-viking-l1-entry docs/openviking/frontagent-l1.md
fa run "Explain React setState behavior" \ --provider openai \ --base-url https://yunwu.ai/v1 \ --api-key YOUR_TOKEN \ --rag-embedding-model text-embedding-3-small
@types/node
fa skill improve frontend-design
FrontAgent 是一个强大的前端 AI Agent 工具,旨在通过智能化的方式简化前端开发流程。它能够理解复杂的开发指令,并结合先进的架构设计,为开发者提供从需求分析到代码生成的全流程自动化体验。
FrontAgent 具备核心的自动化开发能力,能够自动分析项目需求、生成执行计划并创建相应的配置文件(如 package.json)。它支持自动生成页面组件与样式文件,并能通过交互式确认执行 npm install 等命令,实现从构思到落地的闭环。
在使用 FrontAgent 时,需确保环境配置符合要求。如果需要使用特定的 RAG 检索功能,建议配置 OpenViking 端点并根据需要禁用 Git fallback 模式,以确保检索源的准确性与稳定性。
可以通过 npm 进行全局安装:执行 `npm install -g frontagent`。安装完成后,直接使用 CLI 命令 `fa mcp serve` 启动。若通过源码运行,请在 pnpm build 后指向编译后的 index.js 路径。系统会自动尝试从 MCP host 的 workspace roots 解析项目根目录。
FrontAgent 提供便捷的 CLI 交互体验。开发者可以通过 `fa run` 命令直接下达自然语言指令,例如:'Create an e-commerce frontend project using React + TypeScript + Vite + Tailwind CSS'。Agent 会自动完成从环境搭建到组件生成的全过程,并请求用户授权执行关键操作。
项目支持通过环境变量配置 LLM Provider,包括 OpenAI 和 Anthropic。开发者需设置 `PROVIDER`、`BASE_URL`、`MODEL` 及 `API_KEY`。对于 RAG 功能,若使用 OpenAI,其 Embedding 模型将默认继承相同的 Base URL 配置,除非手动指定不同的端点。
FrontAgent 的 API 调用逻辑与配置高度集成。当指定 provider 为 openai 时,RAG 的 embeddings 会自动继承基础配置。开发者可以通过命令行参数(如 `--provider`、`--base-url`、`--rag-embedding-model`)灵活覆盖默认配置,以适配不同的 API 端点或模型需求。
在执行任务时,FrontAgent 会进入自动化的工作流:首先分析指令需求,随后生成详细的执行计划,接着创建必要的配置文件与组件代码。在执行过程中,Agent 会实时反馈模块创建状态,并能识别并提示代码中缺失的模块引用或依赖包(如 @types/node)。
专业的前端AI代理平台,技术栈完整融合RAG和MCP。Stars虽中等但更新活跃,适合前端工程化转型团队。
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ MIT 协议 — 最宽松的开源协议之一,可自由商用、修改、分发,仅需保留版权声明。
经综合评估,前端工程AI助手 在AI工具赛道中表现稳健,质量良好。如果你已有明确的使用需求,可以直接上手体验;如果还在评估阶段,建议对比同类工具后再做决策。
| 原始名称 | FrontAgent |
| 原始描述 | 开源MCP工具:AI agent platform for frontend engineering with RAG, Skills, SDD, MCP and so on 。⭐95 · TypeScript |
| Topics | 前端开发AI代理MCP协议RAG可控反馈 |
| GitHub | https://github.com/ceilf6/FrontAgent |
| License | MIT |
| 语言 | TypeScript |
收录时间:2026-05-20 · 更新时间:2026-05-21 · License:MIT · AI Skill Hub 不对第三方内容的准确性作法律背书。