Skip to content

Commit 10f745a

Browse files
author
Yuriy Bezsonov
committed
Update READMEs
1 parent 1610895 commit 10f745a

File tree

4 files changed

+126
-818
lines changed

4 files changed

+126
-818
lines changed

samples/spring-ai-te-agent/README.md

Lines changed: 17 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,52 +2,50 @@
22

33
A comprehensive AI-powered agent ecosystem built with Spring AI framework, demonstrating modern AI application patterns including RAG, persistent memory, tool integration, and microservices communication via Model Context Protocol (MCP).
44

5-
## Overview
5+
## Architecture Overview
66

7-
The ecosystem consists of four microservices that work together:
7+
The ecosystem consists of three microservices that work together:
88

99
1. **[AI Agent](ai-agent/README.md)** - Central AI assistant with chat interface, document analysis, and RAG capabilities
1010
2. **[Travel Service](travel/README.md)** - Hotel and flight booking service with MCP integration
11-
3. **[Weather Service](weather/README.md)** - Weather forecast service with MCP integration
12-
4. **[Backoffice Service](backoffice/README.md)** - Expense management and currency conversion service with MCP integration
11+
3. **[Backoffice Service](backoffice/README.md)** - Expense management and currency conversion service with MCP integration
1312

14-
The AI Agent connects to Travel, Weather, and Backoffice services through MCP, enabling it to book travel, get weather forecasts, manage expenses, and provide comprehensive business assistance.
13+
The AI Agent connects to Travel and Backoffice services through Model Context Protocol (MCP), enabling it to book travel, manage expenses, and provide comprehensive business assistance.
1514

1615
## Quick Start
1716

1817
### Prerequisites
18+
1919
- Java 21+
2020
- Maven 3.8+
2121
- Docker (for Testcontainers)
2222
- AWS account with Amazon Bedrock access
2323

2424
### Running the Services
2525

26-
1. **Start Weather Service** (port 8081):
27-
```bash
28-
cd weather/
29-
mvn spring-boot:run
30-
```
26+
1. **Start Travel Service** (port 8082):
3127

32-
2. **Start Travel Service** (port 8082):
3328
```bash
3429
cd travel/
3530
mvn spring-boot:test-run
3631
```
3732

38-
3. **Start Backoffice Service** (port 8083):
33+
2. **Start Backoffice Service** (port 8083):
34+
3935
```bash
4036
cd backoffice/
4137
mvn spring-boot:test-run
4238
```
4339

44-
4. **Start AI Agent** (port 8080):
40+
3. **Start AI Agent** (port 8080):
41+
4542
```bash
4643
cd ai-agent/
4744
mvn spring-boot:test-run
4845
```
4946

5047
4. **Access the application**:
48+
5149
```
5250
http://localhost:8080
5351
```
@@ -57,23 +55,21 @@ Each service uses Testcontainers for automatic database setup - no manual config
5755
## Services
5856

5957
### AI Agent
58+
6059
- **Chat interface** with persistent memory using JDBC
6160
- **Document analysis** (PDF, images) with multimodal AI models
6261
- **RAG implementation** using pgvector for knowledge base
6362
- **Tool integration** and MCP client for microservices
64-
- **Models**: OpenAI GPT-OSS-120B, Claude Sonnet 4, Amazon Nova
63+
- **Models**: Claude Sonnet 4, Amazon Nova
6564

6665
### Travel Service
66+
6767
- **Hotel & flight booking** with comprehensive search
6868
- **Airport information** and flight management
6969
- **MCP server** exposing travel tools to AI Agent
7070

71-
### Weather Service
72-
- **Weather forecasts** for any city worldwide
73-
- **Historical and future weather data** with external API integration
74-
- **MCP server** exposing weather tools to AI Agent
75-
7671
### Backoffice Service
72+
7773
- **Expense management** with approval workflows
7874
- **Currency conversion** with real-time exchange rates
7975
- **MCP server** exposing business tools to AI Agent
@@ -99,18 +95,18 @@ Each service uses Testcontainers for automatic database setup - no manual config
9995
## AWS Configuration
10096

10197
Configure AWS credentials for Bedrock access:
98+
10299
```bash
103100
aws configure
104101
```
105102

106103
Ensure access to required models:
107-
- `openai.gpt-oss-120b-1:0`
104+
108105
- `global.anthropic.claude-sonnet-4-20250514-v1:0`
109106
- `us.amazon.nova-pro-v1:0` (optional)
110107

111108
## Documentation
112109

113110
- [AI Agent Documentation](ai-agent/README.md) - Detailed setup and architecture
114111
- [Travel Service Documentation](travel/README.md) - Travel booking API
115-
- [Weather Service Documentation](weather/README.md) - Weather forecast API
116112
- [Backoffice Service Documentation](backoffice/README.md) - Expense management API
Lines changed: 37 additions & 101 deletions
Original file line numberDiff line numberDiff line change
@@ -1,129 +1,65 @@
11
# Spring AI Agent
22

3-
A comprehensive AI-powered agent built with Spring AI framework, featuring multimodal chat capabilities, document analysis, RAG (Retrieval-Augmented Generation), persistent memory, tool integration, and Testcontainers support for development.
3+
A comprehensive AI-powered agent built with Spring AI framework, featuring multimodal chat capabilities, document analysis, RAG (Retrieval-Augmented Generation), persistent memory, tool integration, and Model Context Protocol (MCP) client functionality.
44

5-
## Related Documentation
5+
## Features
66

7-
This project is part of a larger microservices ecosystem:
7+
- **Multimodal Chat Interface** - Text conversations with document upload support (PDF, JPG, JPEG, PNG)
8+
- **Persistent Memory** - JDBC-based chat memory for conversation continuity across sessions
9+
- **RAG Implementation** - Knowledge base integration using pgvector for document retrieval
10+
- **Tool Integration** - Custom function calling capabilities for extended functionality
11+
- **MCP Client** - Connects to Travel and Backoffice services via Model Context Protocol
12+
- **Multiple AI Models** - Support for Claude Sonnet 4 and Amazon Nova
813

9-
- [Travel Service Documentation](../travel/README.md) - Travel booking service with hotel and flight management
10-
- [Backoffice Service Documentation](../backoffice/README.md) - Expense management and currency conversion service
11-
12-
## Project Overview
13-
14-
### Description
15-
16-
The Spring AI Agent is a demonstration of how to build modern AI-powered applications using the Spring AI framework. It provides a complete set of capabilities for interacting with AI models, including:
17-
18-
- Text-based conversations with persistent memory using JDBC-based chat memory
19-
- Document analysis (PDF, JPG, JPEG, PNG) with multimodal AI models
20-
- Retrieval-Augmented Generation (RAG) for knowledge base integration using pgvector
21-
- Tool integration for enhanced capabilities (DateTime tools)
22-
- Model Context Protocol (MCP) client for connecting to external services
23-
- Testcontainers integration for seamless development and testing
24-
25-
The application serves as the central component in a microservices architecture, connecting to specialized services like the Travel and Backoffice applications through the Model Context Protocol (MCP).
26-
27-
### Purpose
28-
29-
This application serves as:
30-
31-
1. A reference implementation for Spring AI integration in enterprise applications
32-
2. A demonstration of key AI application patterns (RAG, memory, tools, MCP)
33-
3. A practical example of building AI assistants with Spring Boot
34-
4. A showcase for integrating with Amazon Bedrock and other AI services
35-
36-
### Technology Stack
37-
38-
- **Java 21**: Latest LTS version with modern language features
39-
- **Spring Boot 3.5.7**: Core framework for building the application
40-
- **Spring AI 1.0.3**: AI integration framework
41-
- **Amazon Bedrock**: AI model provider (OpenAI GPT-OSS-120B, Claude Sonnet 4, Nova Pro/Premier)
42-
- **PostgreSQL 16**: Database with pgvector extension for vector operations
43-
- **Testcontainers 1.21.3**: Integration testing with containerized dependencies
44-
- **Thymeleaf**: Server-side templating for the web interface
45-
- **Docker**: Containerization for database and application
46-
47-
## Getting Started
14+
## Quick Start
4815

4916
### Prerequisites
5017

51-
- Java 21 or higher
52-
- Maven 3.8 or higher
18+
- Java 21+
19+
- Maven 3.8+
5320
- Docker (for Testcontainers)
5421
- AWS account with Amazon Bedrock access
5522

56-
### Development with Testcontainers
57-
58-
The application uses Testcontainers for seamless development and testing. No manual database setup is required!
59-
60-
#### Prerequisites for Full Functionality
61-
62-
Before starting the AI agent, ensure the dependent services are running:
63-
64-
1. **Start Travel Service** (port 8081):
65-
```bash
66-
cd travel/
67-
mvn spring-boot:test-run
68-
```
69-
70-
2. **Start Backoffice Service** (port 8082):
71-
```bash
72-
cd backoffice/
73-
mvn spring-boot:test-run
74-
```
75-
76-
These services provide MCP tools that the AI agent can use for travel booking and expense management.
77-
78-
#### Running the AI Agent
23+
### Running the Application
7924

8025
```bash
81-
cd ai-agent/
8226
mvn spring-boot:test-run
8327
```
8428

85-
This will:
86-
- Automatically start a PostgreSQL container with pgvector extension
87-
- Initialize the `ai_agent_db` database
88-
- Configure the application to use the containerized database
89-
- Connect to the travel and backoffice services via MCP
90-
- Start the application on port 8080
29+
The application will start on port 8080 with automatic PostgreSQL setup via Testcontainers.
9130

92-
The container will be named `ai-agent-postgres` for easy identification.
31+
Access the web interface at: http://localhost:8080
9332

94-
### AWS Configuration
33+
## Configuration
9534

96-
1. Configure AWS credentials:
97-
```bash
98-
aws configure
99-
```
35+
### AWS Bedrock Setup
10036

101-
2. Ensure you have access to Amazon Bedrock and the required models (Claude Sonnet 4).
37+
Configure AWS credentials and region:
10238

103-
### Building and Running the Application
39+
```bash
40+
aws configure
41+
export AWS_REGION=us-east-1
42+
```
10443

105-
1. **With Testcontainers (Recommended for Development):**
106-
```bash
107-
cd ai-agent/
108-
mvn spring-boot:test-run
109-
```
44+
Ensure access to required models:
11045

111-
2. **Traditional Build and Run:**
112-
```bash
113-
cd ai-agent/
114-
mvn clean package
115-
mvn spring-boot:run
116-
```
46+
- `global.anthropic.claude-sonnet-4-20250514-v1:0`
47+
- `us.amazon.nova-pro-v1:0` (optional)
11748

118-
3. The application will be available at:
119-
```
120-
http://localhost:8080
121-
```
49+
## Architecture
12250

123-
## Contributing
51+
The AI Agent follows a layered architecture:
12452

125-
Contributions are welcome! Please feel free to submit a Pull Request.
53+
- **Web Layer** - Thymeleaf templates and REST controllers
54+
- **Service Layer** - Chat service with memory and RAG integration
55+
- **Integration Layer** - MCP client for external services
56+
- **Data Layer** - PostgreSQL with pgvector extension
12657

127-
## License
58+
## Technology Stack
12859

129-
This project is licensed under the MIT License - see the LICENSE file for details.
60+
- **Spring Boot 3.5.7** - Core framework
61+
- **Spring AI 1.0.3** - AI integration framework
62+
- **Amazon Bedrock** - AI model provider
63+
- **PostgreSQL 16** with pgvector extension
64+
- **Testcontainers 1.21.3** - Development and testing
65+
- **Thymeleaf** - Web templating engine

0 commit comments

Comments
 (0)