SuperAPI AI 工具集

hcls-deploy-agent

部署与运维

查看项目

更新于 10-15 17:22

技能介绍

用途:当开发者需要部署 HCLS 智能体到 Amazon Bedrock AgentCore、配置 Gateway 工具为 MCP 端点、使用 Cognito 设置认证、或将智能体注册到 AgentCore Registry 时使用。

主要部署组件:Runtime 承载智能体容器;Gateway 将工具暴露为 MCP 端点(Lambda 目标);Memory 提供对话持久化(语义、摘要、偏好);Identity 提供 Cognito OAuth2 认证;Registry 支持多智能体工作流的智能体发现。

必要用法:先安装 AgentCore CLI:pip install bedrock-agentcore,再用 agentcore configure --entrypoint main.py -rf agent/requirements.txt -er <IAM_ROLE_ARN> --name <agent-name> 配置。运行前置脚本 ./scripts/prereq.sh 部署 CloudFormation 栈(Lambda 函数、IAM 角色、Cognito 用户池、AgentCore Gateway、AgentCore Memory)。随后执行 rm -f .agentcore.yaml 和 agentcore launch 构建容器、推送 ECR 并部署到 Runtime。验证可用 agentcore invoke '{"prompt": "..."}'、python tests/test_gateway.py、python tests/test_memory.py load-conversation。可选步骤:通过 boto3 调用 create_registry_record 在 Registry 中注册,descriptorType 可选 MCP 或 A2A。

模板:agentcore_template/ 部署后端(Runtime+Gateway+Memory+Streamlit UI);FAST 为全栈(React/Amplify+Cognito+AgentCore+CDK)。部署时可借助 agentcore-docs、aws-mcp、strands-docs 等 AWS MCP 服务器。

限制与适用场景:资料未提供具体收费、价格、区域限制或效果数据,暂未提供。适用于在 AWS 上部署 HCLS 领域智能体的开发场景,需要具备 IAM、CloudFormation、Cognito 等基础。