Google ADK and Amazon Bedrock AgentCore

One is a kit for building agents. The other is a set of services for running them. Compare them with that in mind.

BeginnerIntermediateExpert · 12 min read · Last updated:

In short

Google's Agent Development Kit (ADK) is an open-source framework for defining agents, tools and, since version 2.0, graph-based workflows. Amazon Bedrock AgentCore is a group of managed services for running agents, including isolated runtime sessions, a gateway to tools, memory, identity and observability, and it accepts agents written with a range of frameworks. They solve different problems, so the comparison is usually between layers.

What you will learn: what each covers, a runnable ADK agent and workflow, the HTTP contract of an AgentCore runtime application, how state and permissions work, testing offline and how to plan for portability.
Prerequisites: The Agent Loop: Observe, Reason, Plan, Act, Reflect, Orchestration vs Automation vs Frameworks and basic familiarity with a cloud platform.

Versions used

Checked in November 2026. Run locally with google-adk 2.15.1 and bedrock-agentcore 1.28.0 using a scripted model or a local test client. Nothing was deployed to Google Cloud or AWS, and no cloud service was called. Services, regions and prices change, so confirm them in the providers' documentation.

Beginner Kit and platform

Where each one sits

Agent codeADK, or another framework, or your own loop
Runtimereceives requests, isolates sessions, scales
Platform servicestools gateway, memory, identity, monitoring
ADK mainly provides the top layer; AgentCore mainly provides the lower two.
AspectGoogle ADKBedrock AgentCore
Kind of productOpen-source development kitManaged cloud services with SDKs
You writeAgents, tools, workflowsAn application that meets the runtime contract, plus configuration
LanguagesPython, Java, Go, TypeScript, KotlinAny that your runtime package supports
ModelsGemini first, others through adaptersModels inside or outside Amazon Bedrock
Runs whereLocally, in containers, or on Google Cloud servicesOn AWS

Google Agent Development Kit

An ADK Agent has a name, a model, an instruction and tools. A Runner executes it against a session and produces a stream of events: the user's message, model calls for tools, tool results and replies. Reading events is how you debug and test.

import asyncio

from google.adk import Agent
from google.adk.models import BaseLlm, LlmResponse
from google.adk.runners import InMemoryRunner
from google.genai import types

SCRIPT = [
    types.Part.from_function_call(name="stock_level",
                                  args={"sku": "KT-2"}),
    types.Part.from_text(text="There are 4 units of KT-2 in stock."),
]


class ScriptedLlm(BaseLlm):
    """Offline stand-in for a Gemini or other model."""

    async def generate_content_async(self, llm_request, stream=False):
        yield LlmResponse(content=types.Content(
            role="model", parts=[SCRIPT.pop(0)]))


def stock_level(sku: str) -> dict:
    """Return the units in stock for one product code."""
    return {"sku": sku, "units": {"KT-2": 4}.get(sku, 0)}


root_agent = Agent(
    name="stock_agent",
    model=ScriptedLlm(model="scripted"),
    instruction="Answer stock questions from the tool only.",
    tools=[stock_level],
)


async def main():
    runner = InMemoryRunner(agent=root_agent, app_name="demo")
    for event in await runner.run_debug("How many KT-2?", quiet=True):
        for part in (event.content.parts if event.content else []):
            if part.function_call:
                print("call:", part.function_call.name,
                      part.function_call.args)
            if part.function_response:
                print("result:", part.function_response.response)
            if part.text and event.author != "user":
                print("answer:", part.text)


asyncio.run(main())

Output:

call: stock_level {'sku': 'KT-2'}
result: {'sku': 'KT-2', 'units': 4}
answer: There are 4 units of KT-2 in stock.

The scripted model class implements the base model interface. The framework executed the function and recorded call, result and answer as events. InMemoryRunner and run_debug are for development; a service needs a persistent session store and your own handling of users.

How ADK sees your function

The function in the listing has a typed argument and a docstring. Those become the declaration the model receives. Small choices here decide whether the model calls the tool correctly.

ChoiceGuidance
NameSay what it returns or does, such as stock_level
DocstringState when to use it and what each argument looks like
Return valueA small dictionary with clear keys, including an explicit not-found case
ErrorsReturn a safe, actionable status; log the detail privately
IdentityRead the user from the session context your server controls

Note one weakness in the example: an unknown product code reports zero units, which the model would pass on as "out of stock". Returning a separate "unknown product" status avoids that mistake. Gaps like this are found by testing tools with unexpected input, not by reading the happy path.

Intermediate Workflows, state and runtime

Graph workflows in ADK 2.0

ADK 2.0, generally available for Python from May 2026 with Go following in June, introduced a graph-based workflow runtime and structured collaboration between agents. A workflow lists edges; functions and agents are nodes. A node can emit a route that selects the next one.

import asyncio

from google.adk import Event, Workflow
from google.adk.runners import InMemoryRunner


def read_claim(node_input):
    amount = int(node_input.parts[0].text.split()[-1])
    route = "manual" if amount > 500 else "auto"
    return Event(output=amount, route=route)


def auto_pay(node_input: int):
    return f"{node_input}: paid automatically"


def manual_review(node_input: int):
    return f"{node_input}: queued for a person"


flow = Workflow(name="claims", edges=[
    ("START", read_claim),
    (read_claim, {"auto": auto_pay, "manual": manual_review}),
])


async def main():
    runner = InMemoryRunner(node=flow, app_name="demo")
    for amount in (120, 900):
        events = await runner.run_debug(
            f"claim amount {amount}", session_id=str(amount), quiet=True)
        print(events[-1].output)


asyncio.run(main())

Output:

120: paid automatically
900: queued for a person

No model is involved in this graph, which is the point: rules that must hold are written as code. An agent can be added as a node where judgment is needed. If a node emits a route that no edge matches, the branch ends, so include a default or test every route.

Upgrading from 1.x

Version 2.0 has breaking changes to the agent API, the event model and the session schema. Google's documentation states that sessions written by 2.0 can be read by 1.28 and later but are incompatible with older releases. Plan the order of upgrades for every service that shares a session store.

Sessions, state and memory

ConceptHoldsQuestion to settle
SessionOne conversation and its eventsWhere is it stored, and for how long?
StateValues the agent and tools read and writeWhich keys are private to a user?
MemoryInformation searchable across sessionsWho may see and delete it?
ArtifactsFiles produced or usedHow is access controlled?

Function tools can be marked as requiring confirmation, either always or according to a function of the arguments. Treat that as the start of an approval design, with identity, expiry and an audit record; see Human-in-the-Loop and Approval Gates.

Developer tooling

The package includes a command line with a local web interface for inspecting runs, commands for evaluation against saved test cases, and deployment helpers. The web interface is a development aid: do not expose it to the internet.

More than one agent

ADK can compose agents, either by letting one delegate to others or by placing them as nodes in a workflow. Prefer the workflow form when the order is known, since it is easier to test and to explain. Give each agent its own instructions and the smallest set of tools, and pass defined data between nodes instead of whole conversations. Compare against a single agent before keeping the extra parts; Single-Agent vs Multi-Agent Systems shows how.

Amazon Bedrock AgentCore

AWS announced general availability in October 2025, describing a platform that works with any framework, model or protocol. You can adopt parts separately.

Service areaWhat it does
RuntimeRuns your agent, with an isolated environment for each session
GatewayTurns APIs and Lambda functions into tools, including over MCP
MemoryStores short and longer-term context; fine-grained access control was added in August 2026
IdentityManages how agents authenticate and act for users
ObservabilityTraces and metrics for agent runs
Built-in toolsManaged code execution and browser use
Agent RegistryA catalog of agents and related resources, generally available since August 2026
Managed harnessRuns the agent loop from configuration, generally available since June 2026

The runtime application contract

An application built with the Python SDK is a small web app. It answers health checks on /ping and receives work on /invocations. You decorate one function as the entry point. The listing exercises both routes with a test client, passing the session header the runtime uses.

import logging

from bedrock_agentcore.runtime import BedrockAgentCoreApp
from starlette.testclient import TestClient

app = BedrockAgentCoreApp()
logging.getLogger("bedrock_agentcore.app").setLevel(logging.WARNING)


@app.entrypoint
def invoke(payload, context):
    """Call your agent here; any framework will do."""
    question = payload.get("prompt", "").strip()
    if not question:
        return {"error": "prompt is required"}
    return {"session": context.session_id,
            "answer": f"(agent reply to: {question})"}


if __name__ == "__main__":
    # In a container you would call app.run() to serve port 8080.
    # Here the same HTTP contract is exercised without a network.
    client = TestClient(app)
    header = {"X-Amzn-Bedrock-AgentCore-Runtime-Session-Id": "s-123"}
    print("ping:", client.get("/ping").json()["status"])
    for body in ({"prompt": "Where is A-17?"}, {}):
        reply = client.post("/invocations", json=body, headers=header)
        print(reply.status_code, reply.json())

Output when run locally:

ping: Healthy
200 {'session': 's-123', 'answer': '(agent reply to: Where is A-17?)'}
200 {'error': 'prompt is required'}

Look at the second response. The input was missing, yet the status is 200, because the function returned normally with an error object. Decide how callers learn of failures, and test it. Inside the function you can call any agent code; keeping that call to one line makes the same agent usable elsewhere.

Expert Security, operations and portability

Identity and permissions

On either cloud, the most important design question is whose authority a tool call uses. An agent with a broad service role can be talked into using all of it.

ControlPractice
Workload identityOne role per agent, with only the actions it needs
Acting for a userPass verified identity to tools; check it in the target service
Session identifiersCreate or verify them on the server and bind them to a user
NetworkRestrict outbound access, above all for code and browser tools
SecretsUse the platform's secret store, never prompts or state
SpendBudgets, quotas and alerts on model and service use

A session header such as the one in the listing identifies a conversation. It does not prove who the caller is. Authentication has to happen before your function trusts anything. See Agent Identity, Authorization and Secrets.

Seeing what happened

Both products can emit traces and logs. Agree on a small set of fields so that one request can be followed from the caller to every tool.

FieldWhy
Request and session identifiersJoin application, runtime and tool logs
Agent, model and release versionExplain a change in behavior
Tool name, status and durationFind slow and failing dependencies
Tokens and cost estimateControl spend
Approval and decision identityAnswer who allowed an action

Capturing full prompts and results helps debugging and stores whatever users and tools put in them. Choose what is captured, mask sensitive values and set retention before launch. See Tool Testing and Observability.

Failures to rehearse

FailureQuestion to answer
Runtime session ends mid-taskWhat was saved, and can the task continue?
Client retries after a timeoutCould the action happen twice?
Model quota is exhaustedDoes the caller get a clear status?
A tool service is downDoes the agent stop or invent an answer?
A new release misbehavesHow quickly can the previous one serve again?

A managed runtime isolates sessions and scales your code. It does not know whether repeating your payment call is safe. Operation keys and recorded outcomes remain your job, as described in Reliable Tool Execution and Error Recovery.

Testing before deployment

  • Tools are tested as plain functions
  • The agent runs with a scripted model on every commit
  • Each workflow route has a case, including one that matches nothing
  • The runtime routes are tested locally, with bad and oversized input
  • A staging deployment checks identity, network rules and logs
  • An evaluation set runs against the real model

Understanding cost

Count each meter separately: model tokens, runtime compute, memory storage and retrieval, gateway calls, built-in tools, logging and tracing. A long idle session or a verbose trace may cost more than expected. Take current prices from the provider, run a realistic sample of traffic and divide by successful tasks.

Staying portable

Keep independentPlatform-specific by nature
Business rules and tool functionsDeployment definitions
Evaluation casesIdentity and network policy
Export of data you must keepManaged memory formats
Standard protocols at boundariesMonitoring dashboards

Some dependence is a fair price for not running infrastructure yourself. Write down which parts would need rewriting, so the choice is made knowingly. See Choosing Frameworks: Lock-In, Upgrades and Benchmarks.

Choosing

SituationReasonable first trial
Team on Google Cloud using GeminiADK with Google's hosting options
Team on AWS with an existing frameworkKeep the framework; try AgentCore runtime
Need a managed tool gateway on AWSGateway on its own
Must run on your own serversAn open-source framework in your containers
Simple internal helperA plain service and a model client
Illustrative architecture, not a real deployment

A company writes an agent with ADK, packages it in a container and hosts it on AWS behind the AgentCore runtime contract. Tools stay in the company's own services with their own authorization. The team accepts two vendors' upgrade cycles in return, and records that cost.

Common mistakes

MistakeBetter practice
Comparing a kit with a platform feature by featureCompare layer with layer
In-memory sessions in a servicePersistent storage with retention rules
Trusting a session identifier as identityAuthenticate, then bind the session
One powerful role for all agentsLeast privilege per agent
Errors returned as successUse clear statuses callers can act on
Upgrading ADK across a shared store all at onceCheck session compatibility first

Checklist

  • The layer each product supplies is clear
  • Tool calls run with the narrowest authority
  • Sessions and memory have owners and retention periods
  • Routes, errors and limits are tested locally
  • Costs are measured per successful task
  • Upgrade and exit plans are written down

Frequently asked questions

Does ADK work only with Gemini?

No. It is designed around Gemini and offers adapters and a base class for other models. Test tool calling and streaming with the model you choose.

Must AgentCore use Amazon Bedrock models?

No. AWS describes it as working with any framework and model. Network access, credentials and data handling for outside providers are your responsibility.

Can I test AgentCore code on a laptop?

You can test the application's routes and logic, as shown. Identity, gateway, memory and scaling behavior need a deployed environment.

Which is better for beginners?

ADK runs locally with little setup. A managed platform adds cloud accounts, permissions and cost, which are worth learning after the agent itself works.

References and further reading

Next steps