Amazon Bedrock's AgentCore harness enables serverless image editing with natural language
No orchestration code needed—just declare the agent and deploy.
Amazon Bedrock has released AgentCore harness, a configuration-driven framework for building serverless AI agents that orchestrate complex workflows without custom orchestration code. This post demonstrates an image editing agent where users upload a photo, describe an edit like “change the car color to blue,” and receive the result in seconds. The agent, powered by Claude Sonnet 4.6 and Claude Haiku 4.5, routes tasks to three Stability AI-based tools for inpainting, outpainting, and search-and-replace. The entire stack—including authentication, encrypted storage, a React frontend, and the agent itself—deploys with a single AWS CDK command. AgentCore runs each invocation in a stateful, isolated microVM with built-in memory (30-day persistence), tool routing via Model Context Protocol (MCP), and a post-processing step to add watermarks using a shell command (no token cost).
Key capabilities include per-invocation model switching, where the agent preserves conversation context when switching between Claude Haiku for chat and Claude Sonnet for editing, and persona overrides (Real Estate, Retail, Automotive) that inject domain-specific system prompts without redeploying. The agent definition is a simple API parameter set: no Python loops, no streaming handlers, no error retry logic. All tools are exposed as AWS Lambda functions behind an MCP gateway, and the agent selects the correct tool based solely on the prompt. The sample also preserves session IDs in localStorage, so conversations survive browser refreshes. This approach drastically reduces the complexity of building multi-step AI applications, moving from boilerplate orchestration to declarative configuration.
- AgentCore harness eliminates the need for custom orchestration loops or framework code—agents are defined entirely through API parameters.
- Supports per-invocation model switching (Claude Haiku for chat, Claude Sonnet for edits) while preserving full conversation context across switches.
- Three image editing tools (inpaint, outpaint, search-replace) are exposed via MCP with semantic routing; post-processing watermark runs as a shell command on the microVM, consuming zero tokens.
Why It Matters
Amazon Bedrock's AgentCore harness slashes the engineering effort to build production-grade AI agents, making serverless image editing accessible with minimal code.