๐Ÿš€ Everything is free โ€” help us improve! Submit feedback and shape the platform.
๐ŸงชTDD Challengeยทintermediateยทโฑ๏ธ 35โ€“55mยทโญ 200 XP

M-080Build a LangGraph-Style State Machine

Description

Nebula Corp wants to model their customer support workflow as a graph-based state machine, similar to LangGraph. Build a workflow engine where nodes are processing functions, edges define transitions (including conditional edges), and state flows through the graph. The engine should detect cycles, support conditional routing, and track execution history.

Test Cases (3)

Routes billing intent correctly
Should route to billing node
Input:testBillingRoute()
Expected:CONTAINS:billing
Tracks execution history
Should record both steps in history
Input:testHistory()
Expected:CONTAINS:2
Respects max steps
Should stop at max steps to prevent infinite loops
Input:testMaxSteps()
Expected:CONTAINS:5

Related Lessons

Click Run / Check to validate your solution