๐Ÿš€ We're in early access! Submit feedback โ€” your input shapes the platform.
๐ŸงชTDD Challengeยทbeginnerยทโฑ๏ธ 15โ€“30mยทโญ 100 XP

M-039Build Your First Agent Router

Description

Nebula Corp's support system needs an agent that can decide which tool to use based on the user's message. Build a simple intent router that analyzes the user message, picks the right tool from a registry, and returns the tool's response. The router should match keywords to tools and handle cases where no tool matches.

Test Cases (3)

Detects weather intent
Should match the weather tool
Input:detectIntent('What is the weather like today?')
Expected:weather
Routes to calculator
Should route to calculator and return its response
Input:routeMessage('Can you calculate this for me?')
Expected:CONTAINS_ALL:calculator,Calculation result
Handles unknown intent
Should return unknown for unmatched messages
Input:routeMessage('Tell me a joke')
Expected:CONTAINS:unknown

Related Lessons

Click Run / Check to validate your solution