Exam-style
A customer assistant built as an agent on Bedrock AgentCore currently only answers questions. It now needs to actually reschedule a delivery by calling an internal REST API, then tell the customer what it did. What wires that up?
Reveal the answer
E. Add the API as a gateway target so it is published to the agent as a tool, and the result feeds back into the conversation
A gateway is the supported wiring for side effects: attach the REST API as an OpenAPI target, or the Lambda behind it as a Lambda target, and the gateway publishes it to the agent as an MCP tool. The model plans, the gateway invokes the target, and the result comes back into the conversation for the next turn. Prompting the model with an API spec and parsing its reply rebuilds that orchestration by hand, without the schema validation or the return path. Retrieving API documentation gives the model knowledge about the API rather than the ability to call it, and guardrails filter content instead of performing actions.
Q. Your LLM needs to take real actions, like calling an API. What wires that on Bedrock?
A. A gateway target on Bedrock AgentCore: attach the API or its Lambda to the gateway, which publishes it to the agent as an MCP tool. The model plans, the gateway invokes the target, and the result feeds back into the conversation. Where the call must run under the end user’s own credentials, an inline function tool hands execution back to your code instead.
Why? Side-effecting actions belong behind a declared tool with a typed schema, not baked into the prompt.