$ show aws/bedrock-agentcore-starter-toolkit
This repository provides a comprehensive CLI toolkit and programmatic interface (Python SDK and notebook clients) for creating, deploying, managing, monitoring, and evaluating AI agents on Amazon Bedrock AgentCore. The system supports multiple agent frameworks (Strands, LangChain/LangGraph, CrewAI, AutoGen, OpenAI Agents, Google ADK) and infrastructure-as-code options (CDK, Terraform). Key capabilities include project scaffolding via Jinja2 templates, runtime lifecycle management (configure, launch, destroy, invoke), memory management (short-term/long-term, semantic, user preference), observability (CloudWatch-based trace and log querying with OpenTelemetry span parsing), evaluation (LLM-as-a-judge with built-in and custom evaluators), policy engine CRUD, gateway management (MCP, API key, Cognito OAuth), and identity federation setup. The codebase is well-structured with a clear three-layer architecture (CLI -> operations -> services), extensive test coverage, and consistent error handling. However, the project is explicitly deprecated in favor of the @aws/agentcore NPM CLI, meaning future development is minimal and users are encouraged to migrate. Despite the deprecation, the reusable abstractions (e.g., CloudWatch query builder, trace processor, strategy models, configuration schemas) demonstrate solid software craftsmanship.
The LLM identified 5 files worth highlighting for reuse:
A parameterized CloudWatch Logs Insights query builder for OpenTelemetry span, session, and runtime log queries. Generates queries from structured filter parameters (e.g., agent_id, session_id, span_id) with optional time-range and pagination. Self-contained and extractable for any project needing to query CloudWatch for structured log or span data.
A `TraceProcessor` that groups spans into hierarchical traces, extracts input/output messages, calculates duration and error indicators, and serializes to dict/JSON. Uses a sorted span list to build parent-child trees. Reusable in any observability system that consumes CloudWatch span data for trace visualization.
A base Pydantic model for memory strategies with `to_dict()` serialization. Concrete strategies (Semantic, Summary, UserPreference, SelfManaged) inherit from it. Demonstrates clean use of Pydantic for configuration objects that can be serialized/deserialized independently. Extractable for any project needing type-safe strategy definitions.
Pydantic models for evaluation results (`EvaluationResult`, `EvaluationResults`, `ReferenceInputs`) with `to_api_dict()` and `from_api_response()` methods. Clean separation of internal representation from API payload. Reusable across any evaluation system that needs typed result objects with serialization.
Pydantic schemas for Bedrock AgentCore deployment configuration (`BedrockAgentCoreConfigSchema`, `BedrockAgentCoreAgentSchema`, `AWSConfig`). Validates YAML configuration with nested fields and descriptions. Extractable as a base for any project requiring structured config validation with Pydantic.