Skip to main content
Incubating Status GitHubMaven Central

Overview

A Spring Boot starter that enables existing Spring Boot applications to conform to the AWS Bedrock AgentCore Runtime contract with minimal configuration. Simply add the dependency and annotate your agent methods.
Version: 1.0.0-RC3

Modules

Key Features

Auto-configuration

Automatically sets up AgentCore endpoints when added as dependency

Annotation-based

Simple @AgentCoreInvocation annotation to mark agent methods

SSE Streaming

Server-Sent Events support with Flux<String> return types

Health Checks

Built-in /ping endpoint with Spring Boot Actuator integration

Async Task Tracking

Prevents premature shutdown during background work

Rate Limiting

Built-in Bucket4j throttling for invocations and ping endpoints

Quick Start

1. Add Dependency

2. Create Agent Method

3. Run Application

The application will automatically expose:
  • POST /invocations - Agent processing endpoint
  • GET /ping - Health check endpoint

Supported Method Signatures

Background Task Tracking

AWS Bedrock AgentCore Runtime monitors agent health and may shut down agents that appear idle. Use AgentCoreTaskTracker to communicate active work:
The /ping endpoint returns:
  • “Healthy” - Agent is ready, no background tasks
  • “HealthyBusy” - Agent is healthy but actively processing (prevents shutdown)
  • “Unhealthy” - Agent has issues (with Actuator integration)

Health Monitoring

Without Spring Boot Actuator:
  • Returns static “Healthy” status
  • Always responds with HTTP 200
With Spring Boot Actuator:
  • Integrates with Actuator health checks
  • Maps Actuator status: UP → “Healthy”, DOWN → “Unhealthy”
  • Tracks status change timestamps

Custom Controller Override

Override default controllers with custom implementations using marker interfaces:

Configuration


Memory Module

The spring-ai-memory-bedrock-agentcore module provides Spring AI ChatMemoryRepository integration with AWS Bedrock AgentCore Memory for persistent conversation storage.

Add Dependency

Configure Memory

Use with Spring AI

Conversation ID Format

  • Simple: user123 → actor: user123, session: default-session
  • With Session: user123:session456 → actor: user123, session: session456

Message Type Mapping

AWS Permissions

Examples

See the examples/ directory in the repository:

Requirements

  • Java 17+
  • Spring Boot 3.x
  • Spring AI 1.1.1+ (for memory module)

Resources

GitHub Repository

Source code and contribution guidelines

AWS Bedrock AgentCore

AWS Bedrock AgentCore documentation

License

This project is licensed under the Apache License 2.0.