《【新品发布】使用 Strands Agents SDK for TypeScript 构建生产级 AI 代理.pdf》由会员分享,可在线阅读,更多相关《【新品发布】使用 Strands Agents SDK for TypeScript 构建生产级 AI 代理.pdf(37页珍藏版)》请在三个皮匠报告上搜索。
1、 2025,Amazon Web Services,Inc.or its affiliates.All rights reserved.2025,Amazon Web Services,Inc.or its affiliates.All rights reserved.2025,Amazon Web Services,Inc.or its affiliates.All rights reserved.Ryan ColemanHe/HimPrincipal Product ManagerAmazon Web ServicesBuilding production AI agents with t
2、he new Strands Agents SDK for TypeScriptA I M 3 3 3 1Nicholas CleggHe/HimSenior Software EngineerAmazon Web Services 2025,Amazon Web Services,Inc.or its affiliates.All rights reserved.STRANDS AGENTS BUILD PRODUCTION-READY,MULTI-AGENT SYSTEMS IN A FEW LINES OF CODEfrom strands import Agentfrom strand
3、s_tools import http_requestagent=Agent(tools=http_request)agent(Where is the“+“International Space Station?)2025,Amazon Web Services,Inc.or its affiliates.All rights reserved.Overview of Strands&SDK for TypescriptThe Model Driven ApproachWhats new with StrandsHow we built the Typescript SDK with Str
4、andsQ&AAgenda 2025,Amazon Web Services,Inc.or its affiliates.All rights reserved.2025,Amazon Web Services,Inc.or its affiliates.All rights reserved.Strands Agents SDK for TypescriptBuild model-driven agents that run tools in a loop to solve a goal using just a few lines of Typescript.AVAILABLE IN PR
5、EVIEW TODAYNEW 2025,Amazon Web Services,Inc.or its affiliates.All rights reserved.import Agent from strands-agents/sdkimport httpRequest from strands-agents/vended_tools/Invoke the agent and get responseconst agent=new Agent(tools:httpRequest)const result=await agent.invoke(What is the weather in La
6、s Vegas?)console.log(result.lastMessage)2025,Amazon Web Services,Inc.or its affiliates.All rights reserved.S T R A N D S A G E N T SModel-driven agents run tools in a loop to solve a goalPROMPTRESULTDefine a task,let the model reason,plan,and select toolsAgentic loopAgentMODELTOOLSInvoke modelGet re