Module 11 Lesson 1: Action Groups and Schemas
·AWS Bedrock

Module 11 Lesson 1: Action Groups and Schemas

Defining the Capability. How to describe your APIs to a Bedrock Agent using OpenAPI schemas.

Defining the "Hands": Action Groups

An agent with instructions but no tools is just a "Chatter." In Bedrock, we give agents "Hands" using Action Groups. An Action Group is a collection of functions that the agent is allowed to call.

To help the agent understand what each function does, we use an API Schema (OpenAPI/Swagger).

1. How the Agent "Sees" a Tool

The agent reads your schema to understand:

  • Function Name: e.g., get_weather
  • Description: e.g., "Retrieves the current temperature for a given city."
  • Parameters: e.g., city (string).

2. Example: OpenAPI Schema Snippet

{
  "name": "get_stock_price",
  "description": "Get the current stock price for a ticker symbol",
  "parameters": {
    "ticker": {
      "type": "string",
      "description": "The stock ticker (e.g., AMZN, AAPL)"
    }
  }
}

3. Visualizing Discovery

graph TD
    User[What is the price of AMZN?] --> Agent[Agent Brain]
    Agent --> S[Read Action Schema]
    S -->|Match| Tool[Action: get_stock_price]
    Agent -->|Execute| Tool

4. Why Descriptions are Mandatory

In traditional coding, a function name is enough. In AI agents, the Description is what the model uses to "Decide."

  • Wrong: check_db(str text)
  • Right: check_customer_record - "Use this function to retrieve the lifetime value and address for a customer ID."

Summary

  • Action Groups are the set of tools available to an agent.
  • API Schemas define the name, purpose, and parameters of each tool.
  • Descriptions are the most important part—they guide the model's reasoning.
  • Without a schema, the agent has no way to know your external APIs exist.

Subscribe to our newsletter

Get the latest posts delivered right to your inbox.

Subscribe on LinkedIn