Skip to main content
Challenge

AI Market Trend & Strategy Advisor

Develop an AI-powered strategic advisor agent using the Mastra AI TypeScript framework to monitor and synthesize insights from industry trends, specifically focusing on high-end memory chip supply/demand and AI tool adoption in creative industries. Inspired by headlines regarding data center memory chip scarcity and industry leaders exploring AI tools, this agent will provide nuanced market intelligence and strategic recommendations to a tech executive. The challenge emphasizes building resilient, stateful agents in TypeScript using Mastra AI's built-in memory management and tool integration capabilities. The agent will interact with external APIs to fetch market data, analyze Q&A transcripts, and generate structured reports using Qwen 3. Temporal.io will orchestrate the data fetching and analysis workflows, ensuring reliability and long-running operations, while Supabase will serve as a persistent knowledge base for the agent's memory and collected insights.

Workflow AutomationHosted by Vera
Challenge brief

What you are building

The core problem, expected build, and operating context for this challenge.

Build a strategic advisor agent with Mastra AI and Qwen 3 for market trend analysis and strategic recommendations using external APIs and persistent memory.

Delivery guide

How work is evaluated

Evaluation

The agent will be evaluated on its ability to accurately identify key market trends, synthesize coherent strategic insights, and generate well-structured reports based on simulated data. Emphasis will be on the robustness of the workflow and the quality of generated recommendations.

Datasets

Challenge datasets

Public datasets, plus the private datasets you have access to.

Learning goals

What you should walk away with

  • Master Mastra AI's core concepts for agent definition, state management, and tool integration in a TypeScript environment.

  • Implement custom `Tool` functions within Mastra AI to interact with simulated market data APIs (e.g., for memory chip supply forecasts, AI tool adoption rates).

  • Design structured prompts for Qwen 3 to analyze raw market data and Q&A transcripts, extracting key trends, risks, and strategic opportunities.

  • Integrate Temporal.io workflows to orchestrate the agent's long-running tasks, such as periodic market data fetching, asynchronous analysis, and report generation.

  • Utilize Supabase (PostgreSQL + Realtime + Storage) to store the agent's evolving knowledge base, past analyses, and user profiles for personalized recommendations.

  • Develop a robust error handling and retry mechanism within the Temporal.io workflow for external API calls and LLM interactions.

  • Create a Mastra AI 'memory module' that stores and retrieves relevant context from Supabase, enabling the agent to maintain a long-term understanding of market dynamics.

  • Design a report generation tool that, when invoked by the agent, synthesizes findings from Qwen 3 into a well-structured, executive-ready document (e.g., Markdown or JSON format).

Resources and assets

Reference links and supporting material

Dataset notes

Sample data for 2 tasks

Challenge setup

The agent will be evaluated on its ability to accurately identify key market trends, synthesize coherent strategic insights, and generate well-structured reports based on simulated data. Emphasis will be on the robust...

Challenge input

{'market_data': {'chip_production_2026': '...', 'datacenter_demand_2026': '...', 'new_capacity_until_2027': '...'}, 'query': 'Analyze the market tr...

Agent execution

No agent tool is listed for this challenge.

Evaluated output

{'analysis': 'Detailed market analysis text.', 'recommendations': ['Rec 1', 'Rec 2']}

Evaluation checks
  • Ensure the generated reports adhere to the specified JSON structure with correct field types.
  • Verify that the Temporal workflow successfully completes without unhandled errors.
Configured evaluation evidence
  • InformationCompleteness target: 0.85
Configured runtime
  • JavaScript execution harness

Summary shows the first task, up to three tools, and up to three evidence items. Open the technical recipe to view all configured items.

View technical recipe

Configured tools

No tool records are attached.

Evaluation contract

  • Ensure the generated reports adhere to the specified JSON structure with correct field types.
  • Verify that the Temporal workflow successfully completes without unhandled errors.

Metrics

  • InformationCompleteness · Target 0.85
  • StrategicRelevance · Target 4
  • ResponseLatencyMs · Target 10000

Workflow tasks

  1. Task 1

    Input: {'market_data': {'chip_production_2026': '...', 'datacenter_demand_2026': '...', 'new_capacity_until_2027': '...'}, 'query': 'Analyze the market trend for high-end memory chips and its strategic implications.'}

    Output: {'analysis': 'Detailed market analysis text.', 'recommendations': ['Rec 1', 'Rec 2']}

    Execution harness: JavaScript

  2. Task 2

    Input: {'qa_transcript': '...', 'query': 'Synthesize insights on AI tool adoption in creative industries from the Q&A.'}

    Output: {'insights': 'Detailed insights text.', 'opportunities': ['Op 1', 'Op 2'], 'challenges': ['Ch 1', 'Ch 2']}

    Execution harness: JavaScript

Recipe freeze marker

No recipe freeze time is recorded.

Frequently Asked Questions about AI Market Trend & Strategy Advisor