Skip to content
Agentmart
Submit a tool

AGENTS.md · alibaba/spring-ai-alibaba

AGENTS.md from alibaba/spring-ai-alibaba: 151 lines covering Project Overview, Repository Structure, Build System, Architecture & Key Concepts and more.

Template by alibaba

IndexedApache-2.0★ 11,060
Write a review

Install

Works with Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Claude Code. Read the repository before you give any tool access to your data.

curl -fsSL https://raw.githubusercontent.com/alibaba/spring-ai-alibaba/main/AGENTS.md -o AGENTS.md

Read it and adapt it to your project before use.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

The AGENTS.md file that alibaba/spring-ai-alibaba (11,060 stars) keeps for coding agents. It has 151 lines in 8 sections: Project Overview; Repository Structure; Build System; Architecture & Key Concepts; Code Style & Conventions; Testing; Tips for AI Assistants; Important Links. Use it as a model for your own project's instructions.

Use cases: prompt-engineering, backend-development

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

What's in it

An AGENTS.md file: instructions coding agents (Codex, Cursor, Copilot, Gemini CLI and others) read before working in a repo.

For
Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Claude Code
Length
151 lines
File
AGENTS.md

Sections

  1. Project Overview
  2. Repository Structure
  3. Build System
  4. Architecture & Key Concepts
  5. Code Style & Conventions
  6. Testing
  7. Tips for AI Assistants
  8. Important Links

First lines (shown under the repo's Apache-2.0 license)

# AGENTS.md - AI Assistant Guide for Spring AI Alibaba

This file provides guidance for AI assistants working with the Spring AI Alibaba codebase.

## Project Overview

Spring AI Alibaba is a production-ready framework for building Agentic, Workflow, and Multi-agent applications. It is an implementation of the Spring AI framework tailored for Alibaba Cloud services and components. It provides a comprehensive ecosystem for developing AI-powered applications with built-in context engineering and human-in-the-loop support.

**Key Features:**

- Multi-Agent Orchestration with built-in patterns
- Context Engineering with human-in-the-loop, context compaction, editing, model call limits
- Graph-based workflow with conditional routing, nested graphs, parallel execution
- A2A (Agent-to-Agent) support with Nacos integration
- Rich model support (DashScope, OpenAI, DeepSeek) and MCP (Model Context Protocol)
- One-stop visual agent platform

## Repository Structure

```
spring-ai-alibaba/
├── spring-ai-alibaba-agent-framework/ # Multi-agent framework (Sequential, Parallel, Routing, etc.)
├── spring-ai-alibaba-graph-core/      # Runtime providing persistence, workflow orchestration, state mgmt
├── spring-ai-alibaba-studio/          # Embedded UI for debugging agents visually
├── spring-ai-alibaba-admin/           # One-stop Agent platform (visual dev, observability, MCP mgmt)
├── spring-ai-alibaba-bom/             # Bill of Materials for dependency management
├── spring-boot-starters/              # Spring Boot Starters
│   ├── spring-ai-alibaba-starter-a2a-nacos/     # Nacos A2A communication
│   ├── spring-ai-alibaba-starter-builtin-nodes/ # Built-in workflow nodes
│   ├── spring-ai-alibaba-starter-config-nacos/  # Dynamic config with Nacos
│   └── spring-ai-alibaba-starter-graph-observation/ # Observability
├── examples/                          # Example applications
│   ├── chatbot/                       # Chatbot example
│   ├── deepresearch/                  # Deep research agent example
│   └── documentation/                 # Documentation examples
├── tools/                             # Build and linting tools
└── docs/                              # Documentation
```

## Build System

### Prerequisites

- **JDK**: 17 (Required by `java.version` property)
- **Maven**: 3.6+
- **Git**

### Common Build Commands

```shell
# Build the entire project (skip tests)
./mvnw -B package -DskipTests=true

# Build a specific module
./mvnw -pl :spring-ai-alibaba-agent-framework -B package -DskipTests=true

# Clean project
./mvnw clean

# Run tests
./mvnw test

# Run linting checks (using Makefile)
make lint
make licenses-check
```

## Architecture & Key Concepts

### Core Components

- **Agent Framework**: Built-in agents like `SequentialAgent`, `ParallelAgent`, `RoutingAgent`, `LoopAgent`.
- **Graph Core**: Underlying engine for stateful agents, supporting persistence (PostgreSQL, MySQL, Oracle, MongoDB, Redis, File).
- **A2A (Agent-to-Agent)**: Enables agents to seek and communicate with each other using Nacos as a registry.
- **Admin & Studio**: Provides visual tools for developing and debugging agent workflows.

### Technology Stack

- **Framework**: Spring Boot 3.5.x, Spring AI 1.1.x
- **Cloud Integration**: Alibaba Cloud DashScope, Nacos (Service Discovery & Config)
- **Observability**: Spring Cloud Observation (Micrometer/OpenTelemetry)

## Code Style & Conventions

### General Guidelines

- Follow **Spring AI** standard code formatting.
- Use **Apache 2.0** license headers for all Java files.
- **Java 17** features are encouraged (records, switch expressions, text blocks).
- Avoid `System.out.println` - use SLF4J logging.
- Use `final` for local variables and parameters where appropriate.
- Use Lombok annotations (`@Data`, `@Slf4j`, etc.) to reduce boilerplate.

### Linting & Formatting

The project uses `make` for linting tasks:
- `make codespell`: Checks for spelling errors.
- `make yaml-lint`: Checks YAML file formatting.
- `make licenses-check`: Verifies license headers.

### License Header

```java
/*
 * Copyright 2025-2026 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
```

## Testing

### Frameworks

- **JUnit 5** (`org.junit.jupiter`)
- **Mockito**

### Running Tests

```shell
# Run all tests
./mvnw test

# Run a specific test class
./mvnw -pl :<module-name> -Dtest=<TestClassName> test
```

## Tips for AI Assistants

1.  **JDK Version**: Project targets JDK 17. Use appropriate language features.
2.  **Spring Boot**: Uses Spring Boot 3.x. Be aware of `jakarta.*` namespace vs `javax.*`.
3.  **Dependencies**: Check `spring-ai-alibaba-bom` or parent pom for version management.
4.  **Makefile**: Use the Makefile in the root for project maintenance tasks (linting, license checks).
5.  **Structure**: When adding new features, prefer creating or updating modules within `spring-ai-alibaba-agent-framework` or `spring-boot-starters` depending on the scope.

## Important Links

- **Issues**: [https://github.com/alibaba/spring-ai-alibaba/issues](https://github.com/alibaba/spring-ai-alibaba/issues)
- **Source**: [https://github.com/alibaba/spring-ai-alibaba](https://github.com/alibaba/spring-ai-alibaba)
- **Contributing**: [CONTRIBUTING.md](CONTRIBUTING.md)

Signals

Stars
11,060
Forks
2,462
Open issues
77
Last commit (this folder)
Jul 9, 2026 (3 months ago)
Last release
Mar 10, 2026 (7 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
Apache-2.0
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from alibaba

Cite this page

AGENTS.md · alibaba/spring-ai-alibaba. Agent Mart. https://agentmart.dev/templates/alibaba-spring-ai-alibaba-agents-md (last updated 2026-10-24)