# spring-ai-alibaba-xs **Repository Path**: zhanghrCode/spring-ai-alibaba-xs ## Basic Information - **Project Name**: spring-ai-alibaba-xs - **Description**: spring-ai-alibaba系列课程代码 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 28 - **Created**: 2026-08-31 - **Last Updated**: 2026-08-31 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Spring AI Alibaba Project Examples This project is a collection of practical examples based on the Spring AI Alibaba framework, covering a wide range of application scenarios from basic to advanced, including core features such as Agent development, tool integration, workflow orchestration, memory mechanisms, and Hooks interceptors. ## Project Structure ``` spring-ai-alibaba-xs/ ├── course-1/ # Chain Workflow Practical Example ├── course-2 # Agent Fundamentals Tutorial ├── course-3 # Detailed Guide on Hooks Interceptors ├── flight-booking/ # Flight Booking System Practical Example ├── mcp-stdio-server/ # MCP STDIO Server ├── miniclaw-agent-example/ # Skills Agent Example ├── skills-agent-example/ # Skills Agent Example ├── skills/ # Various Skill Definitions │ ├── arxiv-search # Paper Search Skill │ └── user-info # User Information Skill └── text-to-sql/ # Natural Language to SQL ``` ## Module Descriptions ### course-1 - Chain Workflow Practical Example Demonstrates how to build complex AI application workflows using Chain and Workflow: - **PracticalChainWorkflow**: Chains together steps such as requirement analysis, architecture design, and implementation planning into a complete workflow - **StateGraph**: Defines stateful AI workflows using state diagrams - **React Agent**: Integrates React Agent for reasoning and action execution ### course-2 - Agent Fundamentals A beginner’s guide to using the Spring AI Alibaba Agent Framework: - **ChatModel Integration**: Connects with various large language models (DashScope, DeepSeek, Ollama, etc.) - **React Agent**: Integrates React-style agents - **Structured Output**: Extracts structured data from model responses - **Memory Mechanism**: Persistent storage of conversation history - **Tools**: Extends agent capabilities via custom function tools - **MCP Integration**: Supports Model Context Protocol ### course-3 - Hooks Interceptors In-depth explanation of the framework’s extension mechanisms, providing interceptors at multiple levels: - **Agent Hook**: Intercept processing before and after agent execution - **Message Hook**: Enhance, compress, or early-exit messages at the message level - **Model Hook**: Intercept and control model calls before and after execution - **Interceptors**: Include logging, content moderation, rate limiting, etc. - **Tool Interceptor**: Intercept tool calls with support for caching, monitoring, and more ### flight-booking - Flight Booking System A complete practical project demonstrating how to build an AI-driven business system: - Backend API service (Spring Boot) - Vue 3 frontend interface - Flight booking, cancellation, and rescheduling functionality - Integrated with RAG system ### mcp-stdio-server - MCP Server Example Demonstrates how to implement an MCP (Model Context Protocol) server, providing standardized interfaces for exposing tools. ### miniclaw-agent-example / skills-agent-example Demonstrates the development of Skills Agents, supporting: - Python code execution tools - Browser automation tools - File operation tools ### text-to-sql - Natural Language to SQL An Agent that converts natural language into SQL queries, with main features: - List database tables - Retrieve table schemas - Validate SQL statements - Execute queries and return results ### skills - Skill Definitions Reusable skill modules: - **arxiv-search**: Search for academic papers - **user-info**: Provide user information ## Quick Start ### Prerequisites - JDK 17+ - Maven 3.8+ - Node.js 18+ (for frontend project) ### Configure API Keys Before using any modules, configure the corresponding API keys in `application.yml`: ```yaml spring: ai: dashscope: api-key: ${DASHSCOPE_API_KEY} deepseek: api-key: ${DEEPSEEK_API_KEY} ``` ### Build the Project ```bash ./mvnw clean package ``` ### Run Examples Navigate to the corresponding module directory and run the main class or test cases: ```bash cd course-1 ./mvnw spring-boot:run ``` ## Technology Stack - **Spring Boot 3.x** - **Spring AI Alibaba** - **DashScope** (Alibaba Cloud Bailian) - **DeepSeek** - **Ollama** - **Vue 3 + Vite** - **Redisson** (Distributed Caching) ## License This project is intended solely for learning and educational purposes.