Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,41 +32,45 @@
{
"schema": 4,
"trigger_type": "output",
"type": "ask",
"entity": "ask",
"action": "ask",
"type": "ai",
"entity": "agent",
"action": "create",
"name": "Ask",
"key": "ask",
"operation_id": "post-ask",
"operation_id": "post-agent",
"metadata": {
"api_endpoint": "post \/ask",
"api_endpoint": "post /agent",
"body": {
"automations": ["mcp/helpscout/retrieve_conversations"],
"automations": [
"mcp/helpscout/retrieve_conversations"
],
"content": "Find interesting trends in my support tickets over the last week. Cite the link from each ticket that matches the trends."
}
},
"local_fields": [],
"selected_fields": [],
"on_error": "default",
"weight": 0
"weight": 0,
"version": "v3"
},
{
"schema": 4,
"trigger_type": "output",
"type": "ask",
"entity": "ask",
"type": "ai",
"entity": "agent",
"action": "skill",
"name": "Skill",
"key": "ask_3",
"operation_id": "post-ask-skill",
"operation_id": "post-agent-skill",
"metadata": {
"api_endpoint": "post \/ask\/skill",
"api_endpoint": "post /agent/skill",
"trigger_manager_key": "ask",
"trigger_parent_key": "ask"
},
"selected_fields": [],
"on_error": "default",
"weight": 1
"weight": 1,
"version": "v3"
},
{
"schema": 5,
Expand All @@ -75,9 +79,9 @@
"name": "Send Email",
"version": "v2",
"key": "email",
"operation_id": "\/send-email",
"operation_id": "/send-email",
"metadata": {
"api_endpoint": "post \/send-email",
"api_endpoint": "post /send-email",
"body": {
"to": "{{ template | label: 'Email address', description: 'Where should we send the weekly report?' }}",
"subject": "Last Week's Help Scout Conversations",
Expand Down
32 changes: 18 additions & 14 deletions ask/analyze_shopify_orders/ask_shopify_orders/mesa.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,41 +30,45 @@
{
"schema": 4,
"trigger_type": "output",
"type": "ask",
"entity": "ask",
"action": "ask",
"type": "ai",
"entity": "agent",
"action": "create",
"name": "Ask",
"key": "ask",
"operation_id": "post-ask",
"operation_id": "post-agent",
"metadata": {
"api_endpoint": "post \/ask",
"api_endpoint": "post /agent",
"body": {
"automations": ["mcp/shopify/retrieve_orders"],
"automations": [
"mcp/shopify/retrieve_orders"
],
"content": "Get all of my Shopify orders placed in the last 2 years and generate a summary of the sales formatted as HTML to use in an email. Include:\n\n- Table of top sales including links to orders and customers\n- Table of top selling products\n- Number and gross total of sales\n"
}
},
"local_fields": [],
"selected_fields": [],
"on_error": "default",
"weight": 0
"weight": 0,
"version": "v3"
},
{
"schema": 4,
"trigger_type": "output",
"type": "ask",
"entity": "ask",
"type": "ai",
"entity": "agent",
"action": "skill",
"name": "Skill",
"key": "ask_1",
"operation_id": "post-ask-skill",
"operation_id": "post-agent-skill",
"metadata": {
"api_endpoint": "post \/ask\/skill",
"api_endpoint": "post /agent/skill",
"trigger_manager_key": "ask",
"trigger_parent_key": "ask"
},
"selected_fields": [],
"on_error": "default",
"weight": 1
"weight": 1,
"version": "v3"
},
{
"schema": 5,
Expand All @@ -73,9 +77,9 @@
"name": "Send Email",
"version": "v2",
"key": "email",
"operation_id": "\/send-email",
"operation_id": "/send-email",
"metadata": {
"api_endpoint": "post \/send-email",
"api_endpoint": "post /send-email",
"body": {
"to": "{{ template | label: 'Email address', description: 'Where should we send the weekly report?' }}",
"subject": "Summary of Shopify orders last week",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,18 @@
{
"schema": 4,
"trigger_type": "output",
"type": "ask",
"entity": "ask",
"action": "ask",
"type": "ai",
"entity": "agent",
"action": "create",
"name": "Ask",
"key": "ask",
"operation_id": "post-ask",
"operation_id": "post-agent",
"metadata": {
"api_endpoint": "post /ask",
"api_endpoint": "post /agent",
"body": {
"automations": ["mcp/zendesk/get_support_tickets"],
"automations": [
"mcp/zendesk/get_support_tickets"
],
"content": "Each week, review all Zendesk support conversations from the past 7 days. \nAt the top of your summary, list the date range of the tickets you are reviewing.\n\nSummarize the top 2-3 issues customers faced or notable trends based on the actual content of customer messages — what users are trying to do, where they are confused, or what they are asking for help with. \n\nFor each trend: \n- Describe the specific issue or user request in plain, customer-friendly terms. \n- Estimate how many tickets show this trend. \n- Be specific (e.g., \"confusion about adding a delay step after order fulfillment\"), not general (e.g., \"workflow questions\"). \n- Skip ticket metadata like submission method or timestamps — focus only on user intent and the problem content. \n\nIMPORTANT: \n- Provide **Zendesk conversation links** that work for internal review. These should look like: \n `https://[YOUR_SUBDOMAIN].zendesk.com/agent/tickets/[TICKET_NUMBER]` \n- Avoid API or JSON export links that require tokens or extra steps to access. \n\nFinally, include 2-3 **practical recommendations** for the product team based on the trends you observed. These should be actionable ideas that could help reduce support volume or improve the user experience.",
"instructions": "You do not have the ability to ask the user more questions. Make assumptions where possible. If you can not determine a value, throw an error and include the missing parameter(s) in the message. Prefix any message with an error with `ERROR`. For emails return HTML with no wrapping."
}
Expand All @@ -54,26 +56,28 @@
"body.instructions"
],
"on_error": "default",
"weight": 0
"weight": 0,
"version": "v3"
},
{
"schema": 4,
"trigger_type": "output",
"type": "ask",
"entity": "ask",
"type": "ai",
"entity": "agent",
"action": "skill",
"name": "Skill",
"key": "ask_1",
"operation_id": "post-ask-skill",
"operation_id": "post-agent-skill",
"metadata": {
"api_endpoint": "post /ask/skill",
"api_endpoint": "post /agent/skill",
"trigger_manager_key": "ask",
"trigger_parent_key": "ask"
},
"local_fields": [],
"selected_fields": [],
"on_error": "default",
"weight": 1
"weight": 1,
"version": "v3"
},
{
"schema": 5,
Expand All @@ -92,10 +96,14 @@
}
},
"local_fields": [],
"selected_fields": ["body", "body.subject", "body.message"],
"selected_fields": [
"body",
"body.subject",
"body.message"
],
"on_error": "default",
"weight": 2
}
]
}
}
}
53 changes: 53 additions & 0 deletions bin/migrations/05-ask-v3.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
import fs from 'fs';

export default (res, json) => {
// ---
// @todo: In this future this should be split out into its own file in migrations/
['inputs', 'outputs'].forEach(async (key) => {
if (!json.config[key]) {
return;
}

json.config[key].forEach(async (trigger, i) => {
let update = false;

if (trigger.type === 'ask') {
if (trigger.operation_id === 'post-ask') {
trigger.type = 'ai';
trigger.entity = 'agent';
trigger.action = 'create';
trigger.operation_id = 'post-agent';
trigger.metadata.api_endpoint = 'post /agent';
trigger.version = 'v3';
}
if (trigger.operation_id === 'post-ask-skill') {
trigger.type = 'ai';
trigger.entity = 'agent';
trigger.action = 'skill';
trigger.operation_id = 'post-agent-skill';
trigger.metadata.api_endpoint = 'post /agent/skill';
trigger.version = 'v3';
}
update = true;
}

if (trigger.type === 'skill') {
trigger.type = 'ai';
trigger.entity = 'skill';
trigger.action = 'skill';
trigger.operation_id = 'post-skill';
trigger.metadata.api_endpoint = 'post /skill';
trigger.version = 'v3';
update = true;
}

if (update) {
fs.writeFileSync(res, JSON.stringify(json, null, ' '));
console.log(`SAVING: ${res}`);
}
});
});
// ---
};

let connectors = {};
Loading