Amazon Bedrock AgentCore
AI-generatedSummary
Runs an Amazon Bedrock AgentCore harness agent, either invoking a pre-provisioned harness (via ARN) or auto-provisioning a new one keyed by Agent Name. Supports streaming responses, tool use, skills, memory, and custom models.
Inputs
- harnessArn — ARN of an existing harness to invoke directly. If blank, the node provisions and reuses a harness keyed by Agent Name.
- agentName — Name for the agent. Required when Harness ARN is blank; creates a new harness or reuses an existing one on first run.
- modelProvider — Model provider (bedrock, openai, gemini, litellm). Bedrock is native; OpenAI/Gemini require an API Key ARN.
- modelId — Model ID. When blank with a harness ARN, the harness's model is used; otherwise defaults to Claude Sonnet 4.6 on Bedrock.
- modelOptions — Collection of model settings including max tokens, temperature, top P/K, API base URL, and additional JSON params.
- systemPrompt — Instructions defining agent behavior. When a harness ARN is set, this overrides the harness prompt for this invocation only.
- prompt — The user message to send to the agent. Required unless sending Tool Results back for an inline-function round-trip.
- addTools — Whether to give the agent tools (e.g., code interpreter, browser, MCP server).
- tools — Configuration for tools the agent can use (type, name, description, input schema, gateway ARN, etc.).
- addSkills — Whether to load skill bundles that give the agent domain knowledge on demand.
- skills — Skill bundles the agent loads (AWS skills, Git, S3, or filesystem path).
- sessionId — Controls conversation continuity. Blank generates a new session; a stable value enables multi-turn conversations.
- authentication — Authentication method for the InvokeHarness call: AWS SigV4 (default) or OAuth Bearer Token.
- additionalOptions — Optional settings like Actor ID, endpoint qualifier, max iterations, max tokens, runtime user ID, and timeout.
- toolResults — Results for inline-function tool calls returned by a prior invocation (requires Tool Use ID, function name, and original input).
- provisioningOptions — Options that apply only when the node owns the harness lifecycle (Harness ARN blank): container image, memory mode, filesystem mounts, endpoint management, etc.
Output shape
a single record containing the agent's response, stop reason, tool uses, usage metrics, and harness/session metadata.
Tool results are included in the output under 'toolUses' with 'input' and 'name' populated. When 'toolResults' are provided, they are sent back to the agent to continue the conversation.
Examples
Example 1: Invoke a pre-provisioned agent with a custom prompt.
Harness ARN provided; Model ID set to gpt-5.4; System Prompt set to 'You are a helpful assistant.'; Prompt set to 'What is the weather in Paris?'
Example 2: Create and run a new agent with tools and memory.
Agent Name set to 'my_agent'; Model Provider set to 'bedrock'; Add Tools checked with a Code Interpreter; Memory Mode set to 'managed'; Session ID set to a user-specific value.
Example 3: Continue a conversation by feeding tool results back to the agent.
Tool Results field populated with the Tool Use ID, function name, input, and result content from a previous invocation.