Skip to content
Agentmart
Submit a tool

AGENTS.md · spring-projects/spring-ai

AGENTS.md from spring-projects/spring-ai: 33 lines covering Build, Code style, Commits and pull requests.

Template by spring-projects

IndexedApache-2.0★ 9,580
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/spring-projects/spring-ai/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 spring-projects/spring-ai (9,578 stars) keeps for coding agents. It has 33 lines in 3 sections: Build; Code style; Commits and pull requests. Use it as a model for your own project's instructions.

Use cases: prompt-engineering

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
33 lines
File
AGENTS.md

Sections

  1. Build
  2. Code style
  3. Commits and pull requests

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

# Spring AI agent guidelines

Concise extract of [CONTRIBUTING.md](CONTRIBUTING.md), which remains the reference for humans.

## Build

- JDK 17 with `-XDaddTypeAnnotationsToSymbol` support (see `.sdkmanrc`, e.g. `17.0.19-librca`), native CPU architecture.
- Build and unit tests: `./mvnw clean package` (scope with `-am -pl <module>`).
- Format sources: `./mvnw process-sources` (enforced by CI, does not fix import order).
- Local builds reformat sources automatically: add `-Dspring-javaformat.skip=true` to disable it, or `-P'!format-apply,format-check'` to fail on violations without modifying files.
- Integration tests for a module: `./mvnw -am -pl <module> -Pintegration-tests verify`.
- Single integration test: add `-Dfailsafe.failIfNoSpecifiedTests=false -Dit.test=<TestClassIT>`; tests needing a missing provider API key are skipped.
- Javadoc check: `./mvnw javadoc:javadoc`. Reference docs: `./mvnw -pl spring-ai-docs antora`.
- Maven build cache is enabled; if the build breaks for no clear reason, retry with `-Dmaven.build.cache.enabled=false`.

## Code style

- Follow Spring Framework code style; match surrounding code and do not reformat unrelated code.
- Tabs, LF, UTF-8, no trailing whitespace; wrap Javadoc at 90 and code at ~120 characters.
- Import order, groups separated by a blank line: `java.*`, then `javax.*` + `jakarta.*`, then others, then `org.springframework.*`, then static imports.
- No wildcard imports. No static imports in production code except constants/enum constants and third-party DSL factory methods; use them in tests (e.g. `assertThat`).
- Every source file: Apache 2.0 license header (`Copyright 2023-present the original author or authors.`, copy from an existing file), package, imports, exactly one top-level class.
- Add `@since` on new public types and methods (e.g. `@since 2.0.0`).
- Add or update tests for any code change.
- In `.adoc` and `.md` files, write one sentence per line.

## Commits and pull requests

- Title: imperative, capitalized verb, ideally under 50 characters, no `fix:`/`docs:` prefixes and no issue/PR number.
- Body wrapped at ~72 characters, followed by `Fixes #123`/`Closes #123` (or `See #123`), then a `Signed-off-by: Name <email>` trailer (DCO, use `git commit -s`).
- Enclose annotations in backticks in commit messages to avoid mentioning GitHub users.
- PR titles feed the changelog: short, descriptive, types or file names in backticks; reference related issues in the description, not the title.

Signals

Stars
9,580
Forks
2,994
Open issues
977
Last commit (this folder)
Oct 1, 2026 (28 days ago)
Last release
Oct 23, 2026 (6 days ago)

From GitHub (fetched Oct 24, 2026).

Details

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

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