AI & DevelopmentCloud & DevOpsDeveloper Tools

Amazon Bedrock AgentCore: Deploy Agents in 4 Commands

Amazon Bedrock AgentCore serverless AI agent deployment architecture diagram with blue circuit pathways and AWS cloud nodes
Amazon Bedrock AgentCore: Deploy AI agents in four commands

Eighty-eight percent of AI proofs-of-concept never reach production. That number, from IDC, isn’t about model quality — the models are good enough. It’s about the infrastructure tax: the weeks you spend wiring up session management, authentication, scaling, memory persistence, and monitoring before your agent actually does anything useful. AWS has been building a direct answer to that problem, and at Summit NYC today they gave it more stage time: Amazon Bedrock AgentCore, which has been generally available since late 2025 and is finally getting the attention it deserves.

This Is Not Classic Bedrock Agents

Before going further: Bedrock AgentCore and classic Bedrock Agents are not the same thing, and the confusion is widespread. Classic Bedrock Agents is a configuration-based, low-code service that orchestrates models hosted in Amazon Bedrock using Amazon’s proprietary runtime. It works fine for straightforward automations.

AgentCore is a different animal. It’s a platform substrate — you write the agent logic using any framework you want (LangGraph, CrewAI, LlamaIndex, LangChain, Strands, or raw Python), connect to any model (Claude, GPT, Gemini, Llama), and AgentCore handles the operational layer. As one developer on AWS re:Post put it: “AgentCore standardizes the moving parts rather than hiding them.” That’s the right mental model. The official documentation lays out the full service catalog.

Four Commands to a Deployed Agent

The practical case for AgentCore starts here. Install the Python SDK and CLI:

pip install bedrock-agentcore strands-agents bedrock-agentcore-starter-toolkit
npm install -g @aws/agentcore

Your agent is a standard Python function decorated with @app.entrypoint:

from bedrock_agentcore import BedrockAgentCoreApp
from strands import Agent

app = BedrockAgentCoreApp()
agent = Agent()

@app.entrypoint
def invoke(payload):
    user_message = payload.get("prompt", "Hello!")
    result = agent(user_message)
    return {"result": result.message}

if __name__ == "__main__":
    app.run()

Test locally on port 8080, then configure and deploy:

agentcore configure -e my_agent.py
agentcore deploy

No Docker required for the initial direct_code_deploy mode. You get back an agent ARN and an HTTPS endpoint. The CLI uses AWS CDK under the hood, so the same configuration scales to container-based production deployments when you’re ready. The Runtime Quickstart guide walks through local testing before you touch AWS.

Seven Services, One Platform

AgentCore is composable. You pick what you need:

  • Runtime: Serverless execution with per-session microVMs. Sessions are isolated — when a session ends, the microVM is destroyed and memory wiped. Up to 8 hours, 100MB payloads, auto-scaling.
  • Memory: Three-tier memory (short-term context, episodic cross-session history, semantic knowledge base). Automatic extraction — you don’t write the extraction logic.
  • Gateway: Wraps your existing APIs and Lambda functions into agent-callable tools with MCP protocol support and millisecond policy enforcement.
  • Identity: Handles both inbound user auth (Okta, Entra ID, Cognito) and outbound agent auth to third-party services via OAuth and API keys.
  • Observability: CloudWatch-based tracing with OpenTelemetry support and 13 built-in quality evaluators that run continuously.
  • Code Interpreter: Isolated Python sandbox with NumPy, Pandas, Matplotlib, and SciPy pre-installed. State persists for the duration of the session.
  • Policy: Cedar-based enforcement at the Gateway boundary — outside your agent code, so it can’t be bypassed regardless of what the agent does.

The Gotchas Nobody Mentions

Every launch post covers the happy path. These are the issues you’ll hit when it isn’t:

Session IDs under 16 characters fail silently. The validation error isn’t obvious. Use a compound format like {user_id}_{timestamp}_{purpose} and you’re safe.

Memory extraction is asynchronous. Calling retrieve_memories() immediately after create_event() returns empty results. Long-term memory consolidation takes 10–30 seconds. Design for this with polling and a reasonable timeout — up to 60 seconds in the worst case.

MCP tools don’t work inside the Code Interpreter sandbox. Outbound network access is blocked in the sandbox environment. If your agent needs to fetch data and then process it, enforce the sequence in your system prompt: retrieve first, compute second. Trying to call MCP tools mid-calculation fails silently.

IAM propagation delay. After creating an IAM role, wait 15 seconds before running agentcore deploy. Deploying immediately produces an AccessDenied error that looks like a permissions misconfiguration when it’s actually just AWS eventual consistency.

ARM64 only. The container runtime is ARM64. If you’re building a CI/CD pipeline with CodeBuild, your build images need to match.

What’s New Since Launch

AgentCore has shipped fast. March 2026 brought Evaluations to general availability — 13 built-in evaluators that assess agent quality for correctness, helpfulness, and safety without custom eval harnesses. April brought the CLI to GA. May added a Payments capability (agents can autonomously pay for APIs and MCP servers via Coinbase and Stripe integrations) and an Agent Toolkit for AWS that replaces the previous scattered MCP server setup. At Summit NYC today, S3 Vectors integration was highlighted — native vector storage with up to 90% cost reduction over conventional approaches, directly integrated with AgentCore knowledge retrieval.

Worth Switching to Now?

If you’re building a weekend prototype, no — the managed harness is probably overkill. But if you’re taking an agent to production, the calculus flips. Session isolation via microVMs alone is worth it: cross-session data contamination is one of the uglier failure modes in DIY session management. Add automatic memory extraction, Cedar-based policy enforcement that survives prompt injection, and built-in observability, and you’re looking at months of infrastructure work that AgentCore handles for you.

The consumption-based pricing keeps it rational — idle I/O time is free, and a moderate production workload (10,000 sessions per month) runs roughly $50–$200 in AgentCore infrastructure costs before model inference. Start with the Runtime Quickstart and have something running locally in under 30 minutes. The session ID gotcha will get you otherwise.

ByteBot
I am a playful and cute mascot inspired by computer programming. I have a rectangular body with a smiling face and buttons for eyes. My mission is to cover latest tech news, controversies, and summarizing them into byte-sized and easily digestible information.

    You may also like

    Leave a reply

    Your email address will not be published. Required fields are marked *