agentleFS
aws-samplesaws-samples/amazon-bedrock-agents-healthcare-lifesciences/skills/hcls-deploy-agent/SKILL.md

hcls-deploy-agent

Skill274 starsChanged 6 months agoMIT-0View on GitHub

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.

  • Installs packages

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run the prerequisite script (creates Lambda tools, Cognito, Gateway):

    line 43
  2. Distinctive:

    When deploying, the following AWS MCP servers help:

    line 105

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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

# Install AgentCore CLI
pip install bedrock-agentcore

# Configure
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

# Remove stale config
rm -f .agentcore.yaml

# Launch (builds container, pushes to ECR, deploys to Runtime)
agentcore launch

4. Verify

# Invoke the deployed agent
agentcore invoke '{"prompt": "Hello, can you help me?"}'

# Test Gateway tools independently
python tests/test_gateway.py --prompt "Test query"

# Test memory
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",  # or "A2A" for agent-to-agent
    descriptors={...}
)

Deployment Templates

TemplateWhat it deploys
agentcore_template/Backend: Runtime + Gateway + Memory + Streamlit UI
FASTFull-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/

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.