Spring AI Alibaba Documentation

repository·main·Indexed 27 days ago

https://github.com/alibaba/spring-ai-alibaba

A production-ready framework for building Agentic, Workflow, and Multi-agent applications. It includes the spring-ai-alibaba-agent-framework for intelligent agents, spring-ai-alibaba-graph for orchestration and persistence, and spring-ai-alibaba-admin for observability and evaluation. The ecosystem supports multimodal capabilities, voice agents, and integrations with DashScope, OpenAI, and the Model Context Protocol (MCP).

Tokens
52.6K
Snippets
70
Records
288
Agent score
94%

What's inside Spring AI Alibaba

  1. Overview of Spring AI Alibaba Admin Server

    main

    Spring AI Alibaba Admin Server is a backend service built on Spring Boot 3.x that serves as an AI Agent management platform. It provides a complete RESTful API for Agent Studio, enabling management of prompts, datasets, evaluators, experiments, and observability.

    Key capabilities include:

    • Prompt Management: Template CRUD, version control, real-time streaming debugging, and session management.
    • Dataset Management: Multi-format import, versioning, and creation from OpenTelemetry trace data.
    • Evaluator Management: Configuration of custom evaluation logic, template systems, and versioning.
    • Experiment Management: Automated execution of evaluation experiments, result analysis, and batch processing.
    • Observability: Full trace integration via OpenTelemetry, service monitoring, and Span analysis.
    • Model Configuration: Unified management and dynamic switching for models like OpenAI, DashScope, and DeepSeek.
  2. Overview of Spark Flow Features

    main

    Spark Flow is a canvas editing business component library for the main package (packages/main). It is built using React, React Flow, Antd, and zustand.

    Key features include:

    • Node checklist lists
    • Node manager
    • Canvas execution state management
    • Undo and Redo support
    • Full lifecycle support for rapid customization of business nodes
    • Support for complex node interactions
  3. Overview of frontend-monorepo modules

    main

    The frontend-monorepo consists of three core modules:

    • main (Main Workbench): A single-page application built with Umi 4. It handles Agent management, MCP management, Plugin management, Knowledge base management, and Model service configuration. It integrates spark-flow as its workflow editor.
    • spark-flow (Workflow Editor): A visual node editing tool using XYFlow (React Flow) and ELK.js for automatic layout. It supports node types like start, end, LLM, script, and plugin.
    • spark-i18n (Internationalization): Provides multilingual support and an automated translation toolchain for Chinese-English switching.
  4. Overview of Spring AI Alibaba Components

    main

    The project is composed of several specialized modules:

    • spring-ai-alibaba-agent-framework: A multi-agent framework for building intelligent agents with built-in context engineering (e.g., human-in-the-loop, context compaction).
    • spring-ai-alibaba-graph: The underlying runtime for the Agent Framework, providing orchestration, persistence, and streaming for stateful agents.
    • spring-ai-alibaba-admin: A one-stop platform for visualized agent development, observability, evaluation, and MCP management.
    • spring-ai-alibaba-studio: An embedded UI for visual debugging of agents.
    • spring-boot-starters: Integrates the Agent Framework with Nacos to support Agent-to-Agent (A2A) communication and dynamic configuration.
  5. Overview of frontend core modules

    main

    The frontend is a monorepo containing several key modules:

    • main: The primary workspace application built with Umi 4 and TailwindCSS. It integrates the workflow editor and manages Agents, MCP, Plugins, Knowledge Bases, and Model Service configurations. It supports both Python and Java backends.
    • spark-flow: A visual workflow editor based on XYFlow (React Flow) and ELK.js for automatic layout. It uses Zustand for state management and supports node types like Start, End, LLM, Script, and Plugins.
    • spark-i18n: Provides multi-language support and an automated translation toolchain for switching between languages (e.g., Chinese and English).
  6. Overview of Spring AI Alibaba Admin

    main

    Spring AI Alibaba Admin is an AI Agent development and evaluation platform built on top of Spring AI Alibaba. It provides a complete lifecycle management solution for AI Agents, including Prompt engineering, dataset management, evaluator configuration, experiment execution, and result analysis.

    Key capabilities include:

    • Prompt Management: Template management, version control, real-time debugging, and session management.
    • Dataset Management: Importing various formats, version control, and creating datasets from OpenTelemetry trace data.
    • Evaluator Management: Configuring evaluators with templates and custom logic.
    • Experiment Management: Automated execution, result analysis, and batch processing.
    • Observability: Full trace integration via OpenTelemetry and service monitoring.
    • Model Configuration: Unified management for OpenAI, DashScope, and DeepSeek models.
  7. Understand Spring AI Alibaba Graph Core Concepts

    main

    Spring AI Alibaba Graph is a workflow and multi-agent framework for Java developers. It allows you to build complex AI applications by defining a directed graph of operations.

    Key components include:

    • StateGraph: The primary class used to define a workflow by adding nodes and edges. It can be compiled into a CompiledGraph.
    • Node: Represents a single step (e.g., an LLM call or data transformation). Nodes can be asynchronous.
    • Edge: Represents transitions between nodes. These can be conditional, allowing logic to determine the next step based on the current state.
    • OverAllState: A serializable, central state object that carries shared data throughout the workflow. It is used for checkpointing, resuming, and passing data between nodes.
    • CompiledGraph: The executable version of a StateGraph that handles execution, state transitions, and streaming.
    • InterruptableAction: An interface used to implement human-in-the-loop scenarios by interrupting the graph execution.
  8. Core Features of Spring AI Alibaba Admin Server

    main

    The Admin Server provides the following management capabilities:

    • Prompt Management: Create/update/delete prompt templates, version control, real-time debugging with streaming responses, and session management for multi-turn conversations.
    • Dataset Management: Import datasets in multiple formats, version control, fine-grained CRUD on data items, and creation of datasets from OpenTelemetry trace data.
    • Evaluator Management: Configure evaluators using templates, custom evaluation logic, and online debugging.
    • Experiment Management: Automated execution of evaluation experiments, result analysis/statistics, experiment control (start/stop/restart/delete), and batch processing.
    • Observability: Integrated OpenTelemetry for trace tracking, service monitoring, and detailed Span analysis.
    • Model Configuration: Unified management for OpenAI, DashScope, and DeepSeek, including dynamic runtime parameter updates.
  9. Sandbox Deployment Requirements and Constraints

    main

    Requirements

    • Java 17 or later
    • A running Docker daemon accessible to the application process
    • A supported chat model

    Deployment Notes

    • Docker Dependency: The implementation uses AgentScope Runtime's Docker-backed SandboxService. The application process must have access to the Docker daemon to create containers.
    • Isolation: Create a separate BaseSandbox per user/session boundary. Do not reuse user/session IDs for untrusted workloads.
    • Security: For production, apply container resource limits, network policies, image allowlists, read-only mounts, and cleanup monitoring.
    • Remote Sandboxes: This module is not a client for remote Kubernetes sandboxes. Remote integration requires a custom tool callback or a compatible AgentScope Runtime manager.
  10. Use Nacos for Agent Config in Spring AI Alibaba

    main

    The spring-ai-alibaba-starter-config-nacos starter provides Nacos integration for the Agent Config feature. Agent Config allows you to build a Spring AI Alibaba Agent without writing code by using a YAML-formatted text file containing a brief description of the agent. This enables non-developers to assemble and run agents.

    Note: The Agent Config feature is currently under development.

  11. Core Features of Spring AI Alibaba Admin

    main

    Spring AI Alibaba Admin (Agent Studio) provides a complete lifecycle management solution for AI Agents:

    • Prompt Management: Template CRUD, version control, real-time debugging (streaming), and session management.
    • Dataset Management: Import/create datasets, version control, fine-grained item management, and creation from OpenTelemetry trace data.
    • Evaluator Management: Configuration of various evaluators, template system, debugging, and versioning.
    • Experiment Management: Automated execution, result analysis/statistics, experiment control (start/stop/restart), and batch processing.
    • Observability: Integrated OpenTelemetry for trace tracking, service monitoring, and detailed Span analysis.
    • Model Configuration: Support for OpenAI, DashScope, and DeepSeek with dynamic runtime updates.