Subchapter 20.1
references/cost.mdMarkdown7 KBView on GitHub
Understand what drives AgentCore costs and how to control them. Pricing values are volatile — always verify against the AgentCore pricing page.
AgentCore charges for several things independently:
| Component | What you pay for | Published rate (verify for current) | Biggest cost drivers |
|---|---|---|---|
| Runtime compute | vCPU-hours + GB-hours while session is active | $0.0895/vCPU-hr, $0.00945/GB-hr | Session length, idle timeout, cold starts |
| Memory events | Creating events (writes) | $0.25 per 1,000 new events | Session volume, number of strategies |
| Memory storage | Long-term memory records stored | $0.75 per 1,000 records/month (built-in); $0.25 (override/self-managed) | Number of strategies, expiry duration |
| Memory retrieval | Retrieving memory records | $0.50 per 1,000 retrievals | Retrieval frequency, top_k value |
| Gateway tool calls | Per tool invocation routed through gateway | $0.005 per 1,000 (ListTools/InvokeTool/Ping); $0.025 per 1,000 (Search) | Tool call volume |
| Evaluator model calls | Bedrock model usage for LLM-as-judge evaluators | Built-in: $0.0024/10K input tokens, $0.012/10K output tokens; Custom: $1.50/10K evals | Online eval sampling rate × session volume |
| Bedrock model usage | Input/output tokens for every model call | Varies by model — check Bedrock pricing | Model choice (Sonnet vs Haiku), conversation length |
| Policy authorization | Per authorization request + input tokens | $0.000025/request, $0.13/10K input tokens | Tool call volume with policy engine attached |
| Identity | Token/API key requests for non-AWS resources | $0.010 per 1,000 requests | Credential fetch frequency |
| CloudWatch logs/traces | Ingestion and storage | Standard CloudWatch pricing | Log verbosity, retention policy |
| ECR storage (Container builds only) | Image storage | Standard ECR pricing | Image size, build frequency |
Rates above are published as of the time of writing. Always verify against the AgentCore pricing page (opens in a new tab) — pricing changes between releases.
There’s no single number — it depends on:
A simple Haiku-based agent with no memory and no tools costs very little per request — Runtime compute is billed by vCPU-hour ($0.0895) and GB-hour ($0.00945), so a sub-second request on a small environment costs fractions of a cent. A Sonnet agent with semantic memory, 5 gateway tools, and online evals at 10% sampling costs significantly more per request — the model token costs alone can be 10–30x higher, plus memory extraction ($0.25 per 1,000 events), gateway tool calls ($0.005 per 1,000 invocations), and eval model usage. These are published rates as of the time of writing — verify against the AgentCore pricing page (opens in a new tab) for current numbers. If the awsknowledge MCP server is available, use the aws___search_documentation tool to look up current AgentCore pricing.
Use the --defaults flags (Strands, Bedrock, no memory) during development. Stay under the free tier where possible. The biggest surprises come from:
idleRuntimeSessionTimeout reclaims it. Default timeout is 15 minutes. Call StopRuntimeSession when done, or lower the timeout. See agents-harden Session lifecycle management.AgentCore supports four model providers — pick the right one for the task, not just the default:
| Model tier | Examples | Good for |
|---|---|---|
| Cheapest / simplest | amazon.nova-micro-v1:0, claude-3-5-haiku-*, Gemini Flash, GPT-5-nano | Classification, extraction, simple routing, short responses |
| Mid-tier | amazon.nova-lite-v1:0, Gemini 2.5 Flash | Most general-purpose agents with light reasoning |
| Premium / reasoning | anthropic.claude-sonnet-4-5-*, GPT-5, Gemini 2.5 Pro | Complex reasoning, code generation, multi-step planning |
Rules of thumb:
SEMANTIC is the most expensive strategy. If you only need session summaries, use SUMMARIZATION alone.relevance_score up so fewer memory records retrieve per query--expiry to the shortest duration that serves your use case (default is 30 days)agentcore pause online-eval <name> when debugging or iterating — resume when you’re ready to measureSet retention policies on log groups:
aws logs put-retention-policy \
--log-group-name /aws/bedrock-agentcore/runtimes/<AGENT_ID>-DEFAULT \
--retention-in-days 30Don’t log entire payloads — log structured events with just what you need
X-Ray sampling is configured automatically; no dial to turn there
agents-harden Initialization time section)references/evals.md Path A (evaluator model choice applies the same way)agents-build/references/memory.md (opens in a new tab)agents-harden Observability section