Content
# Yu AI Agent - Intelligent AI Assistant Platform
<div align="center">
<h1>🤖 Yu AI Agent</h1>
<p>A modern AI assistant platform built on Spring Boot + Vue 3</p>






</div>
## 📖 Project Introduction
Yu AI Agent is a powerful AI assistant platform that integrates various AI models and tools, providing features such as intelligent conversation, emotional counseling, and super intelligent agents. The project adopts a front-end and back-end separation architecture, supports real-time streaming conversations, and offers excellent scalability and user experience.
### 🎯 Core Features
- **🎭 AI Love Master** - A professional emotional counseling assistant that provides relationship advice and emotional support.
- **🧠 AI Super Intelligent Agent** - A multi-step problem-solving assistant with strong reasoning capabilities.
- **💬 Real-time Conversation** - Streaming conversation experience based on SSE technology.
- **🔧 Tool Integration** - Supports MCP (Model Context Protocol), allowing for the integration of various AI tools.
- **💾 Conversation Memory** - Persistent conversation history that supports contextually continuous dialogue.
- **📊 API Documentation** - Integrated with Knife4j, providing complete API documentation.
## ✨ Technical Features
- 🚀 **Modern Architecture** - Spring Boot 3 + Vue 3 + Vite
- 🤖 **Multi-Model Support** - Various AI models including Alibaba Cloud Bai Lian and Ollama.
- 🔄 **Streaming Response** - Real-time streaming conversation using Server-Sent Events.
- 🛠️ **Tool Extension** - MCP protocol support for integrating various AI tools.
- 📱 **Responsive Design** - Perfectly adapts to both desktop and mobile devices.
- 🐳 **Containerized Deployment** - Docker support for one-click deployment.
- 📚 **RAG Support** - Retrieval-Augmented Generation for document retrieval enhancement.
- 🔐 **Secure and Reliable** - Comprehensive error handling and security mechanisms.
## 🛠️ Tech Stack
### Back-end Tech Stack
- **Core Framework**: Spring Boot 3.4.5
- **Java Version**: JDK 21
- **AI Framework**: Spring AI 1.0.0-M6, LangChain4j
- **AI Models**: Alibaba Cloud Bai Lian DashScope, Ollama
- **Database**: MySQL 8.0
- **Documentation Tool**: Knife4j (Swagger)
- **Utility Libraries**: Hutool, Jackson, Jsoup
- **Build Tool**: Maven 3.9
### Front-end Tech Stack
- **Core Framework**: Vue 3.3.4
- **Build Tool**: Vite 4.4.9
- **UI Components**: Element Plus 2.3.9
- **Routing Management**: Vue Router 4.2.4
- **HTTP Client**: Axios 1.4.0
- **Development Tools**: TypeScript, ESLint
### Infrastructure
- **Containerization**: Docker + Docker Compose
- **Web Server**: Nginx
- **Database**: MySQL 8.0
- **Cache**: In-memory cache
- **Protocol Support**: MCP (Model Context Protocol)
## 📦 Quick Start
### Environment Requirements
- **Java**: JDK 21+
- **Node.js**: 16.0.0+
- **MySQL**: 8.0+
- **Maven**: 3.6+
- **Docker**: 20.10+ (optional)
### 1. Clone the Project
```bash
git clone https://github.com/your-username/yu-ai-agent.git
cd yu-ai-agent
```
### 2. Database Initialization
```bash
# Create the database
mysql -u root -p < sql/create.sql
```
### 3. Start the Back-end
```bash
# Configure the database connection and AI model API keys in application-local.yml
# Start the back-end service
mvn spring-boot:run
```
The back-end service will start at `http://localhost:8112`.
### 4. Start the Front-end
```bash
cd yu-ai-agent-frontend
# Install dependencies
npm install
# Start the development server
npm run dev
```
The front-end service will start at `http://localhost:3000`.
### 5. Access the Application
- **Front-end Interface**: http://localhost:3000
- **API Documentation**: http://localhost:8112/api/doc.html
- **Health Check**: http://localhost:8112/api/health
## 🐳 Docker Deployment
### Using Docker Compose (Recommended)
```bash
# Create a docker-compose.yml file
version: '3.8'
services:
mysql:
image: mysql:8.0
environment:
MYSQL_ROOT_PASSWORD: your_password
MYSQL_DATABASE: yu_ai_agent
ports:
- "3306:3306"
volumes:
- ./sql/create.sql:/docker-entrypoint-initdb.d/create.sql
backend:
build: .
ports:
- "8112:8112"
depends_on:
- mysql
environment:
SPRING_PROFILES_ACTIVE: prod
frontend:
build: ./yu-ai-agent-frontend
ports:
- "80:80"
depends_on:
- backend
# Start all services
docker-compose up -d
```
### Build Images Separately
```bash
# Build the back-end image
docker build -t yu-ai-agent-backend .
# Build the front-end image
cd yu-ai-agent-frontend
docker build -t yu-ai-agent-frontend .
# Run containers
docker run -d -p 8112:8112 yu-ai-agent-backend
docker run -d -p 80:80 yu-ai-agent-frontend
```
## 🏗️ Project Structure
```
yu-ai-agent/
├── src/main/java/com/yxc/yuaiagent/
│ ├── agent/ # AI agent implementation
│ ├── app/ # Application layer services
│ ├── controller/ # REST API controllers
│ ├── config/ # Configuration classes
│ ├── tools/ # AI tool implementations
│ ├── rag/ # RAG retrieval enhancement
│ ├── chatmemory/ # Conversation memory management
│ └── YuAiAgentApplication.java
├── src/main/resources/
│ ├── application.yml # Application configuration
│ └── document/ # RAG document library
├── yu-ai-agent-frontend/ # Front-end project
│ ├── src/
│ │ ├── components/ # Vue components
│ │ ├── views/ # Page views
│ │ ├── router/ # Routing configuration
│ │ └── utils/ # Utility functions
│ ├── public/ # Static resources
│ └── dist/ # Build output
├── sql/ # Database scripts
├── yu-image-search-mcp/ # MCP image search tool
├── Dockerfile # Back-end Docker configuration
├── docker-compose.yml # Docker orchestration configuration
└── README.md # Project documentation
```
## 🔧 Configuration Instructions
### Back-end Configuration
Configure in `src/main/resources/application-local.yml`:
```yaml
spring:
datasource:
url: jdbc:mysql://localhost:3306/yu_ai_agent
username: your_username
password: your_password
ai:
dashscope:
api-key: your_dashscope_api_key
ollama:
base-url: http://localhost:11434
```
### Front-end Configuration
Configure API proxy in `yu-ai-agent-frontend/vite.config.js`:
```javascript
server: {
port: 3000,
proxy: {
"/api": {
target: "http://localhost:8112",
changeOrigin: true,
},
},
}
```
## 📚 API Documentation
The project integrates Knife4j, providing complete API documentation:
- **Development Environment**: http://localhost:8112/api/doc.html
- **Production Environment**: http://your-domain/api/doc.html
### Main API Interfaces
| Interface | Method | Description |
|-----------|--------|-------------|
| `/api/health` | GET | Health check |
| `/api/ai/love_app/chat/sse` | GET | AI Love Master streaming conversation |
| `/api/ai/manus/chat` | GET | AI Super Intelligent Agent conversation |
## 🤝 Contribution Guidelines
1. Fork this repository
2. Create a feature branch (`git checkout -b feature/AmazingFeature`)
3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request
### Development Standards
- The back-end follows Spring Boot best practices.
- The front-end uses Vue 3 Composition API.
- Code comments are in Chinese.
- Commit messages follow Conventional Commits.
## 🐛 Issue Feedback
If you encounter any issues while using the application, please provide feedback through the following ways:
1. Check [Issues](../../issues) for any related problems.
2. Create a new Issue and describe the problem in detail.
3. Provide reproduction steps and environment information.
## 📄 License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
## 🙏 Acknowledgments
Thanks to the following open-source projects and services:
- [Spring Boot](https://spring.io/projects/spring-boot) - Enterprise-level Java application framework.
- [Spring AI](https://spring.io/projects/spring-ai) - AI application development framework.
- [Vue.js](https://vuejs.org/) - Progressive JavaScript framework.
- [Element Plus](https://element-plus.org/) - Vue 3 component library.
- [Alibaba Cloud Bai Lian](https://dashscope.aliyun.com/) - AI model service.
- [LangChain4j](https://github.com/langchain4j/langchain4j) - Java AI application framework.
## 📞 Contact Information
- Project Maintainer: fishstar
- Email: your-email@example.com
- Project Address: https://github.com/your-username/yu-ai-agent
---
<div align="center">
<p>If this project helps you, please give it a ⭐️</p>
<p>Made with ❤️ by fishstar</p>
</div>
You Might Also Like
debugg-ai-mcp
AI-powered MCP Server for testing, debugging, and code analysis.
aws-lambda-mcp-cookbook
AWS Lambda MCP Cookbook provides Python examples for MCP server integration.
mcp-server-macos-use
MCP server in Swift for controlling macOS apps via accessibility APIs.
MonkeyMCP
MonkeyMCP is a .NET 9.0 server for Model Context Protocol facilitating...
mcp-linear
MCP Linear connects AI assistants with Linear project management via the MCP...
himarket
HiMarket is an enterprise-level platform for managing AI assets and APIs.