|
998 | 998 | }, |
999 | 999 | { |
1000 | 1000 | "name": "agentic-chat.ts", |
1001 | | - "content": "import { Agent } from \"@mastra/core/agent\";\nimport { Memory } from \"@mastra/memory\";\nimport { LibSQLStore } from \"@mastra/libsql\";\nimport { weatherTool } from \"../tools/weather-tool\";\n\nexport const agenticChatAgent = new Agent({\n id: \"agentic_chat\",\n name: \"Agentic Chat\",\n instructions: `\n You are a helpful weather assistant that provides accurate weather information.\n\n Your primary function is to help users get weather details for specific locations. When responding:\n - Always ask for a location if none is provided\n - If the location name isn’t in English, please translate it\n - If giving a location with multiple parts (e.g. \"New York, NY\"), use the most relevant part (e.g. \"New York\")\n - Include relevant details like humidity, wind conditions, and precipitation\n - Keep responses concise but informative\n\n Use the weatherTool to fetch current weather data.\n`,\n model: \"openai/gpt-4o-mini\",\n tools: { get_weather: weatherTool },\n memory: new Memory({\n storage: new LibSQLStore({\n id: 'agentic-chat-memory',\n url: \"file:../mastra.db\", // path is relative to the .mastra/output directory\n }),\n }),\n});\n", |
| 1001 | + "content": "import { Agent } from \"@mastra/core/agent\";\nimport { Memory } from \"@mastra/memory\";\nimport { LibSQLStore } from \"@mastra/libsql\";\nimport { weatherTool } from \"../tools/weather-tool\";\n\nexport const agenticChatAgent = new Agent({\n id: \"agentic_chat\",\n name: \"Agentic Chat\",\n instructions: `\n You are a helpful weather assistant that provides accurate weather information.\n\n Your primary function is to help users get weather details for specific locations. When responding:\n - Always ask for a location if none is provided\n - If the location name isn’t in English, please translate it\n - If giving a location with multiple parts (e.g. \"New York, NY\"), use the most relevant part (e.g. \"New York\")\n - Include relevant details like humidity, wind conditions, and precipitation\n - Keep responses concise but informative\n\n Use the weatherTool to fetch current weather data.\n`,\n model: \"openai/gpt-4.1-mini\",\n tools: { get_weather: weatherTool },\n memory: new Memory({\n storage: new LibSQLStore({\n id: 'agentic-chat-memory',\n url: \"file:../mastra.db\", // path is relative to the .mastra/output directory\n }),\n }),\n});\n", |
1002 | 1002 | "language": "ts", |
1003 | 1003 | "type": "file" |
1004 | 1004 | } |
|
1038 | 1038 | }, |
1039 | 1039 | { |
1040 | 1040 | "name": "backend-tool-rendering.ts", |
1041 | | - "content": "import { Agent } from \"@mastra/core/agent\";\nimport { Memory } from \"@mastra/memory\";\nimport { LibSQLStore } from \"@mastra/libsql\";\nimport { weatherTool } from \"../tools/weather-tool\";\n\nexport const backendToolRenderingAgent = new Agent({\n id: \"backend_tool_rendering\",\n name: \"Backend Tool Rendering\",\n instructions: `\n You are a helpful weather assistant that provides accurate weather information.\n\n Your primary function is to help users get weather details for specific locations. When responding:\n - Always ask for a location if none is provided\n - If the location name isn’t in English, please translate it\n - If giving a location with multiple parts (e.g. \"New York, NY\"), use the most relevant part (e.g. \"New York\")\n - Include relevant details like humidity, wind conditions, and precipitation\n - Keep responses concise but informative\n\n Use the get_weather tool to fetch current weather data.\n`,\n model: \"openai/gpt-4o-mini\",\n tools: { get_weather: weatherTool },\n memory: new Memory({\n storage: new LibSQLStore({\n id: 'backend-tool-rendering-memory',\n url: \"file:../mastra.db\", // path is relative to the .mastra/output directory\n }),\n }),\n});\n", |
| 1041 | + "content": "import { Agent } from \"@mastra/core/agent\";\nimport { Memory } from \"@mastra/memory\";\nimport { LibSQLStore } from \"@mastra/libsql\";\nimport { weatherTool } from \"../tools/weather-tool\";\n\nexport const backendToolRenderingAgent = new Agent({\n id: \"backend_tool_rendering\",\n name: \"Backend Tool Rendering\",\n instructions: `\n You are a helpful weather assistant that provides accurate weather information.\n\n Your primary function is to help users get weather details for specific locations. When responding:\n - Always ask for a location if none is provided\n - If the location name isn’t in English, please translate it\n - If giving a location with multiple parts (e.g. \"New York, NY\"), use the most relevant part (e.g. \"New York\")\n - Include relevant details like humidity, wind conditions, and precipitation\n - Keep responses concise but informative\n\n Use the get_weather tool to fetch current weather data.\n`,\n model: \"openai/gpt-4.1-mini\",\n tools: { get_weather: weatherTool },\n memory: new Memory({\n storage: new LibSQLStore({\n id: 'backend-tool-rendering-memory',\n url: \"file:../mastra.db\", // path is relative to the .mastra/output directory\n }),\n }),\n});\n", |
1042 | 1042 | "language": "ts", |
1043 | 1043 | "type": "file" |
1044 | 1044 | } |
|
1058 | 1058 | }, |
1059 | 1059 | { |
1060 | 1060 | "name": "human-in-the-loop.ts", |
1061 | | - "content": "import { Agent } from \"@mastra/core/agent\";\nimport { Memory } from \"@mastra/memory\";\nimport { LibSQLStore } from \"@mastra/libsql\";\n\nexport const humanInTheLoopAgent = new Agent({\n id: 'human_in_the_loop',\n name: \"Human in the Loop\",\n instructions: `\n You are a helpful task planning assistant that helps users break down tasks into actionable steps.\n\n When planning tasks use tools only, without any other messages.\n IMPORTANT:\n - Use the \\`generate_task_steps\\` tool to display the suggested steps to the user\n - Do not call the \\`generate_task_steps\\` twice in a row, ever.\n - Never repeat the plan, or send a message detailing steps\n - If accepted, confirm the creation of the plan and the number of selected (enabled) steps only\n - If not accepted, ask the user for more information, DO NOT use the \\`generate_task_steps\\` tool again\n\n When responding to user requests:\n - Always break down the task into clear, actionable steps\n - Use imperative form for each step (e.g., \"Book flight\", \"Pack luggage\", \"Check passport\")\n - Keep steps concise but descriptive\n - Make sure steps are in logical order\n`,\n model: \"openai/gpt-4o-mini\",\n memory: new Memory({\n storage: new LibSQLStore({\n id: 'human-in-the-loop-memory',\n url: \"file:../mastra.db\", // path is relative to the .mastra/output directory\n }),\n }),\n});\n", |
| 1061 | + "content": "import { Agent } from \"@mastra/core/agent\";\nimport { Memory } from \"@mastra/memory\";\nimport { LibSQLStore } from \"@mastra/libsql\";\n\nexport const humanInTheLoopAgent = new Agent({\n id: 'human_in_the_loop',\n name: \"Human in the Loop\",\n instructions: `\n You are a helpful task planning assistant that helps users break down tasks into actionable steps.\n\n When planning tasks use tools only, without any other messages.\n IMPORTANT:\n - Use the \\`generate_task_steps\\` tool to display the suggested steps to the user\n - Do not call the \\`generate_task_steps\\` twice in a row, ever.\n - Never repeat the plan, or send a message detailing steps\n - If accepted, confirm the creation of the plan and the number of selected (enabled) steps only\n - If not accepted, ask the user for more information, DO NOT use the \\`generate_task_steps\\` tool again\n\n When responding to user requests:\n - Always break down the task into clear, actionable steps\n - Use imperative form for each step (e.g., \"Book flight\", \"Pack luggage\", \"Check passport\")\n - Keep steps concise but descriptive\n - Make sure steps are in logical order\n`,\n model: \"openai/gpt-4.1-mini\",\n memory: new Memory({\n storage: new LibSQLStore({\n id: 'human-in-the-loop-memory',\n url: \"file:../mastra.db\", // path is relative to the .mastra/output directory\n }),\n }),\n});\n", |
1062 | 1062 | "language": "ts", |
1063 | 1063 | "type": "file" |
1064 | 1064 | } |
|
1084 | 1084 | }, |
1085 | 1085 | { |
1086 | 1086 | "name": "tool-based-generative-ui.ts", |
1087 | | - "content": "import { Agent } from \"@mastra/core/agent\";\nimport { Memory } from \"@mastra/memory\";\nimport { LibSQLStore } from \"@mastra/libsql\";\n\nexport const toolBasedGenerativeUIAgent = new Agent({\n id: \"tool_based_generative_ui\",\n name: \"Tool Based Generative UI\",\n instructions: `\n You are a helpful haiku assistant that provides the user with a haiku.\n`,\n model: \"openai/gpt-4o-mini\",\n memory: new Memory({\n storage: new LibSQLStore({\n id: 'tool-based-generative-ui-memory',\n url: \"file:../mastra.db\", // path is relative to the .mastra/output directory\n }),\n }),\n});\n", |
| 1087 | + "content": "import { Agent } from \"@mastra/core/agent\";\nimport { Memory } from \"@mastra/memory\";\nimport { LibSQLStore } from \"@mastra/libsql\";\n\nexport const toolBasedGenerativeUIAgent = new Agent({\n id: \"tool_based_generative_ui\",\n name: \"Tool Based Generative UI\",\n instructions: `\n You are a helpful haiku assistant that provides the user with a haiku.\n`,\n model: \"openai/gpt-4.1-mini\",\n memory: new Memory({\n storage: new LibSQLStore({\n id: 'tool-based-generative-ui-memory',\n url: \"file:../mastra.db\", // path is relative to the .mastra/output directory\n }),\n }),\n});\n", |
1088 | 1088 | "language": "ts", |
1089 | 1089 | "type": "file" |
1090 | 1090 | } |
|
1144 | 1144 | }, |
1145 | 1145 | { |
1146 | 1146 | "name": "backend-tool-rendering.ts", |
1147 | | - "content": "import { Agent } from \"@mastra/core/agent\";\nimport { Memory } from \"@mastra/memory\";\nimport { weatherTool } from \"../tools\";\nimport { getStorage } from \"../storage\";\n\nexport const backendToolRenderingAgent = new Agent({\n id: 'backend_tool_rendering',\n name: \"backend_tool_rendering\",\n instructions: `\n You are a helpful weather assistant that provides accurate weather information.\n\n Your primary function is to help users get weather details for specific locations. When responding:\n - Always ask for a location if none is provided\n - If the location name isn't in English, please translate it\n - If giving a location with multiple parts (e.g. \"New York, NY\"), use the most relevant part (e.g. \"New York\")\n - Include relevant details like humidity, wind conditions, and precipitation\n - Keep responses concise but informative\n\n Use the weatherTool to fetch current weather data.\n `,\n model: \"openai/gpt-4o-mini\",\n tools: { get_weather: weatherTool },\n memory: new Memory({\n storage: getStorage(),\n }),\n});\n", |
| 1147 | + "content": "import { Agent } from \"@mastra/core/agent\";\nimport { Memory } from \"@mastra/memory\";\nimport { weatherTool } from \"../tools\";\nimport { getStorage } from \"../storage\";\n\nexport const backendToolRenderingAgent = new Agent({\n id: 'backend_tool_rendering',\n name: \"backend_tool_rendering\",\n instructions: `\n You are a helpful weather assistant that provides accurate weather information.\n\n Your primary function is to help users get weather details for specific locations. When responding:\n - Always ask for a location if none is provided\n - If the location name isn't in English, please translate it\n - If giving a location with multiple parts (e.g. \"New York, NY\"), use the most relevant part (e.g. \"New York\")\n - Include relevant details like humidity, wind conditions, and precipitation\n - Keep responses concise but informative\n\n Use the weatherTool to fetch current weather data.\n `,\n model: \"openai/gpt-4.1-mini\",\n tools: { get_weather: weatherTool },\n memory: new Memory({\n storage: getStorage(),\n }),\n});\n", |
1148 | 1148 | "language": "ts", |
1149 | 1149 | "type": "file" |
1150 | 1150 | } |
|
1164 | 1164 | }, |
1165 | 1165 | { |
1166 | 1166 | "name": "human-in-the-loop.ts", |
1167 | | - "content": "import { Agent } from \"@mastra/core/agent\";\nimport { Memory } from \"@mastra/memory\";\nimport { getStorage } from \"../storage\";\n\nexport const humanInTheLoopAgent = new Agent({\n id: 'human_in_the_loop',\n name: \"human_in_the_loop\",\n instructions: `\n You are a helpful task planning assistant that helps users break down tasks into actionable steps.\n\n When planning tasks use tools only, without any other messages.\n IMPORTANT:\n - Use the \\`generate_task_steps\\` tool to display the suggested steps to the user\n - Do not call the \\`generate_task_steps\\` twice in a row, ever.\n - Never repeat the plan, or send a message detailing steps\n - If accepted, confirm the creation of the plan and the number of selected (enabled) steps only\n - If not accepted, ask the user for more information, DO NOT use the \\`generate_task_steps\\` tool again\n\n When responding to user requests:\n - Always break down the task into clear, actionable steps\n - Use imperative form for each step (e.g., \"Book flight\", \"Pack luggage\", \"Check passport\")\n - Keep steps concise but descriptive\n - Make sure steps are in logical order\n `,\n model: \"openai/gpt-4o-mini\",\n memory: new Memory({\n storage: getStorage(),\n }),\n});\n", |
| 1167 | + "content": "import { Agent } from \"@mastra/core/agent\";\nimport { Memory } from \"@mastra/memory\";\nimport { getStorage } from \"../storage\";\n\nexport const humanInTheLoopAgent = new Agent({\n id: 'human_in_the_loop',\n name: \"human_in_the_loop\",\n instructions: `\n You are a helpful task planning assistant that helps users break down tasks into actionable steps.\n\n When planning tasks use tools only, without any other messages.\n IMPORTANT:\n - Use the \\`generate_task_steps\\` tool to display the suggested steps to the user\n - Do not call the \\`generate_task_steps\\` twice in a row, ever.\n - Never repeat the plan, or send a message detailing steps\n - If accepted, confirm the creation of the plan and the number of selected (enabled) steps only\n - If not accepted, ask the user for more information, DO NOT use the \\`generate_task_steps\\` tool again\n\n When responding to user requests:\n - Always break down the task into clear, actionable steps\n - Use imperative form for each step (e.g., \"Book flight\", \"Pack luggage\", \"Check passport\")\n - Keep steps concise but descriptive\n - Make sure steps are in logical order\n `,\n model: \"openai/gpt-4.1-mini\",\n memory: new Memory({\n storage: getStorage(),\n }),\n});\n", |
1168 | 1168 | "language": "ts", |
1169 | 1169 | "type": "file" |
1170 | 1170 | } |
|
0 commit comments