- 概述
- UiPath 生成式 AI 活动
- Act! 365
- ActiveCampaign
- Adobe Acrobat Sign
- Adobe PDF 服务
- Amazon Bedrock
- Amazon Connect
- Amazon Polly
- 亚马逊 SES
- Amazon Transcribe
- Anthropic Claude
- Asana
- AWeber
- Azure AI 文档智能
- Azure Defender for Cloud
- Azure Maps
- BambooHR
- Box
- Brevo
- Calendly
- Campaign Monitor
- Cisco Webex Teams
- Citrix ShareFile
- 清除位
- Confluence Cloud
- Constant Contact
- Coupa
- CrewAI – 预览版
- Customer.io
- Database Hub
- Databricks智能体
- Datadog
- 深度查找
- Deputy
- Discord - 预览
- DocuSign
- 水滴
- Dropbox
- Dropbox Business
- Egnyte
- Eventbrite
- 汇率
- Expensify
- Facebook
- Freshbooks
- Freshdesk
- Freshsales
- Freshservice
- 获取响应
- GitHub
- Google Maps
- Google 语音转文本
- Google 文本转语音
- Google Vertex
- Google Vision
- GoToWebinar
- Greenhouse
- Hootsuite
- HTTP Webhook
- HubSpot CRM
- HubSpot Marketing
- Icertis
- iContact
- Insightly CRM
- Intercom
- Jina.ai
- Jira
- Keap
- Klaviyo
- LinkedIn
- Mailchimp
- Mailjet
- MailerLite
- Mailgun
- Marketo
- MCP
- Microsoft Azure OpenAI
- Microsoft Azure AI Foundry
- Microsoft Azure Sentinel
- Microsoft Dynamics CRM
- Microsoft Power Automate
- Microsoft Sentiment
- Microsoft Sentinel Threat Intelligence
- Microsoft Teams
- Microsoft Translator
- Microsoft Vision
- Miro
- NVIDIA NIM
- 奥克塔
- OpenAI
- 符合 OpenAI V1 的 LLM
- Oracle Eloqua
- Oracle NetSuite
- PagerDuty
- Paypal
- PDFMonkey
- Perplexity
- Pinecone
- Pipedrive
- QuickBooks Online
- Quip
- Salesforce
- Salesforce Marketing Cloud
- SAP BAPI
- SAP Cloud for Customer
- SAP Concur
- SAP OData
- SendGrid
- ServiceNow
- Shopify
- Slack
- SmartRecruiters
- Smartsheet
- Snowflake
- Snowflake Cortex
- Stripe
- Sugar Enterprise
- Sugar Professional
- Sugar Sell
- Sugar Serve
- 探戈卡
- Todoist
- Trello
- Twilio
- UiPath Apps - Preview
- UiPath Orchestrator
- UiPath Test Manager
- IBM WatsonX
- WhatsApp Business
- WOO COMMERCE
- 可行
- Workday
- Workday REST
- X(以前称为 Twitter)
- Xero
- Youtube
- Zendesk
- Zoho Campaigns
- Zoho Desk
- Zoho Mail
- 缩放
- Zoom 信息
使用 Snowflake 中预先创建的智能体对象,在 Maestro 智能体流程中与 Snowflake Cortex 智能体交互。
描述
此活动支持使用 Snowflake Cortex 智能体作为 Maestro 编排的自动化流程的参与者。
创建 Snowflake 智能体
Snowflake 提供了用于创建 Cortex 智能体的无代码体验。保存后,即可在 Maestro 中使用。无代码体验包括测试提示和评估智能体输出的功能。
Cortex 智能体将以在 Snowflake 仪表板中回复用户提示的方式回复 Maestro。在大多数 Maestro 场景中,您需要提示智能体以 JSON 结构的形式生成输出。例如{"sku1": "9735A45", "sku2": "1735A50"}。
如何使用活动
要在 Maestro 智能体流程中使用此活动,请按照以下步骤操作:
-
在画布中添加服务任务元素,然后打开任务的“属性”面板。
-
将服务任务命名为
Snowflake Hello World。 -
在实施部分的操作下拉列表中,选择启动并等待外部智能体。
-
选择“Snowflake Cortex”连接器。
-
选择现有连接或新建连接。有关更多信息,请参阅Snowflake Cortex 身份验证。
-
在“活动”中,选择“Interact Agent” 。
-
从“数据库”中,选择一个数据库,例如
SNOWFLAKE_INTELLIGENCE。 -
从“架构”中选择一个架构,例如
AGENTS。 -
从“智能体名称”中,选择之前在 Snowflake 中创建的智能体。
-
在“提示词” 中,输入“您可以执行什么操作?”。确保在提示词中添加引号。
-
将开始事件连接到画布中的服务任务,然后将服务任务连接到结束事件节点。
-
选择“调试”以运行此流程。成功运行后,请查看全局变量并查找来自来源“Snowflake Hello World”的{:} 响应。记下回复的结构。例如,以下是智能体对“你可以做什么?”提示的响应:
{ "type": "text", "text": "\nI can help you analyze and optimize your manufacturing, inventory, order fulfillment, and sales forecasting processes. Here’s what I can do:\n\n- Query and analyze your inventory, orders, production forecasts, and sales forecasts using advanced SQL queries.\n- Answer questions about current inventory levels, order statuses, and customer orders.\n- Help you determine if current or future orders can be fulfilled based on available or forecasted inventory.\n- Provide insights into upcoming production and expected sales for specific products or SKUs.\n- Generate tables and visualizations (bar, line, and pie charts) to help you understand trends and patterns in your data.\n- Assist with business analytics, SaaS metrics, and research methodology for data-driven decision-making.\n\nYou don’t need to know SQL—just ask your business questions, and I’ll use the appropriate tools to get you answers!\n" }{ "type": "text", "text": "\nI can help you analyze and optimize your manufacturing, inventory, order fulfillment, and sales forecasting processes. Here’s what I can do:\n\n- Query and analyze your inventory, orders, production forecasts, and sales forecasts using advanced SQL queries.\n- Answer questions about current inventory levels, order statuses, and customer orders.\n- Help you determine if current or future orders can be fulfilled based on available or forecasted inventory.\n- Provide insights into upcoming production and expected sales for specific products or SKUs.\n- Generate tables and visualizations (bar, line, and pie charts) to help you understand trends and patterns in your data.\n- Assist with business analytics, SaaS metrics, and research methodology for data-driven decision-making.\n\nYou don’t need to know SQL—just ask your business questions, and I’ll use the appropriate tools to get you answers!\n" }
智能体的输出必须分配给流程变量,以便影响 Maestro 流程的进度,例如,根据布尔值评估做出决策,或使用分类任务的答案。
- 在设计模式下,从设计画布中选择智能体。
- 选择( “属性” >“属性” )。
- 在“输出”下,选择“新增” ,然后添加一个名为agent_reponse 的字符串类型变量。
- 对于“值” ,选择“Snowflake Hello World” > “响应” > “智能体操作文本(字符串)” 。这表示回复的文本组件。
在实践中,指定您选择的智能体的结构化输出,然后使用表达式编辑器在 Maestro 中评估输出,以按照流程所需的类型提取所需的输出的特定部分。
故障排除和调整
除了建立连接外,您还应该在 Snowflake 工作区和 Maestro 中测试提示词。这可确保您获得所需的输出,这些输出最适合 Maestro 使用,分配给变量,并传递给流程中的其他参与者。
我们建议将详细提示保留在 Snowflake 中智能体的系统提示中。Maestro 在运行时向智能体提供的用户提示应该简明扼要。其作用主要是指示智能体执行特定任务并生成预期的一致输出所需的相关变量。
针对人类的输出(例如升级原因)可以轻松地作为自然文本传递给人类。API/机器人操作的预期输出必须经过严格撰写。以下是智能体生成特定输出的用户提示示例。使用 Studio 中的 C# 表达式编辑器根据需要添加变量。
"What is the quantity on inventory of Order ID " + vars.orderId_1 + "respond only with a JSON object with the quantity in the key Order_Quantity. No explanations, only JSON"
"What is the quantity on inventory of Order ID " + vars.orderId_1 + "respond only with a JSON object with the quantity in the key Order_Quantity. No explanations, only JSON"
智能体将回复:
{"Order_Quantity":"100"}
{"Order_Quantity":"100"}
类型处理
然后,您可以使用js:JSON.parse(variable of type string)函数将类型为string智能体响应转换为JSON 。请特别注意您向智能体发出的请求和实际响应中所包含的类型。即使响应的类型看起来像JSON ,它实际上可能是string类型。