Yu AI Agent

v1.0.0Coding Agentsstable

编程导航 2025 年 AI 开发实战新项目,基于 Spring Boot 3 + Java 21 + Spring AI 构建 AI 恋爱大师应用和 ReAct 模式自主规划智能体YuManus,覆盖 AI 大模型接入、Spring AI 核心特性、Prompt 工程和优化、RAG 检索增强、向量数据库、Tool Calling 工具调用、MCP 模型上下文协议、AI Agent 开发(Manas Java 实现)、Cursor AI 工具等核心知识。用一套教程将程序员必知必会的 AI 技术一

aiai-modelbackendfrontendjava
Share:
2,287
Stars
0
Downloads
0
Weekly
0/5

What is Yu AI Agent?

Yu AI Agent is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to 编程导航 2025 年 ai 开发实战新项目,基于 spring boot 3 + java 21 + spring ai 构建 ai 恋爱大师应用和 react 模式自主规划智能体yumanus,覆盖 ai 大模型接入、spring ai 核心特性、prompt 工程和优化、rag 检索增强、向量数据库、tool calling 工具调用、mcp 模型上下文协议、ai agent 开发(mana...

编程导航 2025 年 AI 开发实战新项目,基于 Spring Boot 3 + Java 21 + Spring AI 构建 AI 恋爱大师应用和 ReAct 模式自主规划智能体YuManus,覆盖 AI 大模型接入、Spring AI 核心特性、Prompt 工程和优化、RAG 检索增强、向量数据库、Tool Calling 工具调用、MCP 模型上下文协议、AI Agent 开发(Manas Java 实现)、Cursor AI 工具等核心知识。用一套教程将程序员必知必会的 AI 技术一

This server falls under the Coding Agents category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • 编程导航 2025 年 AI 开发实战新项目,基于 Spring Boot 3 + Java 21 + Spring A

Use Cases

Build AI agents with Spring Boot and Java 21
Implement RAG, tool calling, and ReAct patterns
liyupi

Maintainer

LicenseMIT
Languagejava
Versionv1.0.0
UpdatedMay 22, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx yu-ai-agent

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Yu AI Agent

Yu AI Agent is a comprehensive educational project and MCP server implementation built with Spring Boot 3 and Java 21, demonstrating how to build production-grade AI applications using Spring AI and LangChain4j. It includes two showcase applications: an AI relationship counselor app with multi-turn dialogue, RAG knowledge base retrieval, and tool calling; and YuManus, an autonomous ReAct-pattern agent that plans and executes complex tasks using web search, file operations, and PDF generation. The project covers the full spectrum of modern AI development — from LLM integration and vector databases to MCP protocol server development and serverless deployment.

Prerequisites

  • Java 21 or higher (JDK 21+) installed
  • Maven 3.8+ for building the project
  • An AI API key from a supported provider (Alibaba Bailian / DashScope, OpenAI, or a local Ollama instance)
  • PostgreSQL with PgVector extension for the RAG vector database
  • Redis for session memory and rate limiting (optional for basic setup)
1

Clone the repository

Clone the yu-ai-agent project from GitHub to your local machine.

git clone https://github.com/liyupi/yu-ai-agent.git
cd yu-ai-agent
2

Configure your AI provider credentials

Copy the application configuration template and set your LLM API credentials. The project defaults to Alibaba Bailian (DashScope) but supports OpenAI and Ollama as well.

# Edit src/main/resources/application.yml
# Set your API key:
spring:
  ai:
    dashscope:
      api-key: your_dashscope_api_key
    # Or for OpenAI:
    openai:
      api-key: your_openai_api_key
3

Set up the PostgreSQL vector database

Install and configure PostgreSQL with the pgvector extension for RAG knowledge base storage. Create the database and enable the extension.

# In PostgreSQL:
CREATE DATABASE yuai;
\c yuai
CREATE EXTENSION IF NOT EXISTS vector;
4

Build and run the backend

Use Maven to build the project and start the Spring Boot application.

mvn clean install -DskipTests
mvn spring-boot:run
5

Configure the MCP server for external clients

The project exposes an MCP server for tool calling from external AI clients. Add the server configuration to your MCP client to connect to the running Spring Boot application.

{
  "mcpServers": {
    "yu-ai-agent": {
      "command": "npx",
      "args": ["yu-ai-agent"],
      "env": {
        "SERVER_URL": "http://localhost:8080"
      }
    }
  }
}
6

Load knowledge base documents for RAG

Use the provided API endpoints to upload documents to the RAG knowledge base. The system will embed them using PgVector for retrieval-augmented generation.

# Upload a document via the REST API:
curl -X POST http://localhost:8080/api/rag/upload \
  -F '[email protected]'

Yu AI Agent Examples

Client configuration

MCP client configuration connecting to the locally running Yu AI Agent Spring Boot server.

{
  "mcpServers": {
    "yu-ai-agent": {
      "command": "npx",
      "args": ["yu-ai-agent"]
    }
  }
}

Prompts to try

Example prompts showcasing the AI agent's capabilities including RAG, tool calling, and autonomous planning.

- "Help me plan a romantic date in Beijing — search for nearby restaurants and attractions."
- "Based on my relationship knowledge base, what advice do you have for this situation?"
- "Use YuManus to research the best practices for Spring AI and generate a PDF report."
- "Search the web for today's AI news and summarize the top three stories."
- "What tools are available to you and what can you help me accomplish?"

Troubleshooting Yu AI Agent

Spring Boot fails to start with 'pgvector extension not found' error

Ensure the pgvector extension is installed in your PostgreSQL instance. Run 'CREATE EXTENSION IF NOT EXISTS vector;' in the target database as a superuser. Verify PostgreSQL version is 14+ as older versions may not support pgvector.

LLM API calls fail with authentication errors

Check that your API key is correctly set in application.yml or passed as an environment variable (SPRING_AI_DASHSCOPE_API_KEY or SPRING_AI_OPENAI_API_KEY). Ensure the key is for the correct provider configured in the active Spring profile.

RAG retrieval returns irrelevant results

Ensure documents have been fully processed and embedded before querying — check the ingestion pipeline status via the API. Adjust the similarity threshold and top-K retrieval parameters in the application configuration for better precision.

Frequently Asked Questions about Yu AI Agent

What is Yu AI Agent?

Yu AI Agent is a Model Context Protocol (MCP) server that 编程导航 2025 年 ai 开发实战新项目,基于 spring boot 3 + java 21 + spring ai 构建 ai 恋爱大师应用和 react 模式自主规划智能体yumanus,覆盖 ai 大模型接入、spring ai 核心特性、prompt 工程和优化、rag 检索增强、向量数据库、tool calling 工具调用、mcp 模型上下文协议、ai agent 开发(manas java 实现)、cursor ai 工具等核心知识。用一套教程将程序员必知必会的 ai 技术一 It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Yu AI Agent?

Follow the installation instructions on the Yu AI Agent GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with Yu AI Agent?

Yu AI Agent works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Yu AI Agent free to use?

Yes, Yu AI Agent is open source and available under the MIT license. You can use it freely in both personal and commercial projects.

Browse More Coding Agents MCP Servers

Explore all coding agents servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "yu-ai-agent": { "command": "npx", "args": ["-y", "yu-ai-agent"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use Yu AI Agent?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides