# spring-ai-alibaba/examples

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/spring-ai-alibaba-examples).**

2,744 stars · 1,159 forks · Java · Apache-2.0

## Links

- GitHub: https://github.com/spring-ai-alibaba/examples
- Homepage: https://java2ai.com
- awesome-repositories: https://awesome-repositories.com/repository/spring-ai-alibaba-examples.md

## Topics

`ai` `exampls` `java` `spring-ai-alibaba`

## Description

This project provides a collection of example implementations for building AI agents and workflows using the Spring AI Alibaba framework. It focuses on demonstrating how to create intelligent agents that iteratively reason and act to solve problems, coordinate multiple agents across services, and integrate human oversight into automated processes.

The examples showcase key differentiators such as graph-based workflow automation with conditional routing, nested graphs, and parallel execution, as well as real-time streaming of agent responses to clients. The project also illustrates how to manage agent context through prompt engineering, handle errors with automatic retries, and orchestrate complex multi-agent workflows using patterns like sequential, parallel, and routing execution.

Additional capabilities include connecting agents to various LLM providers, tools, and the Model Context Protocol through Spring AI abstractions, enabling comprehensive API integration for building sophisticated AI applications.

## Tags

### Artificial Intelligence & ML

- [Multi-Agent Orchestration Patterns](https://awesome-repositories.com/f/artificial-intelligence-ml/agentic-systems-frameworks/integration-deployment/agent-frameworks/agent-orchestrators/multi-agent-orchestration-patterns.md) — Combines multiple agents using sequential, parallel, routing, and loop execution patterns. ([source](https://java2ai.com/docs/overview))
- [LLM Tooling Integrations](https://awesome-repositories.com/f/artificial-intelligence-ml/artificial-intelligence-tooling/language-model-integrations/llm-tooling-integrations.md) — Connects agents to multiple LLM providers, tool-calling, and the Model Context Protocol.
- [MCP Protocol Integrations](https://awesome-repositories.com/f/artificial-intelligence-ml/external-tool-integrations/mcp-protocol-integrations.md) — Integrates with multiple LLM providers, tool-calling, and the Model Context Protocol. ([source](https://java2ai.com/docs/overview))
- [Human-in-the-Loop Workflows](https://awesome-repositories.com/f/artificial-intelligence-ml/human-in-the-loop-workflows.md) — Inserts human feedback and approval steps into agent workflows for supervised execution. ([source](https://java2ai.com/docs/overview))
- [Multi-Agent Orchestration](https://awesome-repositories.com/f/artificial-intelligence-ml/multi-agent-orchestration.md) — Coordinates multiple AI agents across services with sequential, parallel, and routing patterns.
- [Agent Failure Mitigation](https://awesome-repositories.com/f/artificial-intelligence-ml/agent-failure-mitigation.md) — Ships automated retry policies and failure recovery for maintaining agent reliability. ([source](https://java2ai.com/docs/overview))
- [Agent Context Management](https://awesome-repositories.com/f/artificial-intelligence-ml/agentic-systems-frameworks/agent-reasoning-engines/agent-context-management.md) — Applies built-in prompt engineering and conversation flow control to improve agent reliability. ([source](https://java2ai.com/docs/overview))
- [Service-Based Coordination](https://awesome-repositories.com/f/artificial-intelligence-ml/multi-agent-coordination/service-based-coordination.md) — Demonstrates coordinating agents across services using Nacos for distributed collaboration. ([source](https://java2ai.com/docs/overview))
- [Agent Response Streams](https://awesome-repositories.com/f/artificial-intelligence-ml/multimodal-agent-capabilities/real-time-streaming/agent-response-streams.md) — Streams agent output to clients in real time as it is produced. ([source](https://java2ai.com/docs/overview))

### Part of an Awesome List

- [ReAct Agents](https://awesome-repositories.com/f/awesome-lists/ai/agent-building-frameworks/react-agents.md) — Provides example implementations for building ReAct agents that iteratively reason and act. ([source](https://java2ai.com/docs/overview))
- [ReAct Agent Development](https://awesome-repositories.com/f/awesome-lists/ai/conversational-agents/react-deployments/react-agent-development.md) — Provides example implementations for building ReAct agents that iteratively reason and act.

### Software Engineering & Architecture

- [Graph-Based Workflow Orchestrators](https://awesome-repositories.com/f/software-engineering-architecture/graph-based-workflow-orchestrators.md) — Uses a graph runtime with conditional routing, nested graphs, and parallel execution. ([source](https://java2ai.com/docs/overview))

### Data & Databases

- [Real-Time Text Streaming](https://awesome-repositories.com/f/data-databases/real-time-data-streaming/real-time-text-streaming.md) — Sends agent output to clients in real time as it is produced for interactive experiences.
