Coding

Aws Agentcore Langgr

Try it

AWS AgentCore与LangGraph部署助手(云写操作需谨慎)。Multi-agent systems on AWS Bedrock AgentCore with LangGraph orchestration. Source: <。适用于多种工作场景,提供专业的能力支持。轻量级设计,低资源占用,适配云端与本地部署。

What it does

AWS AgentCore与LangGraph部署助手(云写操作需谨慎)。Multi-agent systems on AWS Bedrock AgentCore with LangGraph orchestration. Source: <。适用于多种工作场景,提供专业的能力支持。轻量级设计,低资源占用,适配云端与本地部署。

The skill document

核心功能: 本技能提供专业的能力支持等能力。

aws-agentcore-langgraph

Multi-agent systems on AWS Bedrock AgentCore with LangGraph orchestration. Source: <

Install

pip install bedrock-agentcore bedrock-agentcore-starter-toolkit langgraph
uv tool install bedrock-agentcore-starter-toolkit  # installs agentcore CLI

Quick Start

from langgraph.graph import StateGraph, START
from langgraph.graph.message import add_messages
from langgraph.prebuilt import ToolNode, tools_condition  # routing + tool execution
from bedrock_agentcore.runtime import BedrockAgentCoreApp
from typing import Annotated
from typing_extensions import TypedDict

class State(TypedDict):
    messages: Annotated[list, add_messages]

builder = StateGraph(State)
builder.add_node("agent", agent_node)
builder.add_node("tools", ToolNode(tools))  # prebuilt tool executor
builder.add_conditional_edges("agent", tools_condition)  # routes to tools or END
builder.add_edge(START, "agent")
graph = builder.compile()

app = BedrockAgentCoreApp()  # Wraps as HTTP service on port 8080 (/invocations, /ping)
@app.entrypoint
def invoke(payload, context):
    result = graph.invoke({"messages": [("user", payload.get("prompt", ""))]})
    return {"result": result["messages"][-1].content}
app.run()

CLI Commands

CommandPurpose
agentcore configure -e agent.py --region us-east-1Setup
py --region us-east-1 --name my_agent --non-interactive`Scripted setup
agentcore launch --deployment-type containerDeploy (container mode)
agentcore launch --disable-memoryDeploy without memory subsystem
agentcore devHot-reload local dev server
agentcore invoke '{"prompt": "Hello"}'Test
agentcore destroyCleanup

Core Patterns

Multi-Agent Orchestration

  • Orchestrator delegates to specialists (customer service, e-commerce, healthcare, financial, etc.)
  • Specialists: inline functions or separate deployed agents; all share session_id for context

Memory (STM/LTM)

memory import MemoryClient
memory = MemoryClient()
memory.create_event(session_id, actor_id, event_type, payload)  # Store
events = memory.list_events(session_id)  # Retrieve (returns list)
  • STM: Turn-by-turn within session | LTM: Facts/decisions across sessions/agents
  • ~10s eventual consistency after writes

Gateway Tools

python -m bedrock_agentcore.gateway.deploy --stack-name my-agents --region us-east-1
gateway import GatewayToolClient
gateway = GatewayToolClient()
result = gateway.call("tool_name", param1=value1, param2=value2)
  • Transport: Fallback Mock (local), Local connector servers, Production Gateway (Lambda/REST/connector)
  • Auto-configures BEDROCK_AGENTCORE_GATEWAY_URL after deploy

Decision Tree

Multiple agents coordinating? → Orchestrator + specialists pattern
Persistent cross-session memory? → AgentCore Memory (not LangGraph checkpoints)
External APIs/Lambda? → AgentCore Gateway
Single agent, simple? → Quick Start above
Complex multi-step logic? → StateGraph + tools_condition + ToolNode

Key Concepts

  • AgentCore Runtime: HTTP service on port 8080 (handles /invocations, /ping)
  • AgentCore Memory: Managed cross-session/cross-agent memory
  • LangGraph Routing: tools_condition for agent→tool routing, ToolNode for execution
  • AgentCore Gateway: Transforms APIs/Lambda into connector tools with auth

Naming Rules

  • Start with letter, only letters/numbers/underscores, 1-48 chars: my_agent not my-agent

Troubleshooting

IssueFix
on-demand throughput isn't supportedUse us..-* inference profiles
Model use case details not submittedFill form in Bedrock Console
Invalid agent nameUse underscores not hyphens
Memory empty after writeWait ~10s (eventual consistency)
Container not reading .envSet ENV in Dockerfile, not .env
Memory not working after deployCheck logs for "Memory enabled/disabled"
list_events returns emptyCheck actor_id/session_id match; event['payload'] is a list
Gateway "Unknown tool"Lambda must strip ___ prefix from bedrockAgentCoreToolName
Platform mismatch warningNormal - CodeBuild handles ARM64 cross-platform builds

References

    • CLI commands, deployment, lifecycle
  • [agentcore-runtime.path=references%2Fagentcore-runtime.md&ownerHandle=killerapp) - Streaming, async, observability
  • [agentcore-memory.path=references%2Fagentcore-memory.md&ownerHandle=killerapp) - STM/LTM patterns, API reference
  • [agentcore-gateway.path=references%2Fagentcore-gateway.md&ownerHandle=killerapp) - Tool integration, connector, Lambda
  • [langgraph-patterns.path=references%2Flanggraph-patterns.md&ownerHandle=killerapp) - StateGraph design, routing
    • Example multi-agent architecture

安装与配置

运行环境

  • Agent平台: 支持SKILL.md的任意AI Agent( Code / Cursor / Codex / CLI等)
  • 操作系统: Windows / macOS / Linux

依赖说明

依赖项类型是否必需获取方式
LLM APIAPI必需由Agent内置LLM提供

API Key 配置

  • 本Skill基于Markdown指令,无需额外API Key(除内容中明确标注的外部API)

可用性分类

  • 分类: MD+execute(纯Markdown指令,部分功能需要exec命令行执行能力)
  • 说明: 基于Markdown的AI Skill,通过自然语言指令驱动Agent执行任务

主要能力

  • This skill is a coherent AWS AgentCore/LangGraph deployment aid, but users should treat its cloud
  • 触发关键词: aws-agentcore-langgraph, aws, coherent, agentcore, langgraph, skill

典型场景

场景输入输出
基础使用用户请求处理结果

不适用于:需要人工判断的复杂决策场景

示例

示例1:基础用法

# 请参考上方使用说明进行配置和调用
result = "ready"
```python
from langgraph.graph import StateGraph, START
from langgraph.graph.message import add_messages
from langgraph.prebuilt import ToolNode, tools_condition  # routing + tool execution
runtime import BedrockAgentCoreApp
from typing import Annotated
from typing_extensions import TypedDict

class State(TypedDict):
    messages: Annotated[list, add_messages]

builder = StateGraph(State)
builder.add_node("agent", agent_node)
builder.add_node("tools", ToolNode(tools))  # p

问答整理

Q1: 如何开始使用Aws Agentcore Langgr?

A: 请先阅读使用流程章节,确认环境满足依赖说明中的要求。

Q2: 遇到错误怎么办?

A: 请参考错误处理章节,按照表格中的处理方式操作。

Q3: Aws Agentcore Langgr有什么限制?

A: 请参考已知限制章节了解具体限制。

限制条件

  • 依赖云服务,需要网络连接

安全提醒

安全风险防范

风险项等级防护措施验证方法
API密钥泄露通过环境变量配置,禁止硬编码定期检查代码和配置文件
命令执行风险仅执行白名单命令,避免拼接用户输入使用沙箱环境测试
网络通信安全使用HTTPS协议,验证SSL证书定期检查证书有效期
敏感数据暴露输出结果中不包含密钥、令牌等敏感信息日志脱敏审查
未授权访问限制访问权限,实施认证机制定期审计访问日志

使用前请确认已阅读依赖说明章节,确保运行环境满足安全要求。

量化评估

操作场景手动耗时自动化耗时效率提升
文件解析与提取5-10分钟/个<5秒/个60-120x
批量文件处理(100个)8-16小时<5分钟96-192x
API调用与响应解析2-3分钟/次<1秒/次120-180x
多接口数据聚合15-30分钟<10秒90-180x
命令执行与结果收集3-5分钟/次<2秒/次90-150x
重复任务批量执行因任务而异线性缩减5-50x
错误排查与修复10-30分钟<30秒20-60x

差异分析

对比维度Aws Agentcore Langgr传统手动方式通用脚本工具
自动化程度全流程自动完全手动部分自动
错误处理内置错误恢复依赖人工经验基本try-catch
可复用性参数化配置一次性脚本模板化
安全合规内置安全检查无安全保障无安全保障
适用场景AWS AgentCore与LangGraph部署助手(云写操作需谨慎)通用场景通用场景

重要特性

  • 自动化执行: AWS AgentCore与LangGraph部署助手(云写操作需谨慎)
  • 文件处理: 支持多种文件格式的读取、解析和写入操作
  • API集成: 通过标准化接口调用外部服务并处理响应
  • 命令执行: 在安全沙箱中执行系统命令并收集结果

常见疑问速答

Q1: Aws Agentcore Langgr支持哪些输入格式?

A1: AWS AgentCore与LangGraph部署助手(云写操作需谨慎)。支持文本指令和结构化参数输入,具体格式参考使用流程章节。

Q2: 需要配置API Key吗?

A2: 是的,部分功能需要配置对应平台的API Key。请在依赖说明章节查看具体要求,并通过环境变量安全配置。

Q3: 命令行执行失败怎么办?

A3: 检查命令参数是否正确,确认运行环境支持exec能力。如遇权限问题,请参照错误处理章节排查。

特色对比

对比维度Aws Agentcore Langgr传统手动方式通用脚本工具
自动化程度全流程自动完全手动部分自动
错误处理内置错误恢复依赖人工经验基本try-catch
可复用性参数化配置一次性脚本模板化
安全合规内置安全检查无安全保障无安全保障
适用场景AWS AgentCore与LangGraph部署助手(云写操作需谨慎)通用场景通用场景

功能介绍

  • 自动化执行: AWS AgentCore与LangGraph部署助手(云写操作需谨慎)
  • 文件处理: 支持多种文件格式的读取、解析和写入操作
  • API集成: 通过标准化接口调用外部服务并处理响应
  • 命令执行: 在安全沙箱中执行系统命令并收集结果

Related skills

AWS Bedrock AgentCore与LangGraph多代理部署编排工具。提供StateGraph状态图编排、AgentCore Runtime HTTP封装(8080端口)、 Memory跨会话STM/LTM持久记忆、Gateway外部API/Lambda工具集成、CLI全生命周期管理五大核心能力. 适用于多代理协调的复杂业务系统、跨会话持久记忆代理、外部API集成到代理工具链、生产级AI代理部署.

基于AWS Bedrock AgentCore与LangGraph的多智能体编排部署助手,免费体验核心编排能力,适合个人开发者快速上手。

|-. 面向需要aws graph agent相关能力的开发场景,提供完整工作流程和配置指南. 该工具基于用户反馈进行了深度优化,提升了可操作性。Use。Use when 需要代码生成、编程辅助、调试测试、开发部署时使用。不适用于无明确技术栈的模糊需求。适用于独立开发者、企业团队和自动化工作流场景。

Discover AWS-hosted AI agent and MCP-relevant assets from the operator's environment, emit canonical agent-bom inventory JSON, and scan it without giving agent-bom long-lived cloud credentials. Use when a user asks to inventory AWS Bedrock, ECS, SageMaker, Lambda, EKS, Step Functions, EC2, or agentic AWS infrastructure as canonical inventory. Passing that inventory to agent-bom is optional and operator-chosen.

40 installs

用 LangGraph 把老板的一句话需求变成 3 行可执行代码方案(带 tool 去重,避免重复造轮子)。Use when user mentions "写代码的点子", "用代码解放双手", "LangGraph demo", or wants a quick coding plan.

Use when an agent should learn from prior task-solving traces, recommend tools or skills for a new decomposed task, record reusable execution experience, or...

13 installs