| name | hcls-deploy-agent |
| description | Use when a developer wants to deploy an HCLS agent to Amazon Bedrock AgentCore, configure Gateway tools as MCP endpoints, set up authentication with Cognito, configure memory, or register an agent in the AgentCore Registry. Also use for deployment troubleshooting. |
Deploying an HCLS Agent
When to use this skill
- Developer asks "how do I deploy this agent?"
- Developer needs to configure AgentCore Gateway, Runtime, Memory, or Identity
- Developer wants to expose tools as MCP endpoints
- Developer wants to register an agent in the AgentCore Registry
Deployment Components
AgentCore Deployment
āāā Runtime ā Hosts the agent container
āāā Gateway ā Exposes tools as MCP endpoints (Lambda targets)
āāā Memory ā Conversation persistence (semantic, summary, preferences)
āāā Identity ā Cognito OAuth2 authentication
āāā Registry ā Agent discovery for multi-agent workflows
Steps
1. Prerequisites
pip install bedrock-agentcore
agentcore configure --entrypoint main.py \
-rf agent/requirements.txt \
-er <IAM_ROLE_ARN> \
--name <agent-name>
2. Deploy Infrastructure
Run the prerequisite script (creates Lambda tools, Cognito, Gateway):
./scripts/prereq.sh
This deploys CloudFormation stacks for:
- Lambda functions (tool handlers)
- IAM roles (agent execution, Gateway invocation)
- Cognito user pool (OAuth2 authentication)
- AgentCore Gateway (MCP endpoint with tool targets)
- AgentCore Memory (conversation persistence)
3. Deploy Agent Runtime
rm -f .agentcore.yaml
agentcore launch
4. Verify
agentcore invoke '{"prompt": "Hello, can you help me?"}'
python tests/test_gateway.py --prompt "Test query"
python tests/test_memory.py load-conversation
5. Register in AgentCore Registry (optional)
For multi-agent discovery, register the agent:
import boto3
client = boto3.client('bedrock-agentcore')
client.create_registry_record(
registryName="hcls-registry",
recordName="<agent-name>",
description="<rich description for semantic search>",
descriptorType="MCP",
descriptors={...}
)
Deployment Templates
| Template | What it deploys |
|---|
agentcore_template/ | Backend: Runtime + Gateway + Memory + Streamlit UI |
| FAST | Full-stack: React/Amplify + Cognito + AgentCore + CDK |
AWS MCP Servers Used
When deploying, the following AWS MCP servers help:
agentcore-docs ā API reference for Gateway/Runtime/Memory/Registry
aws-mcp ā create IAM roles, manage CloudFormation stacks, configure S3
strands-docs ā framework patterns for agent code
References
- Deployment scripts:
agentcore_template/scripts/
- Full deployment example:
agents_catalog/28-Research-agent-biomni-gateway-tools/scripts/prereq.sh
- FAST template deployment:
agents_catalog/35-Terminology-agent/