Building AI agents with Amazon Nova - Amazon Nova

Building AI agents with Amazon Nova

An AI agent helps your end-users complete actions based on organization data and user input. Agents orchestrate interactions between foundation models (FMs), data sources, software applications, and user conversations. In addition, agents automatically call APIs to take actions and invoke knowledge bases to supplement information for these actions. Developers can save weeks of development effort by integrating agents to accelerate the delivery of generative artificial intelligence (generative AI) applications .

With agents, you can automate tasks for your customers and answer questions for them. For example, you can create an agent that helps customers process insurance claims or an agent that helps customers make travel reservations. You don't have to provision capacity, manage infrastructure, or write custom code. Amazon Nova manages prompt engineering, memory, monitoring, encryption, user permissions, and API invocation.

For information on building AI agents in Amazon Bedrock, see Bedrock Agents.

Agents perform the following tasks:

  • Extend foundation models to understand user requests and break down the tasks that the agent must perform into smaller steps.

  • Collect additional information from a user through natural conversation.

  • Take actions to fulfill a customer's request by making API calls to your company systems.

  • Augment performance and accuracy by querying data sources.

Amazon Nova as an AI agent

To use Amazon Nova models as the foundation model in an AI agent, you can use Amazon Bedrock Agents or you can call a tool with the Converse API or InvokeModel API. Amazon Bedrock Agents is a fully managed service that you can use to build and configure autonomous agents in your application. You can also use the converse API and Invoke model API to connect to other out-of-the-box agent frameworks or build your own agent framework.

You can use placeholder variables in agent prompt templates. The variables will be populated by pre-existing configurations when the prompt template is called. For information about these placeholder variables, see Use placeholder variables in Amazon Bedrock agent prompt templates.

Amazon Bedrock Agents

Amazon Bedrock Agents is a fully managed service for building autonomous agents. Key features include:

  • Autonomous Agents: Create agents that can understand user requests, break down complex tasks, and execute multi-step workflows

  • Built-in API Invocation: Agents automatically call APIs to take actions based on user requests

  • Memory and Context Management: Maintain conversation history and context across interactions

  • Knowledge Base Integration: Connect to knowledge bases to augment responses with relevant information

  • Prompt Engineering: Managed prompt templates optimized for agent workflows

  • Code Interpreter: Execute code to perform calculations and data analysis

  • Multi-Agent Collaboration: Coordinate multiple specialized agents to handle complex workflows

For more information, see Automate tasks in your application using agents.

Converse API

The Converse API provides a consistent interface for building conversational agents. When building agents with the Converse API, consider:

  1. Store Conversation and User Data: Maintain conversation history by including all previous messages in subsequent API calls

  2. Automatic Tool Invocation: Define tools that the model can automatically invoke to perform actions or retrieve information

  3. Built-in Memory: Use the conversation history to provide context for multi-turn interactions

For more information, see Tool use (function calling) with Amazon Nova.

AgentCore

AgentCore is an internal framework for building custom agents. Example implementation:

from strands.models import BedrockModel from strands.agent_core import Agent model = BedrockModel( model_id="us.amazon.nova-premier-v1:0" ) agent = Agent(model=model)

For more information, see internal AgentCore documentation.

Strands

Strands is an internal framework for building agents with Amazon Nova. Example implementation:

from strands import Agent from strands.models import BedrockModel model = BedrockModel( model_id="us.amazon.nova-premier-v1:0", temperature=0.3, top_p=0.8 ) agent = Agent(model=model)

For more information, see internal Strands documentation.

Agentic examples

The following examples demonstrate multi-tool agent configurations for common use cases.

This example shows a hotel reservation cancellation system with coordinated tools:

toolConfiguration: { tools: [ { toolSpec: { name: "getReservation", description: "Retrieves hotel reservation information based on the guest's name and check-in date", inputSchema: { json: JSON.stringify({ type: "object", properties: { name: { type: "string", description: "Guest's full name" }, checkInDate: { type: "string", description: "Check-in date in YYYY-MM-DD format" } }, required: ["name", "checkInDate"] }) } } }, { toolSpec: { name: "cancelReservation", description: "Cancels a hotel reservation using the reservation ID", inputSchema: { json: JSON.stringify({ type: "object", properties: { reservationId: { type: "string", description: "Unique reservation identifier" } }, required: ["reservationId"] }) } } } ] }

This example shows a hotel search agent with filtering capabilities:

toolSpec: { name: "searchHotels", description: "Searches for available hotels based on location, dates, and preferences", inputSchema: { json: JSON.stringify({ type: "object", properties: { location: { type: "string", description: "City or region to search" }, checkIn: { type: "string", description: "Check-in date in YYYY-MM-DD format" }, checkOut: { type: "string", description: "Check-out date in YYYY-MM-DD format" }, guests: { type: "integer", description: "Number of guests" }, priceRange: { type: "object", properties: { min: { type: "number" }, max: { type: "number" } } } }, required: ["location", "checkIn", "checkOut", "guests"] }) } }

Additional Resources