subashpoudel's picture
Refactored context analysis
7a3f093
Raw History Blame Contribute Delete
607 Bytes
from langgraph.graph import StateGraph, START, END
from langgraph.checkpoint.memory import MemorySaver
from .utils.state import State
from .utils.nodes import IntroductionNode
class ContextAnalysisAgent:
def __init__(self):
self.memory = MemorySaver()
def context_analysis_graph(self):
graph_builder= StateGraph(State)
graph_builder.add_node("details_collector", IntroductionNode().run)
graph_builder.add_edge(START, "details_collector")
graph_builder.add_edge("details_collector", END)
return graph_builder.compile(checkpointer=self.memory)