Advanced Tool Use & Agent Engineering

Using Claude with Amazon Bedrock AgentCore Harness

AgentCore is AWS's own agent platform — and Claude sits at the center of it. The Harness defaults to a Claude model, speaks three API formats, and can even call Anthropic's first-party API with a key it keeps vaulted away from your agent code.

Claude 3P 101 · Updated July 2026 · Unofficial guide

Amazon Bedrock AgentCore is AWS's agentic platform for "building, deploying, and operating highly effective agents securely at scale using any framework and foundation model." It is a family of services — Harness, Runtime, Memory, Gateway, Identity, Code Interpreter, Browser, Observability, and more — that can be used together or independently. For Claude users the headline is the AgentCore Harness: a managed agent loop you invoke with one API call, which runs each session in an isolated microVM with filesystem and shell access. And when you don't specify a model, the Harness defaults to Anthropic's Claude Sonnet 4.6 on Amazon Bedrock (global.anthropic.claude-sonnet-4-6). Claude isn't a guest in AWS's agent platform; it's the default resident.

How the Harness is configured

The Harness follows a config-based model: you set defaults at creation time (create-harness with a model, system prompt, tools, memory, and limits) and can override them at invocation (invoke_harness accepts model, systemPrompt, and tools, with CLI flags including --model-id, --max-iterations, --skills, and --allowed-tools). Claude models are selected through bedrockModelConfig.modelId, and — unusually for agent platforms — the model can be switched between turns of the same session, even across providers, with the conversation context carrying over. One authoring note: AWS's own examples mix dated and dateless model-ID formats; for current-generation Claude models on Bedrock, prefer the dateless form (such as anthropic.claude-sonnet-5) used elsewhere in Bedrock's Claude documentation.

Three API formats, two endpoints

Alongside the model ID, bedrockModelConfig.apiFormat selects which protocol the Harness speaks to the model:

apiFormatEndpointWhat it is
converse_stream (default)bedrock-runtimeBedrock's native Converse API
responsesbedrock-mantleOpenAI-compatible Responses API
chat_completionsbedrock-mantleOpenAI-compatible Chat Completions API

The Mantle endpoint, per AWS's docs, "supports a different set of models and capabilities" than the default path — it's the same endpoint family that serves Bedrock's native-Anthropic-API surface. For teams whose tooling was built against OpenAI-shaped APIs, the two Mantle formats are the compatibility bridge; for everything else, the Converse default just works.

Reaching Anthropic's 1P API from inside AgentCore

The most surprising documented path: the Harness can call Claude on Anthropic's first-party API rather than through Bedrock at all. You configure liteLlmModelConfig with a provider-prefixed model ID such as anthropic/claude-sonnet-4-6 plus an apiKeyArn. The Anthropic API key itself lives in AgentCore Identity's token vault as an API-key credential provider; the Harness pulls it at invocation time, and — in AWS's words — "your agent code never sees raw credentials." That's a clean pattern for a real situation: you want AgentCore's managed microVMs and AWS-side operations, but a specific capability or model on Anthropic's own API. The credential hygiene is notable — no Anthropic key in environment variables or agent code.

Naming collision warning: AgentCore has "skills," a Gateway that turns APIs and Lambda functions into MCP-compatible tools, and a Registry cataloging agents and tools. These are AWS-native concepts. AWS's AgentCore documentation does not mention the Claude Agent SDK, Anthropic's MCP connector, or Anthropic's Agent Skills — the same words, different products. Don't assume an Anthropic skill uploads to AgentCore or vice versa.

How this fits the wider Claude-on-AWS picture

AgentCore is one of three documented ways to run Claude agents on AWS, and they answer different questions. AgentCore is AWS-operated hosting for the whole agent loop, model-agnostic by design. The Claude Agent SDK with CLAUDE_CODE_USE_BEDROCK=1 is Anthropic's agent loop running on your own compute against Bedrock models. And Anthropic's hosted Managed Agents product exists on the first-party API and Claude Platform on AWS — but not on Bedrock. Timing note for anyone still on the old stack: the original Amazon Bedrock Agents (now "Agents Classic," which supports all Bedrock models including Claude) closes to new customers on July 30, 2026, with AWS pointing new builds at AgentCore; existing customers can continue as normal. One governance line from AWS's own docs worth flagging to your privacy team: "AgentCore may use and store your content to improve your service experience or performance," scoped to your own use of AgentCore rather than other customers — review that against your data-handling requirements.

Where to go next

Compare the self-managed route in Agent SDK on Bedrock and the Anthropic-hosted route in Agent SDK vs Managed Agents; for the AgentCore service family itself, see the AgentCore architecture overview, and for migration timing, Bedrock Agents Classic to AgentCore.

Sources