Run Java / Spring AI Agents on AgentCore
Key Takeaways
The video demonstrates how to deploy a Java Spring AI agent on Amazon Bedrock AgentCore Runtime, a container-based and serverless agent runtime, using a chat client builder and a configuration parameter to connect to the Amazon Nova Light model.
Full Transcript
So, lots of people are building AI agents, but where do we run those? There's the new Amazon Bedrock Agent Core runtime, which allows us to take a container built with any agent framework and get that up and running super quick on the cloud. So, let's take a look at how. First, I'm using a Java project with Spring AI, and I've used Spring AI to create my agent. So, to do that, I have a chat client builder, and I just create a chat client. That's going to be connected up to Bedrock. I do that through a configuration parameter, so we can go into my source, resources, and see where I've actually set up the model to point to the Amazon Nova Light model. And then I've set a few more parameters in here. To run on Agent Core runtime, we need to have a request handler for {slash} invocations, and we need to have another request handler for {slash} ping, which will determine if the application is healthy, if the agent can respond to requests. So, I've set those parameters here in the configuration. Now, let's go look at the source code. I've got the chat client, and I've plugged those into a post mapping handler in Spring. So, whenever I get an HTTP post into my application, that'll be handled by this function. It's going to take a prompt and then call Bedrock and return the response. I've then containerized this application. I've uploaded the container up to AWS, and now I'm going to go create a new Agent Core runtime environment for this thing to run it. So, to do that, I'm going to say host agent. I can give it a name. I can specify my Docker container, which is this one. And then I can assign the IAM permissions and hit host agent. That'll take a couple minutes to provision and get all up and running, but once it's up and running, what we'll see is, like this one, here's the information about this agent running on Agent Core runtime. And this thing is secured through IAM. And so, the easiest way to actually test this thing is just within the console, I can go to the agent sandbox, select which agent and which version I want to use, and then put in the JSON that I want to send to that invocations endpoint, which will go to my agent, go to Bedrock, and I'm going to say, all right, my question is, tell me a joke, and I hit run. So, now Agent Core runtime will spin up my container, send the request to it. That container will then make the request to Bedrock and return the response, and there we go. Sure enough, I see my response from my agent. Joke is, why did the scarecrow win an award? Because he was outstanding in his field. So, great joke, Bedrock, thank you, and hope you try out Agent Core with Java or with whatever agent framework you want to use.
Original Description
Running Java AI Agents on the cloud has never been easier than with Amazon Bedrock AgentCore Runtime! Check out this quick demo of deploying a Spring AI agent to the container-based, serverless, agent runtime!
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
Playlist
Uploads from AWS Developers · AWS Developers · 0 of 60
← Previous
Next →
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Using Microsoft Active Directory across On-premises and Cloud Workloads
AWS Developers
What is Cloud Computing with AWS? | Hebrew Webinar
AWS Developers
Best Practices for Getting Started with AWS | Hebrew Webinar
AWS Developers
Best Practices for Using AWS Identity and Access Management (IAM) Roles
AWS Developers
Building Scalable Web Apps | Hebrew Webinar
AWS Developers
Dev & Test on the AWS Cloud | Hebrew Webinar
AWS Developers
Storage & Backup on AWS | Hebrew webinar
AWS Developers
Disaster Recovery on AWS | Hebrew Webinar
AWS Developers
AWS Israel News | Episode 1
AWS Developers
Security Best Practices on AWS | Hebrew Webinar
AWS Developers
Ready: Introduction to AI on AWS | Hebrew Webinar
AWS Developers
Set: What is ML for developers? | Hebrew Webinar
AWS Developers
Go!: Building your own ChatBot with Amazon Lex | Hebrew Webinar
AWS Developers
And Beyond: Amazon Sagemaker | Hebrew Webinar
AWS Developers
Building API-Driven Microservices with Amazon API Gateway - AWS Online Tech Talks
AWS Developers
Understanding AWS Secrets Manager - AWS Online Tech Talks
AWS Developers
Best Practices for Building Enterprise Grade APIs with Amazon API Gateway - AWS Online Tech Talks
AWS Developers
Build, Train and Deploy Machine Learning Models on AWS with Amazon SageMaker - AWS Online Tech Talks
AWS Developers
AWS Israel News | Episode 2 | re:Invent
AWS Developers
AWS Floor28 News - January
AWS Developers
AWS Floor28 News - February - Hebrew
AWS Developers
AWS Floor28 News - March - Hebrew
AWS Developers
AWS Floor28 News - April - Hebrew
AWS Developers
AWS Floor28 News - May - Hebrew
AWS Developers
Authentication for Your Applications: Getting Started with Amazon Cognito - AWS Online Tech Talks
AWS Developers
AWS Floor28 News - June - Hebrew
AWS Developers
AWS Floor28 News - July - Hebrew
AWS Developers
Enriching your app with Image Recognition and AWS AI Services - AWS Webinar - Hebrew
AWS Developers
Personalize, Forcast, and Textract - AWS Webinar - Hebrew
AWS Developers
Managing Your ML Development Lifecycle with Amazon SageMaker - AWS Webinar - Hebrew
AWS Developers
Running your ML code in Amazon Sagemaker - AWS Webinar - Hebrew
AWS Developers
Get Started in Minutes with Amazon Connect in Your Contact Center - AWS Online Tech Talks
AWS Developers
AWS Floor28 News - August - Hebrew
AWS Developers
AWS Floor28 News - September - Hebrew
AWS Developers
Deep Dive on Amazon EventBridge - AWS Online Tech Talks
AWS Developers
Advanced Serverless Orchestration with AWS Step Functions - AWS Online Tech Talks
AWS Developers
Living on the Edge - an Introduction to Amazon CloudFront and Lambda@Edge - Hebrew Webinar
AWS Developers
AWS Floor28 News - October - Hebrew - YouTube
AWS Developers
What's New with AWS Storage - AWS Online Tech Talks
AWS Developers
How to Build a Compelling Migration Business Case Using TSO Logic - AWS Online Tech Talks
AWS Developers
Configuring and Managing Amazon S3 Replication - AWS Online Tech Talks
AWS Developers
AWS Floor28 News - November - Hebrew
AWS Developers
Using Relational Databases with AWS Lambda - Easy Connection Pooling - AWS Online Tech Talks
AWS Developers
AWS Floor28 News - December 2019 - Hebrew
AWS Developers
AWS Floor28 News - January 2020 - Hebrew
AWS Developers
Top 10 Data Migration Best Practices - AWS Online Tech Talks
AWS Developers
How to Use Azure Active Directory with AWS SSO - AWS Online Tech Talks
AWS Developers
AWS Tips & Tricks - Amazon Redshift Advisor - Hebrew
AWS Developers
AWS Tips & Tricks - Amazon Redshift Elastic Resize - Hebrew
AWS Developers
AWS Tips & Tricks - Amazon Redshift Spectrum - Hebrew
AWS Developers
AWS Tips & Tricks - Savings Plans & Cost Explorer - Hebrew
AWS Developers
AWS Tips & Tricks - Amazon Redshift Concurrency Scaling - Hebrew
AWS Developers
AWS Tips & Tricks - Training Models with Amazon SageMaker - Hebrew
AWS Developers
AWS Tips & Tricks - Auto Model Tuning with Amazon SageMaker - Hebrew
AWS Developers
AWS Tips & Tricks - Amazon Comprehend - Hebrew
AWS Developers
Understanding High Availability and Disaster Recovery Features for Amazon RDS for Oracle
AWS Developers
Amazon Forecast – Forecasting - From Months to Days (Hebrew)
AWS Developers
Visualize your data with Amazon QuickSight (Hebrew)
AWS Developers
Amazon Kendra (Hebrew)
AWS Developers
AWS Floor28 News - AI/ML Special Edition
AWS Developers
More on: Agent Foundations
View skill →Related Reads
📰
📰
📰
📰
How I Built a WhatsApp AI Assistant for a SA Salon - And What It Taught Me About Local AI
Dev.to AI
{
Dev.to AI
Why Adding More Rules Makes Your Agent Dumber - 268 Rules, 14 Always Loaded, and a Tool to Audit Yours
Dev.to · Xin & EQ
Do not migrate an AI API by changing only the base URL
Dev.to · Edward Li
🎓
Tutor Explanation
DeepCamp AI