What you define when creating an agent
When you create an agent in the Bedrock console, the agent builder wizard collects the required inputs. These choices shape the agent’s capabilities and the permissions it needs.
Callout for IAM role:
Ensure the IAM role you attach to the agent has the proper policies to invoke the Lambda function and any other AWS resources the agent will use.
Agent instructions and the SWAPI example
Agent instructions provide high-level context and procedural guidance the model uses while planning actions. For a Star Wars assistant you might instruct the agent to:- Use the SWAPI action group when looking up canonical facts about characters.
- When the user provides a character name, call the search endpoint (
/people?search=<term>) to find matching characters. - If multiple matches are returned, ask a follow-up question to disambiguate.
- For detailed attributes, call the detail endpoint (e.g.,
/people/{id}) once you have an identifier.
- The agent instructions (behavior and persona).
- The OpenAPI schema for the action group (API surface and parameters).
- The Lambda function (or other invocation target) that will execute the API calls.
What Bedrock handles at runtime
Amazon Bedrock’s agent runtime manages the orchestration of model reasoning and tool invocations. Key runtime responsibilities include:Example user flow: “Tell me about Luke Skywalker.”
- The user prompt arrives at your Bedrock application and is forwarded to the Bedrock agent runtime with the agent configuration.
- The agent’s model recognizes this as a character lookup and consults the configured action group to decide which endpoint(s) to call.

- Call the search endpoint (via the configured Lambda).
- Receive a list of matches and extract the identifier for the correct match. If multiple matches exist, the agent may request clarification from the user.
- Call the detail endpoint using the chosen identifier (another Lambda invocation to SWAPI).
- Aggregate the results and return a final, formatted answer to your application.
Conceptual split: Agent runtime vs. agent configuration
Think of a Bedrock agent as two complementary layers:
You define the agent configuration up front (instructions, tools, model). After that, your application simply calls into the agent runtime using the
InvokeAgent API and Amazon Bedrock handles the orchestration: tool selection, parameter elicitation, invocation of configured functions/APIs, and final response composition.
Links and references
- Amazon Bedrock
- AWS Lambda
- IAM (Identity and Access Management)
- OpenAPI Specification
- SWAPI — Star Wars API
- InvokeAgent API (Bedrock API Reference)