Serverless Framework 部署 AWS Bedrock AgentCore:在 serverless.yml 中一键编排 AI 智能体、记忆、工具与网关

发布时间:2026/9/10 14:40:31
Serverless Framework 部署 AWS Bedrock AgentCore:在 serverless.yml 中一键编排 AI 智能体、记忆、工具与网关 Serverless Framework 部署 AWS Bedrock AgentCore在 serverless.yml 中一键编排 AI 智能体、记忆、工具与网关【免费下载链接】serverless⚡ Serverless Framework – Effortlessly build apps that auto-scale, incur zero costs when idle, and require minimal maintenance using AWS Lambda and other managed cloud services.项目地址: https://gitcode.com/GitHub_Trending/se/serverless本文以 Serverless Framework 内置的 Bedrock AgentCore 插件源码位于 packages/serverless/lib/plugins/aws/bedrock-agentcore为核心系统讲解如何通过新增的ai顶层配置属性把 AWS Bedrock AgentCore 的 Runtime Agent、Memory、Tools、Gateway、Browser、CodeInterpreter 六类 AI 资源声明式地纳入 CloudFormation 部署管线。读完本文你将掌握从零配置一个带 Docker 镜像/代码部署的 AI 智能体、为其挂接共享记忆与多类工具网关、以及通过自定义 IAM 角色和部署命令把它发布到 AWS 的完整实操路径同时了解插件在 Serverless Framework 打包/编译阶段的底层实现原理。插件是什么功能与加载条件Bedrock AgentCore 插件是 Serverless Framework 内部AWS provider 侧的一个生命周期插件作用是把serverless.yml中新增的ai顶级配置编译为一整套 AWS Bedrock AgentCore 云资源并自动补齐 IAM 角色、标签、命名与 CloudFormation 输出。其核心能力包括在serverless.yml中用ai顶层属性直接定义 AgentCore 资源支持六类资源类型Runtime Agentsai.agents、Memoryai.memory、Toolsai.tools、Gatewaysai.gateways、Browsersai.browsers、CodeInterpretersai.codeInterpreters自动生成遵循最小权限原则的 IAM 角色自动套用命名约定与标签合并规则为每种资源生成可用于跨栈引用的 CloudFormation 输出。插件按需加载在 插件主入口 index.js 中静态方法shouldLoad检查配置对象里是否存在非空的ai字段——没有ai配置的普通服务不会引入该插件的任何开销。ai配置可以从service.ai、initialServerlessConfig.ai或configurationInput.ai三处任一位置读取见 index.js。快速开始最小可用配置最简用法只需一个ai.agents定义前提是服务目录中存在 Dockerfile构建上下文默认是当前目录.service: my-agent provider: name: aws region: us-east-1 ai: agents: myAgent: description: My AI agent artifact: image: path: . file: Dockerfile protocol: http network: mode: public执行sls deploy后插件会依次完成配置校验、本地构建 Docker 镜像、把资源写入 CloudFormation、部署前推送镜像到 ECR并在部署成功后打印 Runtime ARN、调用 URL 等信息。ai 配置总览六个独立分区无 type 判别字段与很多资源插件一个对象加 type 字段的做法不同AgentCore 插件为每种资源单独开辟一个分区类型由所在的顶级键决定ai: agents: # Runtime agent definitions memory: # Shared memory definitions tools: # Tool definitions (Lambda, OpenAPI, Smithy, MCP) gateways: # Gateway definitions with tool assignments browsers: # Custom browser definitions codeInterpreters: # Custom code interpreter definitions从源码的编译编排看这一结构在 compilation/orchestrator.js 中被按多次遍历的方式消费先编译 gateways 及其工具再依次编译共享 memory、browsers、codeInterpreters最后才编译运行时 agent并把 gateway 与 memory 的引用注入到 agent 上。Runtime Agentsai.agents容器化与纯代码两种部署形态Runtime Agent 是承载智能体逻辑的运行资源支持以容器服务或Python 代码包两种方式发布。Docker 构建部署框架会自动探测当前目录下的Dockerfile因此最简单的配置可以是一个空对象ai: agents: chatbot: {}显式指定镜像构建参数、网络、鉴权与生命周期配置的完整形态ai: agents: myAgent: description: My AI agent artifact: image: path: . file: Dockerfile repository: my-agent buildArgs: NODE_ENV: production protocol: http network: mode: public authorizer: type: custom_jwt jwt: discoveryUrl: https://cognito-idp.us-east-1.amazonaws.com/us-east-1_xxx/.well-known/openid-configuration allowedAudience: - my-client-id requestHeaders: allowlist: - X-User-Id - X-Session-Id - Authorization lifecycle: idleRuntimeSessionTimeout: 900 maxLifetime: 28800镜像构建走本地 Docker、不触发任何 AWS 操作挂载于before:package:createDeploymentArtifacts阶段真正推送到 ECR 发生在部署前的before:deploy:deploy钩子——这两个阶段分别由 index.js 中的buildDockerImages()与pushDockerImages()驱动。使用已构建好的镜像如果镜像已经存在于 ECR直接给出完整 URI 字符串即可ai: agents: myAgent: artifact: image: 123456789012.dkr.ecr.us-east-1.amazonaws.com/my-agent:latestPython 纯代码部署免 Docker对 Python 智能体可以跳过镜像构建直接声明入口文件与运行时ai: agents: myAgent: handler: agent.py runtime: python3.13也可以把代码制品放到自定义 S3 位置由框架在打包阶段上传后引用ai: agents: myAgent: handler: agent.py runtime: python3.12 artifact: s3: bucket: my-bucket key: agent.zip配置校验允许的 Python 运行时来自 validators/schema.js 中的单一事实源SUPPORTED_AGENT_RUNTIMES该数组覆盖python3.10到python3.14README 的属性表列到python3.13schema 层实际还放行了python3.14两处不一致时以编译产物为准。handler会被编译为entryPoint、运行时会被映射为PYTHON_3_12这类 CFN 枚举归一化逻辑位于 orchestrator.js。Runtime Agent 属性总表PropertyRequiredDescriptiondescriptionNoAgent description (max 1200 chars)artifact.imageNoContainer image URI (string) or build config (object)artifact.image.pathNoDocker build context path (default:.)artifact.image.fileNoDockerfile name (default:Dockerfile)artifact.image.repositoryNoECR repository nameartifact.image.buildArgsNoDocker build arguments (key-value pairs)artifact.s3.bucketNoS3 bucket for code artifactartifact.s3.keyNoS3 key for code artifacthandlerNoPython entry point file (e.g.,agent.py)runtimeNopython3.10,python3.11,python3.12, orpython3.13protocolNohttp,mcp, ora2anetwork.modeNopublicorvpcnetwork.subnetsNoVPC subnet IDs (required for vpc mode)network.securityGroupsNoVPC security group IDs (required for vpc mode)authorizerNoString (none,custom_jwt) or object withtypeandjwtauthorizer.jwt.discoveryUrlNoOIDC discovery URL (*required for custom_jwt)authorizer.jwt.allowedAudienceNoArray of allowed audience valuesauthorizer.jwt.allowedClientsNoArray of allowed client IDslifecycle.idleRuntimeSessionTimeoutNoSession idle timeout in seconds (60-28800)lifecycle.maxLifetimeNoMax session lifetime in seconds (60-28800)requestHeaders.allowlistNoHeaders to forward to runtime (max 20)memoryNoInline memory config (object) or reference toai.memoryentry (string)gatewayNoReference to a gateway defined inai.gatewaysenvironmentNoEnvironment variables (same as Lambda)package.patternsNoFile include/exclude patterns for packagingpackage.artifactNoPre-built artifact pathendpointsNoRuntime endpoint definitionsroleNoIAM role ARN (string) or customization objecttagsNoResource tags (key-value pairs)约束要点artifact.image、handler与自动探测的 Dockerfile 三者必须有其一省略authorizer时默认使用 IAM 鉴权详见下文。Agent 鉴权配置authorizer支持字符串简写与对象两种写法# String shorthand — no auth authorizer: none # Object form — JWT auth authorizer: type: custom_jwt jwt: discoveryUrl: https://example.com/.well-known/openid-configuration allowedAudience: - my-client-id allowedClients: - my-app-client allowedScopes: - read - write省略authorizer时默认回落到 IAM 鉴权。编译阶段有一个值得注意的实现细节authorizer会被先统一为大写形式aws_iam→AWS_IAM、custom_jwt→CUSTOM_JWT以兼容 CloudFormation 枚举见 orchestrator.js 的normalizeAuthorizer。Memoryai.memory带语义检索的记忆底座Memory 用于保存会话历史并提供语义检索与摘要能力既可以作为共享资源定义在ai.memory也可以内联在单个 agent 上。共享 Memoryai: memory: conversationMemory: description: Conversation memory with semantic search expiration: 90 strategies: - SemanticMemoryStrategy: Name: ConversationSearch Namespaces: - /conversations/{sessionId} - SummaryMemoryStrategy: Name: SessionSummary Namespaces: - /sessions/{sessionId} - UserPreferenceMemoryStrategy: Name: UserPrefs Namespaces: - /users/{userId}/preferencesAgent 内联 Memoryai: agents: chatbot: memory: expiration: 30Memory 属性表PropertyRequiredDescriptionexpirationNoDays to retain events (3-365, default: 30)strategiesNoMemory strategies arraydescriptionNoMemory description (max 1200 chars)encryptionKeyNoKMS key ARN for encryptionroleNoIAM role ARN (string) or customization objecttagsNoResource tags (key-value pairs)schema校验中expiration的取值范围是 3–365见 validators/schema.js与文档表格一致用户友好的属性名会映射到 CFN 字段例如expiration → EventExpiryDuration、encryptionKey → EncryptionKeyArn。Memory 策略类型SemanticMemoryStrategy- 对会话内容做语义检索- SemanticMemoryStrategy: Name: Search Namespaces: - /sessions/{sessionId}SummaryMemoryStrategy- 对长对话做摘要- SummaryMemoryStrategy: Name: Summary Namespaces: - /sessions/{sessionId}UserPreferenceMemoryStrategy- 追踪用户偏好- UserPreferenceMemoryStrategy: Name: Preferences Namespaces: - /users/{userId}CustomMemoryStrategy- 自定义记忆处理逻辑- CustomMemoryStrategy: Name: Custom Configuration: key: valueEpisodicMemoryStrategy- 带反思reflection的情景记忆- EpisodicMemoryStrategy: Name: Episodes Namespaces: - /episodes/{sessionId} ReflectionConfiguration: enabled: true内联 Memory 的编译细节从源码看agent 上的memory字段如果是字符串则被解析为对ai.memory中共享资源的引用如果是对象则在编译期自动生成一个名为agent-memory的独立 Memory 资源并让 Runtime 资源通过DependsOn依赖它见 orchestrator.js。更为实用的是只要 runtime 关联了 memory插件会自动往它的环境变量里注入BEDROCK_AGENTCORE_MEMORY_ID值为Fn::GetAtt解析出的MemoryId让智能体代码无需手写资源查找即可知道该把会话写进哪块记忆见 orchestrator.js。Toolsai.tools四类工具目标工具是供 agent 通过 gateway 调用的能力单元共支持四种目标类型且一次定义恰好需要其中一种。Lambda 函数工具把既有 Lambda 函数包装成带 JSON Schema 入参声明的工具ai: tools: calculator: function: calculatorFunction toolSchema: - name: calculate description: Perform basic arithmetic inputSchema: type: object properties: expression: type: string description: Arithmetic expression required: - expression functions: calculatorFunction: handler: handlers/calculator.handler runtime: nodejs24.xOpenAPI 工具直接引用 OpenAPI 规范文件ai: tools: weatherApi: openapi: ./schemas/weather-api.ymlSmithy 工具引用 Smithy 模型文件ai: tools: myService: smithy: ./schemas/service.smithyMCP Server 工具指向远端 MCP Server 的 HTTPS 端点ai: tools: knowledge: mcp: https://knowledge-mcp.global.api.awsTool 属性表PropertyRequiredDescriptionfunctionNoLambda function name (string) or{ name, arn }objectopenapiNoOpenAPI schema file path or inline contentsmithyNoSmithy model file path or inline contentmcpNoMCP server HTTPS endpoint URLtoolSchemaNoTool schema array (required forfunctiontools)credentialsNoCredential provider configurationdescriptionNoTool description (max 200 chars)约束要点function、openapi、smithy、mcp四选一。每个工具最终会被编译成一个GatewayTarget类型的 CloudFormation 资源挂到所属 gateway 之下同一工具若出现在多个 gateway 中其逻辑 ID 会自动拼接 gateway 名以避免冲突见 orchestrator.js。Tool 凭据Credentials当工具调用需要访问受保护的外部 API 时可以声明凭据提供方ai: tools: externalApi: function: apiFunction toolSchema: - name: fetch_data description: Fetch external data inputSchema: type: object properties: query: type: string credentials: type: oauth provider: arn:aws:secretsmanager:us-east-1:123456789012:secret:oauth-creds scopes: - read - write grantType: client_credentialsCredential TypePropertiesgateway_iam_role(default)No additional config neededoauthprovider(Token Vault ARN),scopes,grantType,defaultReturnUrl,customParametersapi_keylocation(headerorquery_parameter),parameterName,prefix编译编排器会探测 gateway 下是否挂有使用 OAuth/API Key 凭据的工具进而决定是否把 Token Vault / Workload Identity / Secrets Manager 相关权限条件式地并入 gateway 执行角色见 orchestrator.js。Gatewaysai.gateways经 MCP 协议向 agent 路由工具Gateway 通过 MCP 协议把工具路由给 agent。特别地当定义了ai.tools却没有定义ai.gateways时插件会自动创建一个默认 gateway 并绑定全部工具这是向后兼容的自动模式。显式多 Gateway 与鉴权隔离同一批工具可以按暴露面拆到多个 gateway例如把公开工具与内部工具用不同鉴权策略隔离ai: tools: calculator: function: calculatorFunction toolSchema: - name: calculate description: Perform arithmetic inputSchema: type: object properties: expression: type: string required: - expression internalLookup: function: internalLookupFunction toolSchema: - name: lookup_user description: Look up internal user info inputSchema: type: object properties: userId: type: string required: - userId gateways: publicGateway: authorizer: none tools: - calculator privateGateway: authorizer: aws_iam tools: - internalLookup agents: publicAgent: gateway: publicGateway privateAgent: gateway: privateGateway这里两个 agent 各自通过gateway字段指认 gateway。源码层面gateway 的逻辑 ID 统一为AgentCoreGateway资源名默认 gateway 是AgentCoreGateway见 utils/naming.jsagent 只有在显式指定了 gateway或仅有默认 gateway两种情况下才会被注入 gateway 相关环境变量。默认 Gateway自动创建定义了工具但没有定义 gateway 时所有工具会进入自动创建的默认 gatewayai: tools: calculator: function: calculatorFunction toolSchema: - name: calculate description: Perform arithmetic inputSchema: type: object properties: expression: type: string agents: chatbot: {}注意这种模式下 agent 不写gateway字段也能拿到工具的调用入口——插件会在 Runtime 环境变量中注入BEDROCK_AGENTCORE_GATEWAY_URL值来自默认 gateway 的GatewayUrl属性见 orchestrator.js。Gateway 的 JWT 鉴权与 MCP 协议参数ai: gateways: secureGateway: authorizer: type: custom_jwt jwt: discoveryUrl: https://cognito-idp.us-east-1.amazonaws.com/us-east-1_xxx/.well-known/openid-configuration allowedAudience: - my-client-id allowedClients: - my-app-client allowedScopes: - read - write protocol: instructions: Use these tools for external API access searchType: semantic tools: - myToolGateway 属性表PropertyRequiredDescriptionauthorizerNoString (none,aws_iam,custom_jwt) or object withtypeandjwttoolsNoArray of tool names referencing entries inai.toolsprotocolNoMCP protocol configurationprotocol.instructionsNoInstructions for the agent (max 2048 chars)protocol.searchTypeNosemanticprotocol.supportedVersionsNoSupported MCP versionsdescriptionNoGateway description (max 200 chars)roleNoIAM role ARN (string) or customization objectkmsKeyNoKMS key ARN for encryptionexceptionLevelNodebugtagsNoResource tags (key-value pairs)从编译结果看gateway 最终被写成AWS::BedrockAgentCore::Gateway类型的 CFN 资源携带AuthorizerType枚举CUSTOM_JWT/AWS_IAM/NONE与ProtocolType: MCP见 compilers/gateway.js。Browsersai.browsers浏览器自动化能力默认情况下AWS 托管浏览器会被 agent 自动探测无需任何配置。只有在需要会话录制、VPC 模式等进阶场景时才需要显式定义自定义浏览器ai: browsers: customBrowser: description: Custom browser with session recording network: mode: public signing: enabled: true recording: enabled: true s3Location: bucket: my-recordings-bucket prefix: browser-sessions/PropertyRequiredDescriptionnetwork.modeNopublicorvpc(default:public)network.subnetsNoVPC subnet IDs (required for vpc mode)network.securityGroupsNoVPC security group IDs (required for vpc mode)signing.enabledNoEnable request signingrecording.enabledNoEnable session recordingrecording.s3Location.bucketNoS3 bucket for recordings (*required when recording enabled)recording.s3Location.prefixNoS3 prefix for recordings (*required when recording enabled)descriptionNoBrowser description (max 1200 chars)roleNoIAM role ARN (string) or customization objecttagsNoResource tags (key-value pairs)CodeInterpretersai.codeInterpreters沙箱代码执行默认的 AWS 托管代码解释器sandbox 模式同样无需配置自定义解释器用于需要公网或 VPC 网络模式的场景ai: codeInterpreters: publicInterpreter: description: Code interpreter with public internet access network: mode: publicPropertyRequiredDescriptionnetwork.modeNosandbox(default),public, orvpcnetwork.subnetsNoVPC subnet IDs (required for vpc mode)network.securityGroupsNoVPC security group IDs (required for vpc mode)descriptionNoCodeInterpreter description (max 1200 chars)roleNoIAM role ARN (string) or customization objecttagsNoResource tags (key-value pairs)IAM 角色定制既有 ARN、自定义语句与 CloudFormation 内建函数全部六类资源都支持role定制要么直接复用已有角色 ARN要么在自动生成的角色上叠加自定义策略。复用已有角色 ARNai: agents: myAgent: role: arn:aws:iam::123456789012:role/MyCustomRole定制自动生成的角色可自定义角色名、追加 IAM 语句、附加托管策略或设置权限边界ai: agents: myAgent: role: name: MyAgentRole statements: - Effect: Allow Action: - s3:GetObject Resource: arn:aws:s3:::my-bucket/* managedPolicies: - arn:aws:iam::aws:policy/AmazonS3ReadOnlyAccess permissionsBoundary: arn:aws:iam::123456789012:policy/MyBoundary tags: Team: AIrole属性还支持 CloudFormation 内建函数例如在需要引用同一模板中其他自定义角色时role: Fn::GetAtt: - MyCustomRole - Arn实现上的判定规则是只要role未提供或提供的是定制对象而不是现成 ARN 字符串插件就会调用 iam/policies.js 中对应的generate*Role生成最小权限角色并在模板中附加一个逻辑IDRole资源及RoleArn输出。注意当 runtime 关联 memory 或 gateway 时生成的角色会自动携带访问对应 Memory / Gateway 所需权限权限 ARN 通过 CFNFn::GetAtt构造见 orchestrator.js。角色定制对象的 schemaname最长 64 字符、托管策略与权限边界必须是合法 ARN定义在 validators/schema.js。常用命令sls deploy # Deploy to AWS sls dev # Local development with hot reload sls invoke --agent myAgent -d Hello # Invoke a deployed agent sls logs --agent myAgent # Fetch agent logs sls package # Generate CloudFormation sls remove # Remove deployed resources插件通过生命周期钩子把这些命令串起来initialize时把ai配置同步到service.ai供其他插件使用before:package:initialize执行配置校验package:compileEvents到before:package:finalize之间的多个节点调用compileAgentCoreResources通过resourcesCompiled标志保证只编译一次before:deploy:deploy推送镜像after:deploy:deploy打印部署信息见 index.js。全局配置项默认标签Default Tags通过custom.agentCore.defaultTags给所有 AgentCore 资源统一打标custom: agentCore: defaultTags: Project: MyProject Environment: ${self:provider.stage}标签合并遵循资源级覆盖全局级的顺序合并与格式化为 CloudFormationTags数组的逻辑在 utils/tags.js 中实现。VPC 配置对支持vpc模式的资源统一给出网络参数network: mode: vpc subnets: - subnet-12345678 - subnet-87654321 securityGroups: - sg-12345678注意network.mode: vpc下subnets与securityGroups为必填项各类资源属性表中均已标注。命名约定不同资源的不同 AWS 命名规则为了满足 AWS 对不同 AgentCore 资源差异化的命名约束插件在 utils/naming.js 中维护了一套命名策略ResourcePatternSeparatorMaxRuntime, Memory, Browser, CodeInterp.[a-zA-Z][a-zA-Z0-9_]{0,47}_48Gateway, GatewayTarget^([0-9a-zA-Z][-]?){1,100}$-100WorkloadIdentity[A-Za-z0-9_.-]-255实际生成的 AWS 资源名遵循service_name_stage下划线连接、首字母必须是字母、截断到 48 字符与service-name-stage连字符连接、截断到 100 字符两套规则而 CloudFormation 逻辑 ID 则由 PascalCase 资源名加类型后缀构成例如music-agentRuntime→MusicDashagentRuntime。这解释了为什么配置里资源名随意包含-/_而最终产物总是合法资源。CloudFormation 输出开箱即用的跨栈引用插件会为每类资源自动生成标准命名的 CFN 输出并且 Runtime、Memory、Gateway、Browser、CodeInterpreter 的 ARN 输出会同时附带Export名称形如${service}-${stage}-${name}-RuntimeArn便于跨栈Fn::ImportValue引用{Name}RuntimeArn- Runtime ARN{Name}RuntimeId- Runtime ID{Name}MemoryArn- Memory ARN{Name}MemoryId- Memory ID{Name}GatewayArn- Gateway ARN{Name}GatewayUrl- Gateway URL{Name}BrowserArn- Browser ARN{Name}BrowserId- Browser ID{Name}CodeInterpreterArn- CodeInterpreter ARN{Name}CodeInterpreterId- CodeInterpreter ID额外值得一提的输出是每个 Runtime 都会生成一个InvocationUrl输出其值通过Fn::Sub拼装为https://bedrock-agentcore.${Region}.amazonaws.com/runtimes/${RuntimeArn}/invocations见 orchestrator.js可直接用于外部集成。支持的 AWS 区域AWS Bedrock AgentCore 仅在部分区域开放。部署前请以 AWS 官方文档的最新区域可用性为准配置里的provider.region需要落到 AgentCore 已开放的区域否则会在部署阶段报资源类型不可用。完整示例库插件自带覆盖 Python 与 JavaScriptLangGraph / Strands的完整可运行示例源码位于 examples 目录。Python 示例langgraph-basic-docker - Minimal LangGraph agent with Dockerlanggraph-basic-code - LangGraph agent with code deploymentlanggraph-gateway - LangGraph agent with custom Lambda tools via Gatewaylanggraph-multi-gateway - Multiple gateways with different authorizationlanggraph-memory - LangGraph agent with conversation persistencelanggraph-browser - LangGraph agent with browser automationlanggraph-browser-custom - Custom browser with session recordinglanggraph-code-interpreter - LangGraph agent with code executionlanggraph-code-interpreter-custom - Custom code interpreter with public networkstrands-browser - Strands Agents with browser automationJavaScript 示例langgraph-basic - LangGraph JS agent (no Dockerfile)langgraph-basic-dockerfile - Minimal LangGraph JS agent with Dockerfilelanggraph-browser - LangGraph JS agent with browser automationlanggraph-browser-custom - Custom browser with session recordinglanggraph-code-interpreter - LangGraph JS agent with code executionlanggraph-code-interpreter-custom - Custom code interpreter with public networklanggraph-gateway - LangGraph JS agent with Lambda tools via Gatewaylanggraph-memory - LangGraph JS agent with conversation persistencelanggraph-multi-gateway - Multiple gateways with different authorizationmcp-server - JavaScript MCP serverstrands-browser - Strands Agents JS with browser automation以 JS 侧的最小示例 langgraph-basic 为例它演示了不借助 Dockerfile、通过BedrockAgentCoreApp运行时入口构建 LangGraph 智能体的方式与 README 中无 Dockerfile 自动模式的配置一一对应。小结Bedrock AgentCore 插件把 AWS 上零散的 AI 运行时、记忆、工具、网关、浏览器与代码解释器收敛为一个ai声明块借助 Serverless Framework 既有的打包/编译/部署生命周期完成 Docker 构建推送、资源编译、最小权限 IAM 生成与可跨栈引用的 Output 输出。对开发者而言掌握ai.agents、ai.memory、ai.tools、ai.gateways、ai.browsers、ai.codeInterpreters这六个分区的字段语义与组合关系特别是默认 gateway 自动创建authorizer 默认 IAMmemory/gateway 引用自动注入环境变量这三个隐含行为就能用纯 YAML 快速搭建可复用的生产级 AI Agent 服务并通过仓库内覆盖 LangGraph/Strands 双技术栈的示例库直接对照落地。【免费下载链接】serverless⚡ Serverless Framework – Effortlessly build apps that auto-scale, incur zero costs when idle, and require minimal maintenance using AWS Lambda and other managed cloud services.项目地址: https://gitcode.com/GitHub_Trending/se/serverless创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考