Understand the pipeline and execution model for Simple Chat integrating MCP tools and LangGraph-based control flow.
User Query Flow
Tool Registration and Filtering
LangGraph StateGraph Construction
ToolNode
for tool execution.ChatbotNode
for normal LLM-based responses.Chat History Initialization
chat_id
.StateGraph Execution
StateGraph
is invoked.ToolNode
is calledChatbotNode
is used to generate a natural LLM responseTool Invocation Rules
Tool | Condition |
---|---|
Web Search Tool | Only used if GPT-4.1-search model is selected |
Image Generation | Only used for GET-based GPT models |
MCP Tools (Slack, GitHub, etc.) | Dynamically fetched and filtered per query |
Streaming the Response
Logging and Cost Management
Architecture Overview
Tool does not trigger
No streaming or delay in response