Orchestrate Workflow with Temporal.io

implementationChallenge

Prompt Content

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`.

Try this prompt

Open the workspace to execute this prompt with free credits, or use your own API keys for unlimited usage.

Usage Tips

Copy the prompt and paste it into your preferred AI tool (Claude, ChatGPT, Gemini)

Customize placeholder values with your specific requirements and context

For best results, provide clear examples and test different variations