<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Agentcore | The AWS Blog</title><link>https://theawsblog.com/tags/agentcore/</link><description>Articles, tutorials and insights from the AWS community.</description><generator>Hugo</generator><language>en</language><managingEditor>@theawsblog (The AWS Blog)</managingEditor><webMaster>@theawsblog</webMaster><lastBuildDate>Fri, 07 Aug 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://theawsblog.com/tags/agentcore/index.xml" rel="self" type="application/rss+xml"/><item><title>Agent Authorization Needs to Understand Time and Sequence</title><link>https://theawsblog.com/news/emiliano-montesdeoca/bedrock-agentcore-temporal-policies/</link><pubDate>Fri, 07 Aug 2026 00:00:00 +0000</pubDate><author>Emiliano Montesdeoca</author><guid>https://theawsblog.com/news/emiliano-montesdeoca/bedrock-agentcore-temporal-policies/</guid><description>Amazon Bedrock AgentCore temporal policies extend authorization beyond identity so agent actions can be checked against workflow history, freshness, approvals, and cumulative limits.</description><content:encoded>&lt;p&gt;Traditional authorization asks who is making a request and whether that principal can call a tool. That model is still necessary, but agents create a second question: what happened immediately before this request?&lt;/p&gt;
&lt;p&gt;A single tool call may be harmless in isolation and dangerous in sequence. An agent can read an account, invent a different identifier, and pass it to a money-moving tool. It can reuse an old approval. It can execute many individually valid actions until the total crosses a business limit.&lt;/p&gt;
&lt;p&gt;The AWS Machine Learning Blog&amp;rsquo;s &lt;a href="https://aws.amazon.com/blogs/machine-learning/securing-ai-agents-with-temporal-policies-in-amazon-bedrock-agentcore/"&gt;temporal policy pattern for Amazon Bedrock AgentCore&lt;/a&gt; addresses that gap by evaluating an action against the agent&amp;rsquo;s session history. The important idea is not another policy syntax. It is that authorization for an agent needs to understand trajectory.&lt;/p&gt;
&lt;h2 id="identity-is-not-enough"&gt;Identity is not enough&lt;/h2&gt;
&lt;p&gt;A normal IAM check can answer whether an agent role is allowed to call &lt;code&gt;execute_trade&lt;/code&gt;. It does not necessarily know whether the agent fetched a current price, received approval for this trade, or already spent the session&amp;rsquo;s budget.&lt;/p&gt;
&lt;p&gt;Temporal policies can express conditions such as:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;a profile lookup must happen before a write action,&lt;/li&gt;
&lt;li&gt;the identifier used by the next tool must match a value returned earlier,&lt;/li&gt;
&lt;li&gt;a price must be refreshed within a defined time window,&lt;/li&gt;
&lt;li&gt;cumulative spend must stay below a session limit,&lt;/li&gt;
&lt;li&gt;a human approval can be consumed only once,&lt;/li&gt;
&lt;li&gt;a capability expires after inactivity.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These are business and safety rules that depend on order, time, and accumulated state.&lt;/p&gt;
&lt;h2 id="put-the-enforcement-outside-the-agent"&gt;Put the enforcement outside the agent&lt;/h2&gt;
&lt;p&gt;The source article emphasizes that the policies run at the AgentCore Gateway perimeter, outside the agent&amp;rsquo;s own code. That placement is important. If the agent&amp;rsquo;s prompt, planner, or tool wrapper is the only enforcement point, a model mistake or a code defect can bypass it.&lt;/p&gt;
&lt;p&gt;The gateway still needs an accurate session boundary. Requests carry a session ID so the policy engine can associate actions with the right trajectory. Treat that ID as security-sensitive. A collision or a user-controlled identifier that is not scoped correctly can mix histories and produce the wrong authorization decision.&lt;/p&gt;
&lt;p&gt;Keep policy decisions observable. For every deny, operators should be able to see which condition failed, which previous action was relevant, and whether the problem was a legitimate workflow edge case or an attempted unsafe sequence.&lt;/p&gt;
&lt;h2 id="temporal-rules-are-least-privilege-with-context"&gt;Temporal rules are least privilege with context&lt;/h2&gt;
&lt;p&gt;Least privilege for agents is more precise than giving a role access to a list of tools. It can mean giving a tool access only after the agent has completed the required verification steps, for a limited time, and within a cumulative budget.&lt;/p&gt;
&lt;p&gt;That changes how I would design an agent workflow. First map the destructive or irreversible actions. Then identify the facts that must be true before each action. Those facts become policy conditions rather than instructions in a system prompt.&lt;/p&gt;
&lt;p&gt;For example, a support agent may read a customer record freely, but a refund tool could require a recent order lookup, a matching order ID, a maximum amount, and one human approval per refund. The agent can still plan and converse flexibly. The gateway controls the action boundary.&lt;/p&gt;
&lt;h2 id="start-in-observation-mode"&gt;Start in observation mode&lt;/h2&gt;
&lt;p&gt;Do not turn a complex temporal policy on in enforcement mode without seeing how real traffic behaves. Begin with a logging or observation mode if the integration supports it. Collect normal trajectories, denied-looking sequences, stale data cases, retries, and human handoffs.&lt;/p&gt;
&lt;p&gt;Then add one requirement at a time:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Define the session boundary and identity mapping.&lt;/li&gt;
&lt;li&gt;Inventory tool calls and mark which actions are consequential.&lt;/li&gt;
&lt;li&gt;Write a policy for one sequence or freshness rule.&lt;/li&gt;
&lt;li&gt;Replay legitimate and adversarial trajectories in tests.&lt;/li&gt;
&lt;li&gt;Observe production-like traffic without blocking it.&lt;/li&gt;
&lt;li&gt;Move the rule to enforcement after false positives are understood.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;A policy that is too strict can push operators toward disabling the control. A policy that is too vague gives false confidence. Small, testable rules are easier to review and explain.&lt;/p&gt;
&lt;h2 id="what-temporal-policies-do-not-solve"&gt;What temporal policies do not solve&lt;/h2&gt;
&lt;p&gt;They do not make a tool safe by themselves. The tool still needs input validation, idempotency, resource scoping, and useful errors. They also do not verify that the model&amp;rsquo;s natural-language explanation is true. They control whether an action is permitted under the recorded trajectory.&lt;/p&gt;
&lt;p&gt;That distinction matters when a workflow includes external systems or asynchronous callbacks. Decide what evidence is authoritative, how long it remains fresh, and what happens when an upstream result is delayed or duplicated.&lt;/p&gt;
&lt;p&gt;Identity-based access control remains the foundation. Temporal policies add the missing context for workflows where order and time change the meaning of an action.&lt;/p&gt;
&lt;p&gt;For teams putting agents near customer data, financial operations, or production changes, that is a practical upgrade in security thinking: do not ask only who can call the tool. Ask what must have happened before the tool call can be trusted.&lt;/p&gt;</content:encoded></item><item><title>Beyond the SDK Demo: Building Production-Ready .NET Agents with AgentCore</title><link>https://theawsblog.com/news/emiliano-montesdeoca/dotnet-ai-agents-bedrock-agentcore/</link><pubDate>Fri, 07 Aug 2026 00:00:00 +0000</pubDate><author>Emiliano Montesdeoca</author><guid>https://theawsblog.com/news/emiliano-montesdeoca/dotnet-ai-agents-bedrock-agentcore/</guid><description>Moving a .NET AI agent from an SDK sample to Amazon Bedrock AgentCore means making deliberate choices about streaming, sessions, testing, deployment, and portability.</description><content:encoded>&lt;p&gt;The first .NET AI agent is usually easy to demonstrate. Register a model client, add a handler, send a prompt, print the answer. The production version is where the interesting decisions begin: how do sessions stay separate, how do responses stream, how do you test without AWS credentials, and what exactly happens when the runtime scales or restarts?&lt;/p&gt;
&lt;p&gt;The AWS Developer Tools Blog&amp;rsquo;s &lt;a href="https://aws.amazon.com/blogs/developer/building-and-deploying-net-ai-agents-with-amazon-bedrock-agentcore/"&gt;AgentCore guide for .NET&lt;/a&gt; introduces &lt;code&gt;AWS.AgentCore.Hosting&lt;/code&gt; and the surrounding tooling for those concerns. The library &amp;ldquo;handles the operational concerns: scaling, session routing, health checking, and providing managed capabilities like conversation memory.&amp;rdquo; That is useful, but a hosting library cannot choose the boundaries of your application for you.&lt;/p&gt;
&lt;h2 id="choose-an-api-shape-that-leaves-room"&gt;Choose an API shape that leaves room&lt;/h2&gt;
&lt;p&gt;The package supports a source-generator experience and an extension-method experience in ASP.NET Core. The choice looks like syntax. It is really a choice about how much control the application will need around the handler.&lt;/p&gt;
&lt;p&gt;If the agent is a small, stable endpoint, generated wiring can keep the code compact. If the agent will need custom middleware, request correlation, policy checks, metrics, or dependency injection behavior, the extension method gives the team more room to shape the host. The source article describes middleware that can intercept every invocation. That is exactly where I would put cross-cutting concerns rather than scattering them through prompt handlers.&lt;/p&gt;
&lt;p&gt;Keep the handler thin either way. Put business operations, model selection, and external calls behind services that can be tested without the AgentCore runtime. Then the hosting layer remains an integration boundary, not the place where the entire application lives.&lt;/p&gt;
&lt;h2 id="streaming-changes-the-contract"&gt;Streaming changes the contract&lt;/h2&gt;
&lt;p&gt;Returning a complete string is comfortable, but it makes users wait for the slowest part of the generation. AgentCore supports returning &lt;code&gt;IAsyncEnumerable&amp;lt;string&amp;gt;&lt;/code&gt; so tokens can be streamed as they are produced. For conversational applications, the difference between first token latency and total response latency is visible immediately.&lt;/p&gt;
&lt;p&gt;Streaming also changes failure handling. A model call, memory lookup, or downstream tool can fail after the response has started. The caller cannot receive a new HTTP status code at that point, so the protocol needs a clear way to represent an error in the stream. Cancellation matters as well: when the browser disconnects, the handler should stop generating and release work instead of continuing to pay for a response nobody will read.&lt;/p&gt;
&lt;p&gt;Test partial output, cancellation, slow clients, and a failure after the first token. A streaming demo proves that bytes arrive. A production test proves that the system behaves when the stream is interrupted.&lt;/p&gt;
&lt;h2 id="session-ids-are-security-boundaries"&gt;Session IDs are security boundaries&lt;/h2&gt;
&lt;p&gt;AgentCore Memory combines a configured Memory ID with a session ID to load and store conversation history. That makes the session ID part of your security model, not just a convenience parameter.&lt;/p&gt;
&lt;p&gt;Two users must never share a session by accident. A missing session ID should fail clearly or create a deliberately scoped new session; it should not quietly fall back to a shared default. Add tests for two independent sessions, repeated calls in the same session, missing identifiers, and attempts to reuse another user&amp;rsquo;s identifier.&lt;/p&gt;
&lt;p&gt;The local emulator and &lt;code&gt;AWS.AgentCore.Testing&lt;/code&gt; package are valuable here. Use them to verify session behavior in CI without deploying the agent or requiring live AWS credentials. Memory integration is exactly the kind of feature that appears correct in a happy-path demo and fails in a multi-user system.&lt;/p&gt;
&lt;h2 id="deployment-is-still-architecture"&gt;Deployment is still architecture&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;dotnet aws deploy&lt;/code&gt; workflow makes deployment approachable, but it also hides choices. Container architecture, memory, VPC access, request header allowlists, and private service connectivity all affect runtime behavior.&lt;/p&gt;
&lt;p&gt;Read the generated resources and make those choices explicit. If the agent needs a private database or internal API, test the VPC path from the deployed runtime rather than assuming the local Aspire application proves it. If the service has a meaningful cold-start budget, measure it on the actual architecture you plan to run.&lt;/p&gt;
&lt;p&gt;Native AOT can reduce startup time, but it changes the development experience. Source-generated serialization and explicit service resolution may be required where flexible reflection-based binding previously worked. Decide whether cold-start reduction is worth that constraint for this workload instead of enabling AOT because it is available.&lt;/p&gt;
&lt;h2 id="keep-portability-in-the-business-layer"&gt;Keep portability in the business layer&lt;/h2&gt;
&lt;p&gt;AgentCore is a managed runtime, but the agent&amp;rsquo;s business logic can remain portable. Treat the handler as an adapter around services that know how to perform domain operations. Avoid spreading AgentCore-specific session and transport calls through every class.&lt;/p&gt;
&lt;p&gt;That design gives you a useful fallback: the same domain service can be hosted in another ASP.NET Core application, tested in isolation, or moved to another container platform if the operational requirement changes. Portability is not free, but it is much cheaper when the boundary is intentional from the beginning.&lt;/p&gt;
&lt;h2 id="my-pre-production-checklist"&gt;My pre-production checklist&lt;/h2&gt;
&lt;p&gt;Before the first real users arrive, I would require:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;separate-session tests and a clear session ID ownership model,&lt;/li&gt;
&lt;li&gt;streaming tests covering cancellation and mid-response failures,&lt;/li&gt;
&lt;li&gt;emulator-backed integration tests in CI,&lt;/li&gt;
&lt;li&gt;health and correlation telemetry around every invocation,&lt;/li&gt;
&lt;li&gt;a documented deployment and rollback path,&lt;/li&gt;
&lt;li&gt;a decision on JIT versus Native AOT based on measured startup data.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The AgentCore hosting library removes a lot of plumbing. That is its value. The remaining work is the architecture around the plumbing: state, failure, identity, and operations. The SDK demo gets you to the first response. Those decisions are what get the agent to production.&lt;/p&gt;</content:encoded></item><item><title>Persistent Compute Changes the Bedrock AgentCore Boundary</title><link>https://theawsblog.com/news/emiliano-montesdeoca/bedrock-agentcore-runtime-instances-persistent-compute/</link><pubDate>Fri, 07 Aug 2026 00:00:00 +0000</pubDate><author>Emiliano Montesdeoca</author><guid>https://theawsblog.com/news/emiliano-montesdeoca/bedrock-agentcore-runtime-instances-persistent-compute/</guid><description>Amazon Bedrock AgentCore runtime instances bring persistent sessions and shared compute to agent workloads, changing the trade-off between stateless scale and durable execution.</description><content:encoded>&lt;p&gt;For a long time, the cleanest way to think about an AI agent was as a request handler: invoke it, let it do some work, return a result, and put durable state somewhere else. That model is excellent for short tasks. It becomes awkward when an agent needs a shared workspace, a GPU, or a session that stays alive across several days.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://aws.amazon.com/blogs/aws/runtime-instances-persistent-compute-for-production-ai-agents-on-amazon-bedrock-agentcore/"&gt;Amazon Bedrock AgentCore runtime instances&lt;/a&gt; change that boundary. They add persistent, AWS-managed compute for production agents while keeping the AgentCore operational model. The useful part is not simply that an instance can stay alive. It is that a group of agents can share a session and local state without every interaction becoming another distributed-systems problem.&lt;/p&gt;
&lt;h2 id="what-changed"&gt;What changed&lt;/h2&gt;
&lt;p&gt;The stateless AgentCore runtime model behaves much like a short-lived service. It can scale quickly, but the work in one invocation is not a durable workspace. Runtime instances provide a persistent session on managed EC2 infrastructure. The source article describes sessions that can last up to 14 days, be stopped and restarted, share a file system, and use GPU-backed instances when the workload needs them.&lt;/p&gt;
&lt;p&gt;That opens patterns such as a code-writing agent and a review agent working against the same files, or an analysis agent keeping a prepared workspace between stages. Agents can coordinate through tools, while the session preserves the local context that would otherwise need to move through APIs or external storage.&lt;/p&gt;
&lt;p&gt;This is a meaningful shift. A runtime instance session is closer to a durable compute workspace than to a single model request.&lt;/p&gt;
&lt;h2 id="the-trade-off-is-operational-weight"&gt;The trade-off is operational weight&lt;/h2&gt;
&lt;p&gt;Persistent state is convenient, but it is not free. With a stateless runtime, scaling and isolation are relatively easy to reason about. With a persistent instance, you need to understand what happens when the instance stops, restarts, becomes unhealthy, or runs out of memory.&lt;/p&gt;
&lt;p&gt;The first trade-off is state durability. A shared session directory is useful for coordination, but it should not be your only copy of important work. Use durable stores such as Amazon S3, EBS snapshots, or AgentCore Memory according to the kind of state you are protecting. Working files, conversation memory, and business records have different durability requirements.&lt;/p&gt;
&lt;p&gt;The second trade-off is isolation. Multiple agents sharing an instance can reduce network chatter and improve collaboration, but they also share compute, memory, and local storage. A runaway process can affect the rest of the session. A poorly designed file workflow can let one agent overwrite another agent&amp;rsquo;s work. Use explicit directories, atomic writes, quotas, and clear ownership rules instead of assuming that a shared workspace is automatically safe.&lt;/p&gt;
&lt;p&gt;The third trade-off is cost. Stateless runtimes scale to zero between requests. An instance is an hourly compute commitment while it is running. Stopping a session can reduce cost, but it also introduces startup latency. The economics favor workloads with meaningful periods of continuous work, such as batch analysis, code generation, simulation, or long-running agent collaboration. They are less obvious for sporadic chat traffic.&lt;/p&gt;
&lt;h2 id="a-hybrid-shape-makes-sense"&gt;A hybrid shape makes sense&lt;/h2&gt;
&lt;p&gt;I do not see runtime instances as a replacement for stateless runtimes. The more interesting architecture uses both.&lt;/p&gt;
&lt;p&gt;A lightweight front end or orchestrator can handle authentication, request routing, and short interactions on a fast-scaling runtime. It can then delegate expensive or stateful work to a runtime instance. That lets the stateless part absorb bursts while the persistent part handles a bounded session with a known lifecycle.&lt;/p&gt;
&lt;p&gt;The boundary should be explicit. Decide which data belongs in the session, which data must survive the session, and which actions require an external system of record. Do not let a local file quietly become the database because it was convenient during the prototype.&lt;/p&gt;
&lt;h2 id="what-i-would-test-first"&gt;What I would test first&lt;/h2&gt;
&lt;p&gt;Before moving a serious workload, I would run a day-long pilot and measure the uncomfortable details:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Stop a session and restart it later. Verify which files, processes, and memory records survive.&lt;/li&gt;
&lt;li&gt;Run two agents that write to the same workspace and test contention, partial writes, and recovery.&lt;/li&gt;
&lt;li&gt;Create a memory-pressure test. Confirm that one agent cannot starve the rest of the session.&lt;/li&gt;
&lt;li&gt;Compare the hourly cost of a warm instance with the invocation and storage cost of a stateless design.&lt;/li&gt;
&lt;li&gt;Measure provisioning time when scaling from one session to several concurrent sessions.&lt;/li&gt;
&lt;li&gt;Add correlation by session ID to logs, traces, and agent-to-agent calls before the pilot grows.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The source article calls out persistent sessions, shared storage, multi-agent coordination, and GPU access as the main capabilities. Those are useful primitives, but they do not remove the design work around lifecycle, isolation, and recovery.&lt;/p&gt;
&lt;p&gt;The practical takeaway is simple: runtime instances make durable agent workspaces a first-class option on AWS. Use them when the workload genuinely benefits from continuity. Keep short-lived work stateless, keep business state durable, and make the session lifecycle part of the architecture rather than an implementation detail.&lt;/p&gt;</content:encoded></item></channel></rss>