在Amazon Sagemaker AI和Amazon Bedrock AgentCore上与OpenAi GPT OSS建立代理工作流程

在这篇文章中,我们展示了如何将GPT-OSS-20B模型部署到SageMaker托管端点,并演示了与Langgraph的实用库存分析仪代理助理示例,Langgraph是一个强大的基于图形的框架,可处理状态管理,协调的工作流程和持久的内存系统。

来源:亚马逊云科技 _机器学习
OpenAI已发布了两种开放式型号,GPT-OSS-1220B(1,170亿参数)和GPT-OSS-20B(210亿个参数),均使用专家(MOE)设计和128K上下文窗口构建。根据人工分析基准,这些模型是领先的开源模型,并且在推理和代理工作流程上表现出色。借助Amazon Sagemaker AI,您可以通过完全管理的服务对模型进行微调或自定义模型,并选择框架。 Amazon SageMaker推论使您可以灵活地携带自己的推理代码和框架,而不必构建和维护自己的群集。尽管大型语言模型(LLMS)在理解语言和生成内容方面表现出色,而是建立真实的代理应用程序需要复杂的工作流程管理,工具呼叫功能和上下文管理。 Multi-agent architectures address these challenges by breaking down complex systems into specialized components, but they introduce new complexities in agent coordination, memory management, and workflow orchestration.In this post, we show how to deploy gpt-oss-20b model to SageMaker managed endpoints and demonstrate a practical stock analyzer agent assistant example with LangGraph, a powerful graph-based framework that handles state management, coordinated workflows, and persistent memory系统。 We will then deploy our agents to Amazon Bedrock AgentCore, a unified orchestration layer that abstracts away infrastructure and allows you to securely deploy and operate AI agents at scale.Solution overviewIn this solution, we build an agentic stock analyzer with the following key components:The GPT OSS 20B model deployed to a SageMaker endpoint using vLLM, an open source serving framework for LLMsLangGraph to build一个多代理编排框架框架板上的底座代理部署代理商以下图说明了解决方案体系结构。此架构说明了在Amazon Bedroc