MCPcopy Create free account
hub / github.com/bartolli/langgraph-runtime / main

Function main

src/example_workflow.py:12–48  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

10logger = setup_logger()
11
12async def main():
13 # Configure logging
14 logging.getLogger().setLevel(logging.INFO)
15
16 try:
17 # First execution
18 logger.info("\n=== Initial Task ===")
19 result = await process_task(
20 query="Design a fault-tolerant message queue",
21 thread_id="mq-desig",
22 save_steps=True,
23 output_dir="./design_steps"
24 )
25
26 # Get task history
27 logger.info("\n=== Task History ===")
28 planner_graph = create_planner_graph()
29 await get_task_history(planner_graph, "mq-desig")
30
31 # Continue the conversation
32 logger.info("\n=== Follow-up Task ===")
33 previous_messages = result.get("messages", [])
34 result = await process_task(
35 query="Elaborate on the retry mechanism",
36 thread_id="mq-desig",
37 previous_messages=previous_messages,
38 save_steps=True,
39 output_dir="./design_steps_followup"
40 )
41
42 # Get updated history
43 logger.info("\n=== Updated Task History ===")
44 await get_task_history(planner_graph, "mq-desig")
45
46 except Exception as e:
47 logger.error(f"Error during test: {e}")
48 raise
49
50if __name__ == "__main__":
51 asyncio.run(main())

Callers 1

Calls 3

process_taskFunction · 0.90
create_planner_graphFunction · 0.90
get_task_historyFunction · 0.90

Tested by

no test coverage detected