Engineering

Building Your First AgentCore Deployment: The Pre-Launch Notes

Sachin SharmaAugust 24, 202618 min read
Building Your First AgentCore Deployment: The Pre-Launch Notes

A practical, step-by-step guide to deploying your first Bedrock AgentCore workflow — from Gateway configuration to IAM policies, web search integration, and your first agent invocation. Everything we wish we knew before launch.

Most teams building AI agents hit the same inflection point. Your agent logic works. Your prompts are tuned. Your model selection is solid. And then you need to connect the agent to actual tools — web search, knowledge bases, authenticated APIs — and you realize the infrastructure layer is its own project.

You start managing API keys in environment variables. You wire up a search proxy. You build a thin MCP wrapper. You bolt on some tracing with OpenTelemetry. Three weeks later, you have a fragile middleware stack that sits between your agent and the world, and you haven't even started on the hard part: making the agent reliable, observable, and cost-efficient.

Amazon Bedrock AgentCore exists to compress that three-week middleware build into a few days of configuration. But "a few days of configuration" is only true if you understand the platform before you start building. The gap between "I read the announcement" and "I have a working deployment" is where teams lose time — not because AgentCore is complicated, but because the architecture decisions and IAM configuration have to be right from the beginning.

This post is the pre-launch checklist we didn't have when we did our first deployment. It covers what AgentCore actually is, the architecture decisions you need to make before writing code, a step-by-step setup walkthrough, Gateway configuration, web search integration, IAM policies, your first agent invocation, common pitfalls, cost modeling, and when to build custom instead. If you're about to deploy AgentCore for the first time, this is the guide we'd hand you on day one.

What AgentCore Actually Is

Before we get into setup, you need a clear mental model of the platform. AgentCore is not a model. It is not a prompt library. It is infrastructure — a managed platform that sits between your agent logic and the outside world, handling tool orchestration, authentication, search, knowledge retrieval, and observability.

The five core components:

  • AgentCore Gateway: A managed MCP (Model Context Protocol) endpoint. Your agent calls tools/list and tools/call through this Gateway. It handles authentication, tool discovery, and request routing. You configure which tools are available, and the Gateway takes care of connecting to them securely.
  • Web Search: Access to tens of billions of documents through Amazon's own web index. Exposed as an MCP tool. Pricing is $7 per 1,000 queries. Returns semantic snippets, not raw HTML.
  • Knowledge Bases: Grounded retrieval over your private data. Combines vector search with knowledge graph relationships. This is where your product documentation, internal wikis, or proprietary datasets live.
  • Agent Identity: Traceable authorization across tool calls. Each agent action carries an identity context, which matters for audit trails, multi-tenant deployments, and compliance requirements.
  • Observability: Step-by-step tracing of agent reasoning, tool calls, and responses. Built in, not bolted on.

AgentCore supports LangChain, Strands SDK, OpenAI Agents SDK, Claude Agent SDK, CrewAI, and any custom framework that speaks MCP. The Gateway is MCP-compliant, which means framework choice is not a platform decision. This is important because it means you don't have to rewrite your agent logic to adopt AgentCore.

The platform is built on the same infrastructure behind Alexa+, Amazon Q Business, and Kiro. It is available in three regions: us-east-1, eu-west-1, and ap-northeast-1.

Architecture Decisions to Make Before You Write Code

The biggest mistake teams make with AgentCore is jumping into code before making a handful of architecture decisions. These decisions affect your cost, latency, and operational complexity. Make them early.

Decision 1: What Tools Does Your Agent Actually Need?

Not every agent needs every tool. The most efficient AgentCore deployments are the ones that connect only the tools the agent will use consistently. A research agent needs web search. A document Q&A agent needs Knowledge Bases. A customer service agent might need both, plus an API tool for ticket management.

Map your agent's workflow before configuring the Gateway. List every tool call your agent makes, the frequency of each call, and whether each tool accesses public or private data. This determines your tool registration in the Gateway and your IAM policy structure.

Decision 2: Single Agent or Multi-Agent?

AgentCore supports single agents with multiple tools and multi-agent architectures. For your first deployment, start with a single agent. Multi-agent orchestration adds complexity that you don't need on day one. Get the Gateway, tool access, and observability working with a single agent before you split responsibilities across multiple agents.

If your use case genuinely requires multi-agent coordination from the start — for example, a supervisor agent that routes to specialized sub-agents — configure each agent with its own IAM role and tool permissions. Agent Identity makes this traceable.

Decision 3: Region Selection

Choose your region based on where your infrastructure lives, not where you live. If your application runs in us-east-1, deploy AgentCore in us-east-1. Cross-region calls add latency on every tool invocation, and in an agent workflow where the model calls tools multiple times per query, that latency compounds.

For Indian enterprises, ap-northeast-1 (Tokyo) is the closest available region. Expect 80-120ms of additional network latency compared to a hypothetical Mumbai deployment. If your agent is latency-sensitive, measure this in your specific workload before committing. AWS has historically expanded regional availability, so this may change, but plan for what exists today.

Decision 4: Model Selection

AgentCore works with any Bedrock-supported model. The model you choose affects cost, latency, and agent reasoning quality. For first deployments, Claude 3.5 Sonnet offers a strong balance of reasoning quality and cost. For high-volume, simpler tasks, a smaller model may be more cost-effective.

The key insight: your model choice affects how well the agent selects and uses tools. A weaker model may call the wrong tool or make unnecessary tool calls, which increases cost and degrades results. Don't optimize model cost in isolation — measure end-to-end agent performance including tool call accuracy.

Step-by-Step Setup: From Zero to First Invocation

Here's the practical walkthrough. We'll go from an empty AWS account to a working agent with web search, Knowledge Bases, and IAM-scoped tool access.

Step 1: Prerequisites and SDK Installation

You need an AWS account with Bedrock access enabled in your target region, Python 3.10+, and an IAM role with the necessary Bedrock permissions.

Bash
# Install the Bedrock AgentCore SDK
pip install boto3 botocore

# If using Strands SDK (recommended for new projects)
pip install strands-agents strands-agents-tools

# If using LangChain
pip install langchain langchain-community langchain-aws

Verify your AWS credentials are configured:

Bash
aws sts get-caller-identity

This returns your account ID, user ARN, and identity type. If you see an error, configure credentials with aws configure or set environment variables AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY.

Step 2: Enable Bedrock Model Access

Before using AgentCore, ensure the foundation models you plan to use are enabled in your Bedrock console. Navigate to Amazon Bedrock in the AWS console, go to Model Access, and request access to the models you need. For most deployments, enable Claude 3.5 Sonnet and Claude 3 Haiku as a minimum set.

Model access approval can take a few minutes. Once approved, the models are available in your target region.

Step 3: Create Your First Agent

The agent is the core entity. It connects a foundation model with tool access and a system prompt.

Python
import boto3
from botocore.config import Config

# Initialize the Bedrock Agent Runtime client
session = boto3.Session(region_name="us-east-1")
bedrock_agent = session.client(
    "bedrock-agent",
    config=Config(
        retries={"max_attempts": 3, "mode": "adaptive"},
        read_timeout=120,
    ),
)

# Create the agent
response = bedrock_agent.create_agent(
    agentName="first-agentcore-agent",
    agentResourceRoleArn="arn:aws:iam::123456789012:role/AgentCoreAgentRole",
    foundationModel="anthropic.claude-3-5-sonnet-20241022-v2:0",
    instruction="""You are a helpful research assistant. You can search
    the web for current information and query internal knowledge bases.
    Always cite your sources. When you don't know something, say so
    rather than guessing.""",
    idleSessionTTLInSeconds=1800,
)

agent_id = response["agentId"]
print(f"Agent created: {agent_id}")

The agentResourceRoleArn is the IAM role that controls what this agent can access. We'll configure this in Step 5. For now, create a placeholder and come back to it.

Step 4: Configure the AgentCore Gateway

The Gateway is the managed MCP endpoint that your agent communicates with. To set it up, you register your agent and configure the available tools.

Python
# Create an agent alias (used for versioning deployments)
alias_response = bedrock_agent.create_agent_alias(
    agentId=agent_id,
    agentAliasName="production",
)
alias_id = alias_response["agentAlias"]["agentAliasId"]
print(f"Alias created: {alias_id}")

The Gateway configuration happens at the agent level. When you define your agent's action groups (the tool specifications), those tools become available through the MCP endpoint at https://bedrock-runtime.{region}.amazonaws.com/agentcore/mcp.

For tools that need to connect to external services, you configure the connection details in the action group:

Python
# Define tool specifications for the agent
# These are exposed through the MCP Gateway
response = bedrock_agent.create_agent_action_group(
    agentId=agent_id,
    actionGroupName="WebSearchAndKnowledgeBase",
    actionGroupState="ENABLED",
    functionSchema={
        "functions": [
            {
                "name": "search_web",
                "description": "Search the web for current information on any topic. Use this when you need up-to-date data, recent news, or information not in your training data.",
                "parameters": [
                    {
                        "name": "query",
                        "description": "The search query",
                        "required": True,
                        "type": "string",
                    },
                    {
                        "name": "max_results",
                        "description": "Number of results to return (1-25)",
                        "required": False,
                        "type": "integer",
                    },
                ],
            },
            {
                "name": "query_knowledge_base",
                "description": "Search internal documents and knowledge base for proprietary information.",
                "parameters": [
                    {
                        "name": "query",
                        "description": "The search query for internal documents",
                        "required": True,
                        "type": "string",
                    },
                ],
            },
        ]
    },
)

Step 5: IAM Policies — The Security Foundation

This is where most first deployments stumble. IAM policies control what your agent can access, and getting them wrong either blocks the agent entirely or creates security gaps.

Here's the base policy for an agent that needs to invoke itself (call its own tools) and access the web search capability:

JSON
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "AllowAgentInvocation",
      "Effect": "Allow",
      "Action": [
        "bedrock:InvokeAgent"
      ],
      "Resource": "arn:aws:bedrock:us-east-1:123456789012:agent/first-agentcore-agent-*"
    },
    {
      "Sid": "AllowAgentCoreToolAccess",
      "Effect": "Allow",
      "Action": [
        "bedrock:InvokeAgentCoreTool"
      ],
      "Resource": "arn:aws:bedrock:us-east-1:123456789012:agent/first-agentcore-agent"
    },
    {
      "Sid": "AllowBedrockModelAccess",
      "Effect": "Allow",
      "Action": [
        "bedrock:InvokeModel"
      ],
      "Resource": "arn:aws:bedrock:us-east-1::foundation-model/anthropic.claude-*"
    },
    {
      "Sid": "AllowKnowledgeBaseAccess",
      "Effect": "Allow",
      "Action": [
        "bedrock:Retrieve",
        "bedrock:RetrieveAndGenerate"
      ],
      "Resource": "arn:aws:bedrock:us-east-1:123456789012:knowledge-base/*"
    },
    {
      "Sid": "AllowCloudWatchLogging",
      "Effect": "Allow",
      "Action": [
        "logs:CreateLogGroup",
        "logs:CreateLogStream",
        "logs:PutLogEvents"
      ],
      "Resource": "arn:aws:logs:us-east-1:123456789012:log-group:/aws/bedrock/agent/*"
    }
  ]
}

A few critical details in this policy:

The AllowAgentInvocation statement uses a wildcard on the agent ID (agent/first-agentcore-agent-*). This is intentional — the -* suffix matches agent aliases, which are separate resources from the base agent. Without this, your agent cannot invoke itself through the alias.

The AllowAgentCoreToolAccess statement grants access to managed tools (web search, knowledge base queries). Without this permission, the Gateway works but tools fail silently. This is the most common "why isn't my agent searching the web?" bug.

The AllowKnowledgeBaseAccess statement is separate because Knowledge Bases have their own permissions. If you're not using Knowledge Bases, omit this statement to follow least-privilege principles.

Step 6: Attach the Policy to an IAM Role

Create the role and attach the policy:

Bash
# Create the IAM role
aws iam create-role \
  --role-name AgentCoreAgentRole \
  --assume-role-policy-document '{
    "Version": "2012-10-17",
    "Statement": [{
      "Effect": "Allow",
      "Principal": {
        "Service": "bedrock.amazonaws.com"
      },
      "Action": "sts:AssumeRole"
    }]
  }'

# Attach the policy (save the JSON above as agentcore-policy.json)
aws iam put-role-policy \
  --role-name AgentCoreAgentRole \
  --policy-name AgentCoreAgentPolicy \
  --policy-document file://agentcore-policy.json

Now go back to Step 3 and update the agentResourceRoleArn to point to this role:

Python
response = bedrock_agent.create_agent(
    agentName="first-agentcore-agent",
    agentResourceRoleArn="arn:aws:iam::123456789012:role/AgentCoreAgentRole",
    foundationModel="anthropic.claude-3-5-sonnet-20241022-v2:0",
    instruction="You are a helpful research assistant...",
)

Step 7: Web Search Integration

Web search is a managed tool within AgentCore. Once your IAM policy includes the bedrock:InvokeAgentCoreTool permission, the agent can discover and use it through the Gateway.

Here's the MCP payload for invoking web search directly:

JSON
{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "name": "WebSearch",
    "arguments": {
      "query": "AWS Bedrock AgentCore pricing 2026",
      "maxResults": 10,
      "domainFilter": {
        "include": ["aws.amazon.com", "docs.aws.amazon.com"]
      },
      "publishedDateFilter": {
        "after": "2026-01-01T00:00:00Z"
      }
    }
  },
  "id": "search-request-001"
}

The response comes back as structured JSON with title, url, snippet, and publishedDate fields. The snippets are semantically extracted — relevant passages from the page, not raw HTML. This is important because it reduces token consumption in the LLM's context window and improves reasoning quality.

For production deployments, configure domain filtering. The domainFilter parameter supports both include (restrict to these domains) and exclude (block these domains) lists with up to 100 domains each. This was introduced in connector version 1.2.0 and is essential for cost control — without domain filtering, your agent might waste queries searching the entire web for information that should come from a known source.

Step 8: Your First Agent Invocation

Here's the code to invoke your agent with a real query:

Python
import json
import uuid

def invoke_first_agent(query: str):
    """
    Invoke your first AgentCore agent with streaming response.
    """
    session_id = str(uuid.uuid4())
    bedrock_runtime = session.client(
        "bedrock-agent-runtime",
        config=Config(
            retries={"max_attempts": 3, "mode": "adaptive"},
            read_timeout=120,
        ),
    )

    response = bedrock_runtime.invoke_agent(
        agentId="first-agentcore-agent",
        agentAliasId="production",
        sessionId=session_id,
        inputText=query,
        enableTrace=True,
    )

    result_text = ""
    tool_calls = []
    traces = []

    for event in response["completion"]:
        # Collect the agent's text response
        if "chunk" in event:
            chunk = event["chunk"]
            if "bytes" in chunk:
                result_text += chunk["bytes"].decode("utf-8")

        # Collect trace data for observability
        if "trace" in event:
            trace = event["trace"]
            traces.append(trace)

            if "orchestrationTrace" in trace:
                orchestration = trace["orchestrationTrace"]
                if "observation" in orchestration:
                    obs = orchestration["observation"]
                    if "actionResponse" in obs:
                        tool_calls.append(obs["actionResponse"])

    return {
        "response": result_text,
        "tool_calls": tool_calls,
        "session_id": session_id,
        "trace_count": len(traces),
    }


# Run it
result = invoke_first_agent(
    "What are the current AWS Bedrock AgentCore features and pricing?"
)
print(f"Response: {result['response'][:500]}...")
print(f"Tool calls made: {len(result['tool_calls'])}")
print(f"Trace events captured: {result['trace_count']}")

When you run this, the agent will:

  1. Receive your query
  2. Determine it needs current information (web search)
  3. Call tools/list through the Gateway to discover available tools
  4. Call tools/call with a search query
  5. Receive structured search results
  6. Synthesize a response grounded in those results

The trace data shows you exactly what happened at each step, which is invaluable for debugging and optimization.

Step 9: Knowledge Bases Setup

If your agent needs to query private documents, create a Knowledge Base:

Python
# Create a Knowledge Base
kb_response = bedrock_agent.create_knowledge_base(
    name="first-knowledge-base",
    roleArn="arn:aws:iam::123456789012:role/BedrockKnowledgeBaseRole",
    knowledgeBaseConfiguration={
        "type": "VECTOR",
        "vectorKbConfiguration": {
            "embeddingModelArn": "arn:aws:bedrock:us-east-1::foundation-model/amazon.titan-embed-text-v2:0",
            "indexConfiguration": {
                "type": "OPENSEARCH_MANAGED",
                "opensearchConfiguration": {
                    "numberOfShards": 1,
                    "numberOfReplicas": 0,
                },
            },
        },
    },
)
kb_id = kb_response["knowledgeBaseId"]
print(f"Knowledge Base created: {kb_id}")

# Ingest documents into the Knowledge Base
ingestion_response = bedrock_agent.start_ingestion_job(
    knowledgeBaseId=kb_id,
    dataSourceId="your-data-source-id",
)

Once the Knowledge Base is created and documents are ingested, connect it to your agent. The agent can then call query_knowledge_base through the Gateway, which handles the retrieval, ranking, and response formatting.

Gateway Configuration Deep Dive

The Gateway is the centerpiece of AgentCore. Getting its configuration right determines whether your agent works reliably or fails in subtle ways.

Tool Registration Order Matters

When you register multiple tools, the Gateway presents them to the agent in the order you defined them. This sounds trivial. It is not. LLMs exhibit a measurable bias toward the first tools in the list when confidence is low. If your tools have overlapping functionality — for example, web search and knowledge base query — order them strategically.

Our recommendation: put the tool with the broadest applicability first. For most agents, that's web search. Put specialized tools second and third. Then test extensively and adjust ordering based on the agent's actual tool selection patterns, which you can see in the trace data.

Tool Description Quality Directly Affects Performance

The agent reads tool descriptions to decide which tool to call. Vague descriptions produce unreliable tool selection. Specific descriptions produce consistent behavior.

Bad description:

Plain Text
"Search for information"

Good description:

Plain Text
"Search the live web for current information. Use this tool when the user
asks about recent events, current data, or information that may have
changed after your training cutoff. Returns structured search results
with titles, URLs, and relevant snippets."

We went through four iterations of tool descriptions on our first deployment before tool selection stabilized. Budget time for this. It is prompt engineering, not configuration, and it has a direct impact on agent behavior.

Timeout Configuration

The Gateway has default timeouts that work for most use cases, but if your tools involve slow API calls (large Knowledge Base queries, external API integrations with high latency), you may need to adjust timeout values. The default read timeout is 120 seconds, which is generous for most tools but can be reached if an agent makes multiple sequential tool calls in a single step.

For knowledge base queries against large datasets, expect 2-5 seconds per retrieval. For web search, expect 1-3 seconds. Add the LLM inference time on top. A typical multi-tool invocation (web search + knowledge base + synthesis) completes in 4-8 seconds at the P50 latency level.

Common Pitfalls: What Goes Wrong on First Deployments

We've now guided several teams through their first AgentCore deployment. The same issues come up repeatedly.

Pitfall 1: The Silent IAM Failure

The most common issue: the agent invokes successfully but tool calls fail with no error in the agent response. This happens when the agent has permission to invoke itself (bedrock:InvokeAgent) but not to use the tools (bedrock:InvokeAgentCoreTool). The Gateway accepts the request, the agent reasons correctly, but the tool call fails silently.

Check CloudWatch logs under /aws/bedrock/agent/* for tool invocation errors. If you see "AccessDeniedException" in the tool call logs, you're missing the InvokeAgentCoreTool permission.

Pitfall 2: Cold Start Latency

The first invocation after 15-20 minutes of inactivity takes 3-5 seconds longer than subsequent calls. This is expected behavior for managed AWS services, but it catches teams off guard in latency-sensitive applications.

The workaround is a keep-warm invocation — a lightweight query sent every 10 minutes to keep the execution context alive. This adds minimal cost (a fraction of a cent per invocation) but keeps latency consistent.

Python
import threading
import time

def keep_warm_agent(agent_id, alias_id, interval_minutes=10):
    """
    Send periodic keep-warm invocations to prevent cold starts.
    Runs as a background thread.
    """
    while True:
        try:
            bedrock_runtime.invoke_agent(
                agentId=agent_id,
                agentAliasId=alias_id,
                sessionId="keep-warm",
                inputText="ping",
            )
        except Exception:
            pass  # Keep-warm failures are non-critical
        time.sleep(interval_minutes * 60)

# Start in background
warm_thread = threading.Thread(
    target=keep_warm_agent,
    args=(agent_id, "production"),
    daemon=True,
)
warm_thread.start()

Pitfall 3: Knowledge Base Cold Starts Are Worse

The cold start for Knowledge Bases is more pronounced than for the Gateway or web search, likely because the vector index needs to warm up in the execution context. If you're using Knowledge Bases, expect the first retrieval to take 5-8 seconds longer than subsequent retrievals.

For production deployments, a Knowledge Base keep-warm query (a simple embedding search) every 10 minutes eliminates this. The cost is negligible compared to the latency improvement.

Pitfall 4: Domain Filter Format Errors

When configuring domain filters through the web search tool, the format must be exactly right. The include and exclude arrays must contain strings, not a comma-separated string. The API returns a generic validation error when the format is wrong, not a helpful "expected array, got string" message.

JSON
// Correct
{
  "domainFilter": {
    "include": ["aws.amazon.com", "docs.aws.amazon.com"]
  }
}

// Wrong — will return a generic validation error
{
  "domainFilter": {
    "include": "aws.amazon.com,docs.aws.amazon.com"
  }
}

This cost us half a day on our first deployment. Now you know.

Pitfall 5: Not Using Trace Data for Optimization

Observability is not just for debugging. The trace data from AgentCore shows you exactly which tools the agent calls, how often, and in what order. This data reveals optimization opportunities that are invisible without tracing.

We found that our agent was over-calling the knowledge base for queries that web search alone could answer. Adding a simple routing heuristic — web search first, knowledge base only for internal data queries — reduced unnecessary knowledge base retrievals by 30%. That translated directly to lower cost and lower latency.

Enable tracing from day one (enableTrace=True in the invoke call). It costs nothing extra and provides immediate value.

Pitfall 6: Documentation Gaps at the Edges

The AgentCore documentation covers the happy path well but is sparse for edge cases. Specifically, we couldn't find clear guidance on:

  • Timeout behavior when a tool call within the Gateway fails
  • Concurrent tool call handling within a single agent step
  • Retry behavior for Gateway-level transient errors

Budget time for testing these behaviors in your specific deployment. Create test cases that exercise failure scenarios — tool timeouts, knowledge base unavailability, malformed queries — and verify your agent handles them gracefully.

Cost Modeling: What Your First Deployment Will Actually Cost

Cost prediction is one of the most important pre-launch exercises. Here's a realistic model for a first deployment.

Low-Volume Deployment (Internal Tool)

ComponentMonthly Cost
AgentCore Gateway (5K requests)$12
Web Search (5K queries x $7/1K)$35
Knowledge Bases (2K retrievals)$28
LLM inference (Claude 3.5 Sonnet)$85
Total~$160

This is an internal tool used by a small team, processing roughly 165 queries per day.

Medium-Volume Deployment (Customer-Facing)

ComponentMonthly Cost
AgentCore Gateway (40K requests)$85
Web Search (40K queries x $7/1K)$280
Knowledge Bases (12K retrievals)$145
LLM inference (Claude 3.5 Sonnet)$620
Total~$1,130

This is a customer-facing agent processing roughly 1,300 queries per day.

High-Volume Deployment (Automated Pipeline)

ComponentMonthly Cost
AgentCore Gateway (500K requests)$650
Web Search (200K queries x $7/1K)$1,400
Knowledge Bases (80K retrievals)$820
LLM inference (Claude 3.5 Sonnet)$3,100
Total~$5,970

This is an automated research pipeline processing roughly 6,700 queries per day.

Cost Optimization Levers

The LLM inference cost dominates at every volume level. Start optimization there:

  • Use smaller models for simple queries. Not every query needs Claude 3.5 Sonnet. A routing layer that sends simple queries to Claude 3 Haiku and complex queries to Sonnet can reduce LLM costs by 40-60%.
  • Reduce token count. Shorter system prompts, tighter output formatting, and context window management all reduce per-query cost.
  • Cache repeated queries. If multiple users ask similar questions within minutes, cache the results. A 5-minute cache TTL for web search results can reduce search costs by 30-50% without meaningfully impacting freshness.
  • Use domain filtering. Restricting web search to specific domains reduces wasted queries. Without filtering, an agent might search the entire web for information that should come from a known source.

When to Use AgentCore vs. Build Custom Infrastructure

AgentCore is not always the right choice. Here's an honest comparison to help you decide.

DimensionBedrock AgentCoreCustom Infrastructure
Setup time2-3 days2-4 weeks
Monthly cost (40K queries)~$1,130~$1,440
Tool authenticationIAM-nativeIndividual API keys per tool
ObservabilityBuilt-in tracingCustom OpenTelemetry setup
Web searchManaged, $7/1K queriesThird-party API, variable cost
Framework lock-inNone (MCP-compliant)None (you build it)
Region availability3 regionsAnywhere you deploy
DocumentationImproving, gaps at edgesYou write it
Vendor dependencyAWSNone
CustomizationSupported toolsUnlimited
Cold startPresent (15-20 min idle)Depends on implementation
Team expertise neededAWS + agent conceptsFull-stack infra + agent concepts

Use AgentCore When:

  • You're already on AWS and comfortable with IAM, CloudWatch, and Bedrock
  • Your agent needs 3-8 tools and the workflow is well-defined
  • You want to reduce infrastructure maintenance burden
  • Observability and audit trails are requirements, not nice-to-haves
  • You need to move fast and don't have weeks to build middleware

Build Custom When:

  • You need deployment in regions AgentCore doesn't support
  • Your tool requirements are highly unusual and don't fit the MCP model
  • You have deep infrastructure expertise and prefer direct control
  • You want to avoid vendor lock-in to AWS
  • Your workload is at a scale where per-query pricing becomes unfavorable

The Honest Middle Ground

Most teams we work with fall into the "use AgentCore" category. The infrastructure savings and operational simplicity outweigh the constraints. But the teams that build custom infrastructure successfully are the ones that go in knowing exactly why AgentCore doesn't fit their specific requirements — not because they assume "we'll build it better."

The exception is teams with genuinely unique requirements: tools that don't fit MCP, multi-cloud deployments, or workloads where the per-query pricing doesn't make sense at scale. For those teams, building custom is the right call, but they should build on MCP-compatible interfaces to maintain interoperability with the broader ecosystem.

Indian Enterprise Considerations

If you're deploying AgentCore from India or serving Indian customers, several considerations affect your architecture and cost planning.

Regional Latency

The closest region for Indian infrastructure is ap-northeast-1 (Tokyo). Expect 80-120ms of additional network latency for API calls from Mumbai or Bangalore. In a multi-tool agent workflow where the model calls tools 3-4 times per query, this compounds to 240-480ms of additional latency.

For most customer-facing applications, this is acceptable. The total end-to-end latency (4-8 seconds) includes LLM inference time that dwarfs the network overhead. But for real-time conversational agents where every millisecond matters, this is a meaningful constraint.

Currency Risk

All AgentCore pricing is in USD. At current exchange rates, the medium-volume deployment ($1,130/month) translates to roughly ₹95,000. This is competitive with custom infrastructure costs, but the USD denomination means your costs fluctuate with the exchange rate.

Over a 12-month period, a 5-8% currency swing could change your total cost of ownership by ₹57,000-₹91,000. Factor this into annual budget projections. If you're locked into annual contracts, consider whether the currency exposure is acceptable.

Data Residency

AgentCore's zero-egress model keeps all query data within the AWS network boundary. For Indian enterprises subject to RBI data localization guidelines or the Digital Personal Data Protection Act 2023, this is significant. Web search queries never leave AWS infrastructure, which satisfies most data residency requirements without custom compliance solutions.

AWS Support Plans

AgentCore's documentation gaps at the edges mean you'll likely need support tickets during setup and troubleshooting. AWS's free tier support has limited response times. The Developer plan ($29/month) offers basic guidance but not deep architectural assistance. For production deployments, the Business plan ($100/month) or Enterprise plan (custom pricing) is worth the investment. Agent reliability directly impacts user experience, and the support plan should reflect that.

Multilingual Considerations

If your agent serves Indian language users, the Knowledge Base retrieval quality varies by language. Vector search performs well for English content. Knowledge graph-based retrieval performs better for structured data regardless of language, which is a positive signal for Hindi, Tamil, Bengali, and other Indian language knowledge bases. Test retrieval quality with representative queries in your target language before committing to a retrieval strategy.

First Deployment Checklist

Before you launch, walk through this checklist:

  1. Model access enabled in Bedrock console for your target region
  2. IAM role created with all necessary permissions (agent invocation, tool access, model invocation, Knowledge Base access)
  3. Agent created with a clear, specific system prompt
  4. Tools registered in the Gateway with precise descriptions
  5. Domain filters configured for web search (include/exclude lists)
  6. Knowledge Base created and documents ingested (if using private data)
  7. Observability enabled (tracing is on by default, but verify)
  8. Cold start mitigation in place (keep-warm invocation configured)
  9. Cost alerts configured in CloudWatch (set a budget alarm)
  10. Test queries run covering the happy path and failure scenarios

This checklist takes a few hours to complete, but it saves days of debugging after launch.

MojoStudio's Take

We've deployed AgentCore in production workflows, internal tools, and client projects. The pattern is consistent: teams that understand the platform before they start building have a working deployment in 2-3 days. Teams that skip the architecture decisions and IAM configuration spend a week debugging issues that could have been avoided with upfront planning.

The platform is genuinely good at what it does. The Gateway handles tool orchestration cleanly. The web search integration eliminates a category of infrastructure. The observability features catch bugs that are invisible without tracing. And the IAM-native authentication is a real improvement over managing API keys.

But it is infrastructure, not magic. It does not write your agent logic, optimize your prompts, or choose the right model for your use case. The agent's intelligence still depends on your system prompt, your tool descriptions, your model selection, and your workflow design. AgentCore handles the plumbing. You still need to build the brain.

If you're about to deploy your first AgentCore workflow, start with the architecture decisions in this post. Get the IAM policies right before you write code. Configure domain filters from day one. Enable tracing immediately. And budget time for the documentation gaps — they exist, and they'll cost you a few hours of discovery.

For teams building AI agent workflows and wanting guidance on AgentCore integration, our engineering team has hands-on experience with the platform and can help you design the right architecture for your use case. And if you're still in the evaluation phase, our Bedrock AgentCore field notes cover what we learned deploying the platform in production for the first time.

The bottom line: AgentCore is the fastest path from "I have an agent that works in a notebook" to "I have an agent that works in production with proper tool access, observability, and security." Start with this guide, make the architecture decisions early, and you'll be shipping within the week.


Frequently Asked Questions

What is Amazon Bedrock AgentCore and how does it differ from Bedrock?

Amazon Bedrock is the foundation model access layer — it gives you access to models from Anthropic, Amazon, Meta, and others through API calls. AgentCore is the agent operations layer built on top of Bedrock. It adds a managed MCP Gateway for tool orchestration, built-in web search, Knowledge Bases with vector and knowledge graph retrieval, Agent Identity for traceable authorization, and step-by-step observability. Think of Bedrock as the model layer and AgentCore as the infrastructure that makes those models useful as agents with real-world tool access.

How long does it take to deploy a first AgentCore workflow?

With this guide, expect 2-3 days for a working deployment. Day one covers AWS setup, IAM configuration, agent creation, and initial Gateway setup. Day two covers tool registration, web search integration, Knowledge Base configuration, and testing. Day three covers optimization, cold start mitigation, and production hardening. Teams without existing AWS experience should add 1-2 days for the learning curve.

What frameworks does AgentCore support?

AgentCore supports LangChain, LangGraph, Strands SDK, OpenAI Agents SDK, Claude Agent SDK, CrewAI, and any custom framework that speaks MCP (Model Context Protocol). The Gateway is MCP-compliant, which means framework choice is not a platform decision. You can start with one framework and migrate to another without changing your tool configuration.

How much does a first deployment cost?

For a low-volume internal tool (5,000 queries per month), expect approximately $160 per month total. For a medium-volume customer-facing agent (40,000 queries per month), expect approximately $1,130 per month. For high-volume automated pipelines (200,000+ queries per month), costs scale linearly with usage. LLM inference typically represents 50-60% of total cost regardless of volume.

What regions is AgentCore available in?

AgentCore is available in three AWS regions: us-east-1 (N. Virginia), eu-west-1 (Ireland), and ap-northeast-1 (Tokyo). For Indian enterprises, ap-northeast-1 is the closest region with 80-120ms additional latency from Mumbai/Bangalore. Choose your region based on where your application infrastructure runs, not where your team is located.

How does the web search tool work in AgentCore?

The web search tool is a managed MCP tool backed by Amazon's own web index containing tens of billions of documents. When your agent calls the tool, Amazon handles query processing, index lookup, semantic snippet extraction, and result delivery. Pricing is $7 per 1,000 queries with zero egress fees. Results are structured JSON with title, URL, snippet, and publication date — clean data your agent can reason over immediately without HTML parsing.

Can I use AgentCore with non-AWS infrastructure?

AgentCore requires AWS for the Gateway, tool orchestration, and managed services. If your agent logic runs outside AWS, you can still connect to the AgentCore MCP endpoint over HTTPS, but you'll need AWS credentials configured in the environment where the agent runs. For teams with multi-cloud architectures, this means maintaining AWS access alongside other cloud providers, which adds operational complexity.

What happens when a tool call fails?

AgentCore's Gateway includes retry logic for transient errors and returns structured error responses for persistent failures. The agent receives a structured error that it can incorporate into its reasoning — for example, choosing an alternative tool or returning a partial result with a caveat. In production deployments, tool call success rates are typically above 99%, with most failures being transient timeouts that the Gateway's retry handles automatically.

How does AgentCore compare to building custom agent infrastructure?

AgentCore is faster to set up (2-3 days vs 2-4 weeks), often cheaper at moderate scale (~$1,130 vs ~$1,440 per month for 40K queries), and eliminates infrastructure maintenance for tool orchestration, authentication, and observability. Custom infrastructure offers unlimited customization and no vendor lock-in but requires dedicated engineering resources. Most teams benefit from AgentCore unless they have genuinely unique requirements like unsupported regions, non-standard tools, or extreme scale optimization needs.

Frequently Asked Questions

Amazon Bedrock is the foundation model access layer — it gives you access to models from Anthropic, Amazon, Meta, and others through API calls. AgentCore is the agent operations layer built on top of Bedrock. It adds a managed MCP Gateway for tool orchestration, built-in web search, Knowledge Bases with vector and knowledge graph retrieval, Agent Identity for traceable authorization, and step-by-step observability. Think of Bedrock as the model layer and AgentCore as the infrastructure that makes those models useful as agents with real-world tool access.

Have a project in mind?

Let's build it.

Start a project