AivexaNewsSearch
AI news for builders and product teamsChecked every hour

Building a context-aware AI assistant on AgentCore and OpenClaw

Collected Oct 6, 2026

An AWS Machine Learning Blog post details how to build a personal assistant that accumulates context using OpenClaw, described as an open source agentic system, running on AgentCore runtime, a capability of Amazon Bedrock AgentCore. The example assistant is Sprout, a gardening assistant, though the post states the architecture is domain-agnostic and the same pipeline could serve a support bot, a fitness coach or an internal help desk by swapping the persona and skills manifest.

The system lives in a single AWS CloudFormation template, deploys with one command, and uses consumption-based pricing that the post estimates at a few dollars a month for light personal use. The agent runs in a linux/arm64 container on AgentCore runtime, which requires listening on port 8080 and exposing GET /ping for health and POST /invocations. A server.py wrapper launches the OpenClaw gateway as a subprocess, health-checks it, and re-checks via an ensure_openclaw_ready() helper before forwarding turns.

Two entry points converge on the agent: Telegram messages via Amazon API Gateway and a webhook Lambda function, and scheduled jobs via Amazon EventBridge Scheduler and a cronjob Lambda function. Both call InvokeAgentRuntime. Amazon S3 provides workspace storage, AWS KMS handles encryption, Secrets Manager holds the bot token, and CloudWatch captures logs and metrics.

Text turns route to Claude Haiku 4.5 and image turns to Claude Sonnet 4.5, with model IDs held in environment variables. Image turns call the Bedrock Converse API directly from server.py; the post says the in-container OpenClaw build dropped the image_url content parts before they reached Bedrock.

AgentCore memory has two layers: short-term events stored via CreateEvent keyed by actorId and sessionId, and long-term records produced asynchronously by three extraction strategies — USER_PREFERENCE, SEMANTIC and SUMMARIZATION. Records are filed into per-user namespaces. Retrieval runs against the long-term namespace with a 50-result cap under a 3-second budget; failures degrade to answering without memory. Metadata filtering requires declaring indexed keys; Sprout uses type, section and plants.

The post also covers prompt caching on Amazon Bedrock, stating it can reduce costs by up to 90 percent and latency by up to 85 percent for supported models when stable content is placed first.

Read at AWS Machine Learning Blog

Based on reporting from the original publisher. Visit the source for full context and later updates.

Publisher excerpt

Off-the-shelf AI assistants forget you between conversations. This post shows how to build a personal assistant that accumulates context using OpenClaw on Amazon Bedrock AgentCore runtime, with AgentCore memory turning disposable chats into durable, structured knowledge you can retrieve with metadata filters.