Back to prompt library
Orchestrate Workflow with Temporal.io
Linked challenge: AI Market Trend & Strategy Advisor
Prompt source
implementation6 lines2 sectionsNo variables4 checklist items
Design a Temporal.io workflow in TypeScript that orchestrates the agent's tasks. This workflow should: 1. Periodically (e.g., daily) trigger the `fetchMarketData` tool for 'memory_chips' and 'ai_tools'. 2. Pass the fetched data to the Mastra AI agent for analysis using Qwen 3. 3. Store the generated analysis and recommendations in Supabase. 4. Handle potential API failures with retries. Provide the `workflow.ts` and `activities.ts` code, showing how you call the Mastra agent and interact with Supabase within a Temporal workflow. Assume `SupabaseClient` is available in `activities.ts`.