← Agent Frameworks 🕐 15 min read
Agent Frameworks

Bedrock AgentCore Cost Tracking and Economics (2026)

Amazon Bedrock AgentCore was announced at re:Invent 2024 and reached general availability in October 2025.

Amazon Bedrock AgentCore was announced at re:Invent 2024 and reached general availability in October 2025. It is AWS’s managed runtime platform for production AI agents — a horizontally integrated suite covering agent execution, persistent memory, sandboxed code execution, headless browser automation, tool authentication, and observability. The key architectural claim is that each capability is independently billable and independently adoptable; teams can use only the Gateway while keeping their own orchestration, or they can run the full stack.

The Twelve Billing Dimensions

AgentCore meters across twelve distinct line items. In practice, two of them — Runtime duration and long-term Memory retention — drive 70–80% of total AgentCore spend for most production agents. The full list:

Component Billing Unit Rate (us-east-1, June 2026)
Runtime per active vCPU-hour $0.0895
Runtime per active GB-hour $0.00945
Code Interpreter same vCPU/GB-hour as Runtime $0.0895 / $0.00945
Browser Tool same vCPU/GB-hour as Runtime $0.0895 / $0.00945
Memory — short-term per 1,000 events created $0.25
Memory — long-term (built-in) per 1,000 records/month $0.75 (inference bundled)
Observability — span ingestion per GB ingested $0.35
Observability — event logging per GB ingested $0.50
Gateway — tool invocations per 1,000 API calls $0.005
Gateway — search queries per 1,000 queries $0.025
Gateway — tool indexing per 100 tools/month $0.02
Policy per request $0.000025
Bedrock model inference pass-through token pricing standard per-model rates

Note: AWS updates AgentCore rates more frequently than most services. Treat these figures as a calibration baseline. Always verify against aws.amazon.com/bedrock/agentcore/pricing/ before committing to a cost model.

Critical Billing Mechanic: Active CPU Only

Runtime, Code Interpreter, and Browser bill only for active CPU cycles consumed — not for wall-clock time, not for I/O wait. When an agent is blocked waiting for a model response, a database result, or an HTTP API, the clock stops. AWS claims this typically represents 30–70% of agent session time, meaning real vCPU-hour spend is substantially lower than a naive wall-clock estimate would produce. The billing granularity is per-second with a 1-second minimum per invocation.

How AgentCore Costs Appear in CUR

AgentCore line items appear in Cost and Usage Reports (CUR) under ProductCode = AmazonBedrockAgentCore. The key UsageType values to isolate:

  • USE1-AgentCore-Runtime-vCPU-Hours
  • USE1-AgentCore-Runtime-GB-Hours
  • USE1-AgentCore-Memory-LT-Records
  • USE1-AgentCore-Memory-ST-Events
  • USE1-AgentCore-Observability-Span-GB
  • USE1-AgentCore-Gateway-Requests

These are distinct from standard Bedrock inference tokens, which continue to appear under AmazonBedrock with UsageType patterns like USE1-Bedrock-InputTokens. A team running AgentCore will see two separate product lines: one for AgentCore infrastructure, one for the underlying model tokens. The model spend is pass-through at standard Bedrock rates and does not appear under the AgentCore product code.

CUDOS (Cost and Usage Dashboard Operations Solution) added a dedicated AgentCore breakout to its UsageType Group panel. Teams using CUDOS v5.8+ can filter the AI/ML tab by UsageTypeGroup = AgentCore to see the infrastructure spend separately from inference.


2. AgentCore Memory Store Cost Model

Memory Architecture

AgentCore Memory operates on two tiers:

Short-term memory stores raw conversational events in-session. Every CreateEvent API call creates one billable event. This is essentially append-only session context — each user message and each agent response is one event. Short-term memory can be retained up to 365 days; the TTL is configurable per memory store.

Long-term memory stores structured records extracted asynchronously from short-term memory. After a session ends (or hits its session TTL), AgentCore runs background extraction that identifies facts, preferences, and episodic summaries and writes them as long-term records. This background extraction uses Bedrock model inference, which is bundled into the $0.75/1,000 records/month long-term rate — making it effectively a combined compute + storage charge.

Memory Type Taxonomy

Within long-term memory, AgentCore supports four extraction strategies that correspond to what the community calls semantic, episodic, and procedural memory:

Strategy What It Stores Cost Note
Summarization Compressed session summaries Standard long-term record rate
Semantic Facts, entities, and knowledge extracted from conversation Standard long-term record rate
Preference User preferences and personalization signals Standard long-term record rate
Episodic Goal, reasoning chain, actions, outcomes, reflections Standard long-term record rate

All four strategies are billed at the same per-record rate. There is no premium for episodic vs. semantic. The differentiation is in the extraction compute (bundled in the $0.75 rate) and in how many records per session each strategy tends to produce — episodic extraction typically generates 1–3 records per meaningful session; preference extraction accumulates slowly.

Custom extraction strategies (user-defined extraction logic via Lambda) incur additional Lambda execution costs on top of the standard record rate.

TTL and Retention Economics

AWS documentation suggests:

  • 90-day TTL for B2C agents (high session volume, lower per-user signal value)
  • 180–365 days for B2B agents with intermittent but high-value engagement

A long-term record stored for 90 days costs $0.0675 per record (90/30 × $0.75/1,000 = $0.00225 × 30 months prorated). At 365 days, the same record costs $0.2738. The cost difference between a 90-day and 365-day TTL policy on a corpus of 1M records is roughly $200/month — not negligible at scale.

Cost at Scale: 1,000 Agents × 100 Memory Operations/Day

Assumptions:

  • 1,000 agents, each running 100 sessions/day
  • Each session: 10 user turns + 10 agent turns = 20 short-term events
  • Each session generates 2 long-term records on average
  • 30-day retention on short-term; 90-day TTL on long-term

Monthly calculation:

  • Short-term events: 1,000 × 100 × 20 = 2,000,000 events/day × 30 = 60M events/month
    • Cost: 60,000 × $0.25 = $15,000/month
  • Long-term records created: 1,000 × 100 × 2 = 200,000/day × 30 = 6M records created/month
    • At steady state, stored corpus ≈ 18M records (90-day TTL)
    • Cost: 18,000 × $0.75 = $13,500/month
  • Total memory: ~$28,500/month

This is a substantial cost driver. The short-term event rate ($0.25/1K) can be reduced by batching multi-turn context into fewer CreateEvent calls rather than one call per message.

Self-Managed Alternative: DynamoDB + OpenSearch

For comparison, a DIY memory stack at the same 1,000-agent scale:

Component Setup Monthly Cost
DynamoDB (session store) On-demand, 200M writes/month + 400M reads/month ~$350
OpenSearch Serverless 2 OCU minimum + 30GB storage ~$700 + $35
Embedding calls (Titan v2) 60M events × avg 200 tokens ~$1,200
Lambda (orchestration glue) 60M invocations × 200ms ~$600
DIY total ~$2,885/month

AgentCore Memory at this scale ($28,500) is roughly 10× the cost of a well-architected DIY stack. The managed cost buys: zero embedding pipeline management, automatic extraction and consolidation, built-in semantic search without OpenSearch provisioning complexity, and the episodic/preference extraction that would require significant custom Lambda logic in a DIY system. For teams with agent memory as a core product feature and fewer than ~50K agents, DIY likely wins on pure cost. AgentCore Memory wins on time-to-production and operational overhead.


3. AgentCore Code Interpreter Economics

Pricing Mechanics

Code Interpreter uses the same vCPU/GB-hour rates as Runtime: $0.0895/vCPU-hour, $0.00945/GB-hour. The key advantage over fixed-resource services is active-only billing: CPU billing stops during I/O wait (file reads, network calls, model API responses). For data-heavy Python workloads where the interpreter spends most of its time waiting on pandas operations or external API calls, effective cost can be 40–60% below a naive estimate.

Supported runtimes: Python, JavaScript, TypeScript. AWS does not publish a runtime-specific premium — all three are billed at the same rate.

Example: Data Analyst Agent

Scenario:

  • 10,000 requests/day, 3 code executions per request = 30,000 executions/day
  • Average execution duration: 2 minutes wall-clock
  • 60% I/O wait → 40% active CPU time = 48 seconds active per execution
  • Resources: 2 vCPU, 4 GB RAM

Daily cost:

  • Active vCPU-seconds: 30,000 × 48s × 2 vCPU = 2,880,000 vCPU-seconds = 800 vCPU-hours
  • vCPU cost: 800 × $0.0895 = $71.60/day
  • Active GB-seconds: 30,000 × 48s × 4 GB = 5,760,000 GB-seconds = 1,600 GB-hours
  • GB cost: 1,600 × $0.00945 = $15.12/day
  • Daily total: ~$86.72/day → ~$2,602/month

Lambda Comparison for the Same Workload

An equivalent Lambda configuration (2 vCPU ≈ 2,048 MB allocation, 2-minute timeout, 30K invocations/day):

  • Lambda pricing: $0.0000166667/GB-second
  • 2,048 MB × 120s × 30,000 = 7,372,800,000 GB-ms = 7,372,800 GB-seconds
  • Lambda cost: 7,372,800 × $0.0000166667 = $122.88/day
  • Requests: 30,000 × $0.0000002 = $0.006/day
  • Lambda total: ~$122.89/day → ~$3,687/month

AgentCore Code Interpreter is approximately 30% cheaper than Lambda for this workload because Lambda bills for the full 120-second wall-clock duration while AgentCore bills only the 48 seconds of active CPU.

When Code Interpreter Beats Lambda

AgentCore Code Interpreter wins when:

  1. Executions have high I/O wait ratios (>40% idle time) — the billing gap widens
  2. You need execution isolation without managing Lambda layers, container images, or VPC NAT
  3. Executions require the full Python scientific stack (pandas, matplotlib, numpy) without custom layer management
  4. Executions are part of multi-step agent workflows where the same Runtime context needs to persist state

Lambda wins when:

  1. Executions are short (<10 seconds) and CPU-bound — the 1-second billing minimum favors Lambda’s lower base rate
  2. Your agent stack is already on Lambda and re-architecture cost exceeds the pricing delta
  3. You need runtimes beyond Python/JS/TS (Go, Rust, Java)
  4. Invocation volume is under ~20K/month where Lambda free tier applies

Cold Start Overhead

AWS does not publish explicit cold start latency or cost figures for Code Interpreter. Community observations suggest sandbox initialization adds 800ms–2s to the first execution in a new AgentCore session. Since billing is per-second with a 1-second minimum, a cold start on a fast execution (<1s) rounds up to the same cost as a 2-second execution. For workloads with many short, isolated executions, session-level warm pooling (keeping the AgentCore session alive between requests) reduces cold start frequency.


4. AgentCore Observability and Tracing

Architecture

AgentCore Observability emits all telemetry in OpenTelemetry-compatible format. Telemetry is ingested into CloudWatch, where it breaks into two categories:

  • Spans — structured trace data covering each agent step, tool call, model invocation, and memory operation. Billed at $0.35/GB ingested.
  • Event logs — unstructured and semi-structured log output from the agent runtime. Billed at $0.50/GB ingested.

Standard CloudWatch metrics and non-telemetry log data flow through normal CloudWatch pricing channels and are not AgentCore-specific charges.

Trace Retention

Spans and logs land in CloudWatch Log Groups. Retention follows standard CloudWatch Log Group retention settings (1 day to 10 years, or never expire). CloudWatch charges $0.03/GB/month for storage after the first month of ingestion. AWS X-Ray integration is available for distributed tracing propagation across service boundaries when AgentCore agents call external services or downstream Lambda functions.

Cost Per Traced Request

For a typical production agent session (3 tool calls, 2 LLM hops, 1 memory retrieval):

  • Span payload estimate: ~8 KB per session (spans for each step)
  • At 10,000 sessions/day: 80 MB/day = 2.4 GB/month
  • Span ingestion cost: 2.4 × $0.35 = $0.84/month (trivial at this scale)

Tracing costs only become material at high volume with verbose span payloads. An agent with 15+ tool calls per session and detailed input/output capture in each span can generate 50–100 KB per session. At 10K sessions/day with 50 KB/session: 15 GB/month → $5.25/month for spans. Still modest, but multiplied across 50K sessions/day it becomes a line item worth managing.

CUR Isolation of Observability Costs

In CUR, AgentCore observability spend appears as:

  • ProductCode = AmazonBedrockAgentCore, UsageType = USE1-AgentCore-Observability-Span-GB
  • ProductCode = AmazonBedrockAgentCore, UsageType = USE1-AgentCore-Observability-Log-GB

CloudWatch storage for the retained logs appears separately under ProductCode = AmazonCloudWatch. Teams doing full cost accounting need to include both. The Athena query pattern to isolate AgentCore observability total:

SELECT
  line_item_usage_type,
  SUM(line_item_unblended_cost) AS total_cost,
  SUM(line_item_usage_amount) AS total_usage
FROM cur_table
WHERE line_item_product_code IN ('AmazonBedrockAgentCore', 'AmazonCloudWatch')
  AND (
    line_item_usage_type LIKE '%AgentCore-Observability%'
    OR (
      line_item_product_code = 'AmazonCloudWatch'
      AND resource_tags_user_agent_id IS NOT NULL  -- tag AgentCore log groups
    )
  )
  AND month = '2026-06'
GROUP BY line_item_usage_type
ORDER BY total_cost DESC;

5. AgentCore vs. DIY Agent Infrastructure: 10K Sessions/Day Cost Model

DIY Stack: LangGraph + DynamoDB + OpenSearch + Lambda + X-Ray

Component Purpose Configuration Monthly Cost
DynamoDB Session state + short-term memory On-demand, 10M writes + 20M reads ~$58
OpenSearch Serverless Long-term semantic memory 2 OCU (min) + 10 GB ~$700
Titan Embeddings v2 Embedding for memory upserts 10K sessions × 5 upserts × 200 tokens ~$3
Lambda (agent loop) Orchestration + tool execution 10K sessions × 5 invocations × 1s × 1GB ~$45
Lambda (memory R/W) Memory read/write ops 10K × 10 ops × 200ms × 256MB ~$12
X-Ray Distributed tracing 10K sessions × 10 traces + storage ~$15
API Gateway Tool endpoint ingress 500K calls/month ~$1.75
Secrets Manager API key rotation 5 secrets × 12 rotations ~$6
DIY Total ~$841/month

AgentCore Managed Stack: Same 10K Sessions/Day

Component Usage Monthly Cost
Runtime 10K sessions × 5min avg × 40% active × 0.5 vCPU ~$180
Runtime GB 10K sessions × 5min × 40% active × 1 GB ~$19
Memory short-term 10K sessions × 20 events = 200K events/day × 30 = 6M ~$1,500
Memory long-term 10K sessions × 2 records × 30 = 600K/month at 90-day TTL = 1.8M stored ~$1,350
Observability (spans) 10K sessions × 8KB × 30 = 2.4 GB ~$0.84
Gateway 10K sessions × 5 tool calls × 30 = 1.5M calls ~$7.50
Policy 1.5M requests × $0.000025 ~$37.50
AgentCore Total ~$3,094/month

Verdict at 10K Sessions/Day

Factor DIY AgentCore
Infrastructure cost ~$841/month ~$3,094/month
Engineering overhead High (4+ services to maintain) Low
Time to production 4–8 weeks for memory pipeline Days
Memory quality Manual extraction pipeline Automated (semantic, episodic, preference)
Compliance posture Self-certified AWS-managed, integrated IAM/VPC
Observability depth Custom X-Ray + CW dashboards Built-in step-level agent traces

AgentCore costs approximately 3.7× more than a well-engineered DIY stack at 10K sessions/day. The gap narrows as session complexity grows (more tool calls, more memory operations per session raise DIY’s marginal costs faster than AgentCore’s flat per-record rate). The crossover where AgentCore becomes cost-competitive with DIY on raw infrastructure — exclusive of engineering labor — appears to require either very complex sessions (20+ tool calls) or teams with limited platform engineering capacity.

For teams where platform engineers cost $200K+/year loaded, the engineering overhead of maintaining DynamoDB + OpenSearch + Lambda + X-Ray glue can exceed the AgentCore premium within 2–3 months.


6. AgentCore Gateway

What Gateway Does

AgentCore Gateway handles the authentication, routing, and protocol translation layer between agents and external tools. The primary use cases:

  • Converting REST APIs into MCP (Model Context Protocol) servers that agents can invoke natively
  • Managing OAuth 2.0 flows (both two-legged service-to-service and three-legged user-delegated authorization)
  • Providing VPC Lattice endpoints for private API access without NAT Gateway egress costs
  • Tool indexing — Gateway maintains a catalog of available tools that agents can discover at runtime

Gateway Pricing

Operation Rate
Tool API invocations $0.005 per 1,000 calls
Search queries (tool discovery) $0.025 per 1,000 queries
Tool indexing $0.02 per 100 tools/month

The MCP server layer itself is free — AWS subsidizes it to encourage MCP adoption on the platform. You pay only for the invocations that flow through it.

Cost Model: 5 Tool Integrations, 1K Calls/Day Each

Scenario: agent with 5 external tool integrations (CRM, calendar, document store, data API, notification service) at 1,000 calls/day each = 5,000 calls/day.

Monthly:

  • Tool invocations: 5,000 × 30 = 150,000 calls/month
  • Cost: 150 × $0.005 = $0.75/month

Gateway is effectively free at this scale. Even at 10× this volume (1.5M calls/month), Gateway costs $7.50/month. The Gateway cost line is almost never a meaningful fraction of total AgentCore spend — it’s dominated by Runtime and Memory.

Gateway vs. Self-Managed Tool Auth

The value proposition of Gateway is not cost — it’s operational complexity removal. Without Gateway, managing OAuth token refresh for 5 external integrations requires:

  • Secrets Manager for credential storage (~$5/month for 5 secrets)
  • Lambda functions for token refresh per integration (~$12/month)
  • Custom error handling for expired tokens in the agent loop
  • IAM roles per integration

DIY tool auth at this scale runs $15–$25/month in direct AWS costs, more in engineering time. Gateway at $0.75/month for the same workload clearly wins on economics, not just simplicity.


7. Production Cost Optimization for AgentCore

Memory TTL Tuning

Memory retention is the second-largest cost driver after Runtime. Optimization levers:

Short-term event batching: Instead of one CreateEvent per message turn, batch multiple turns into a single event. A session with 20 turns becomes 5 events (batch of 4 turns each), cutting short-term event costs by 75% with minimal impact on memory quality.

Long-term TTL by agent type:

  • Transactional agents (order processing, support tickets): 30-day TTL — sessions rarely need context from 90 days ago
  • Personalization agents (assistants, recommendation): 180-day TTL — preference memory accretes value over time
  • B2B workflow agents: 365-day TTL only for users with >4 sessions/month; dynamically extend based on engagement

Memory consolidation: Periodically run consolidation jobs that merge related long-term records. Ten preference records accumulated over 6 months for a single user can be consolidated into one richer record, reducing stored record count.

Code Interpreter Right-Sizing

The default allocation (2 vCPU, 4 GB RAM) is frequently over-provisioned for simple data transformations. For agents where Code Interpreter is used primarily for JSON manipulation and light calculation:

  • Reduce to 0.5 vCPU, 1 GB RAM → 75% cost reduction per execution-second
  • Benchmark your P95 execution time and set timeout to P95 + 20% to avoid over-running while catching edge cases

Selective Tracing

Full trace capture at 100% in production is the fastest path to a large CloudWatch bill. Recommended approach:

  • Production default: 10% sampling rate via OTEL_TRACES_SAMPLER_ARG=0.1
  • Error paths: always sample (100% for any agent session that throws an exception)
  • AWS AppConfig feature flag: flip to 100% on-demand for incident investigation, revert automatically after 15 minutes

This approach provides:

  • 10% sampling: 90% reduction in span ingestion costs
  • 100% error capture: full debugging fidelity where it matters
  • On-demand escalation: no redeployment needed for incident investigation

Cost Allocation Tags

Apply cost allocation tags at the agent-group level to enable per-product-line cost breakout in CUR. The tag schema:

agent:environment = production | staging | dev
agent:product = customer-support | data-analyst | code-review
agent:team = platform | product-ml | data

Enable these as cost allocation tags in the AWS Billing console and they propagate to CUR within 24 hours. CUDOS dashboards pick them up automatically for group-by filtering.

Athena Query for AgentCore Cost Isolation

CUR query to break out AgentCore costs by component and month:

SELECT
  DATE_TRUNC('month', line_item_usage_start_date) AS billing_month,
  CASE
    WHEN line_item_usage_type LIKE '%Runtime-vCPU%' THEN 'Runtime-vCPU'
    WHEN line_item_usage_type LIKE '%Runtime-GB%' THEN 'Runtime-Memory'
    WHEN line_item_usage_type LIKE '%Memory-LT%' THEN 'Memory-LongTerm'
    WHEN line_item_usage_type LIKE '%Memory-ST%' THEN 'Memory-ShortTerm'
    WHEN line_item_usage_type LIKE '%Observability-Span%' THEN 'Observability-Spans'
    WHEN line_item_usage_type LIKE '%Observability-Log%' THEN 'Observability-Logs'
    WHEN line_item_usage_type LIKE '%Gateway%' THEN 'Gateway'
    WHEN line_item_usage_type LIKE '%Policy%' THEN 'Policy'
    ELSE 'Other'
  END AS cost_component,
  resource_tags_user_agent_product AS agent_product,
  SUM(line_item_unblended_cost) AS total_cost,
  SUM(line_item_usage_amount) AS total_usage_units
FROM cur_database.cur_table
WHERE line_item_product_code = 'AmazonBedrockAgentCore'
  AND line_item_line_item_type NOT IN ('Tax', 'Credit')
GROUP BY 1, 2, 3
ORDER BY 1 DESC, 4 DESC;

This query produces a cost heatmap by component and agent product line. Running it weekly catches memory retention policy drifts (records accumulating beyond their TTL) and unexpected tracing volume spikes before they compound.


8. Key Decision Framework

Use AgentCore When

  • Time-to-production is measured in days, not months
  • Agent workflows require persistent memory across sessions with semantic recall
  • Tool integrations require OAuth management for external SaaS APIs
  • You need step-level trace visibility for multi-hop agent reasoning chains
  • Agent volume is below ~50K sessions/day (above this, DIY optimization ROI usually justifies the platform team investment)
  • Compliance requirements favor AWS-native IAM/VPC controls over custom auth layers

Use DIY Stack When

  • Agents are stateless within sessions (no cross-session memory needed) — removes the largest AgentCore cost driver entirely
  • Traffic pattern is high-volume, predictable, and CPU-bound — favors provisioned Lambda over active-only billing
  • Your team has existing OpenSearch or DynamoDB expertise and infrastructure
  • You need non-Bedrock models as the primary inference provider
  • Session volume exceeds 50K/day with simple session profiles — DIY marginal costs flatten while AgentCore scales linearly with events/records

The 10K-Session Snapshot Restated

Metric DIY AgentCore
Direct infrastructure cost ~$841/month ~$3,094/month
AgentCore premium +$2,253/month
Implied engineering savings needed ~1.3 engineer-days/month
Viable team size for AgentCore ROI Any team where a platform engineer costs >$200K loaded n/a

At 10K sessions/day with memory-heavy workflows, AgentCore’s premium is ~$27K/year. That sum buys approximately 5–6 days of senior platform engineering time — less than the ongoing maintenance burden of a DynamoDB + OpenSearch + Lambda memory pipeline at this scale for most teams.


Sources and Methodology

Pricing figures are drawn from the AWS Bedrock AgentCore pricing page (aws.amazon.com/bedrock/agentcore/pricing/), Cloud Burn’s 12-component breakdown (cloudburn.io), FactualMinds analysis (factualminds.com), Scalevise self-hosting comparison (scalevise.com/resources/agentcore-bedrock-pricing-self-hosting/), and Roman Čerešňák’s cost optimization guide (romanceresnak.dev/articles/agentcore-cost-optimization). DIY cost comparisons use DynamoDB on-demand, OpenSearch Serverless, Lambda on-demand, and X-Ray list pricing current as of June 2026. All cost models assume us-east-1.

AWS updates AgentCore rates more frequently than comparable services. The memory per-event and per-record rates are subject to change as the service matures past initial GA pricing. Verify current rates before budgeting.