Building a context-aware AI assistant on AgentCore and OpenClaw
aws ·
This article details the construction of a context-aware AI assistant named Sprout, which utilizes Amazon Bedrock AgentCore and the open-source framework OpenClaw to overcome the limitations of stateless chatbots. The system employs AgentCore memory to transform transient conversations into durable knowledge by extracting user preferences, semantic facts, and session summaries into structured long-term records. By routing text queries to Claude Haiku 4.5 for cost efficiency and image analysis to Claude Sonnet 4.5 for multimodal reasoning, the assistant delivers personalized responses grounded in past interactions. The architecture is deployed via a single AWS CloudFormation template, leveraging consumption-based pricing on AgentCore runtime to keep costs low for light personal use. Key design principles include wrapping agent frameworks rather than forking them, using namespaces for data isolation, and implementing prompt caching to significantly reduce inference latency and expenses. The solution demonstrates how asynchronous memory extraction and metadata filtering enable accurate, domain-agnostic assistants that improve with continued user engagement.
aws