JourneytoNewland

Intelligent Agent MVP — Development skill for Claude Code

Development community

基于 FastAPI + LangGraph + MCP + Skills 的智能数据分析 Agent MVP.

How to install Intelligent Agent MVP

This entry records only its repository, not the path inside it, so there is no exact command to give. Open JourneytoNewland/intelligent-agent-mvp and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Intelligent Agent MVP does

基于 FastAPI + LangGraph + MCP + Skills 的智能数据分析 Agent MVP.

Alternatives in Development

README

IntelligentAgentMVP - 智能数据分析平台

基于 **FastAPI + LangGraph + MCP + Skills** 的智能数据分析 Agent MVP

🎯 项目概述

这是一个完整的智能数据分析平台 MVP,实现了:

**MVP 核心功能** (Stage 1-5):

  • ✅ 智能意图识别 - LLM + 规则双模式
  • ✅ 业务能力封装 - Skills 插件系统
  • ✅ 状态机编排 - LangGraph 状态流转
  • ✅ RESTful API - 聊天接口 + 会话管理
  • ✅ SSE 流式输出 - 实时进度反馈

**短期优化功能** (2026-02-04):

  • ✅ LLM 参数提取 - Function Calling + Few-shot Learning
  • ✅ Skill 并行执行 - 依赖分析 + 异步并发(2x 性能提升)
  • ✅ 用户反馈机制 - 👍/👎 反馈收集与多维统计
  • ✅ 多数据源支持 - Database, HTTP, Excel, API

**测试覆盖率**: 100% (34/34 测试通过)

🏗️ 技术架构

API 层 (FastAPI)
    ↓
编排层 (LangGraph)
    ↓
业务层 (Skills)
    ↓
工具层 (MCP)
    ↓
基础设施 (PostgreSQL, Redis, LLM)

🚀 快速开始

1. 安装依赖

pip install -r requirements.txt

2. 配置环境变量

cp .env.example .env
# 编辑 .env,配置数据库、Redis、智谱 AI API Key

3. 初始化数据库

psql -U postgres -d agent_db -f sql/01_init_database.sql

4. 启动服务

uvicorn app.main:app --reload --host 0.0.0.0 --port 8000

5. 访问 API

📡 API 使用示例

简单聊天

curl -X POST http://localhost:8000/api/v1/chat/ \
  -H "Content-Type: application/json" \
  -d '{"message": "查询最近7天的销售额"}'

多轮对话

# 第一轮
SESSION_ID=$(curl -X POST http://localhost:8000/api/v1/chat/ \
  -H "Content-Type: application/json" \
  -d '{"message": "你好"}' | jq -r '.session_id')

# 第二轮
curl -X POST http://localhost:8000/api/v1/chat/ \
  -H "Content-Type: application/json" \
  -d "{\"message\": \"查询销售额\", \"session_id\": \"$SESSION_ID\"}"

流式聊天

curl -X POST http://localhost:8000/api/v1/chat/stream \
  -H "Content-Type: application/json" \
  -H "Accept: text/event-stream" \
  -d '{"message": "生成销售报表"}'

用户反馈

# 提交反馈
curl -X POST http://localhost:8000/api/v1/feedback/ \
  -H "Content-Type: application/json" \
  -d '{
    "session_id": "sess_123",
    "message_id": "msg_456",
    "feedback_type": "thumbs_up",
    "user