{"id":86660,"date":"2024-12-03T21:38:04","date_gmt":"2024-12-03T18:08:04","guid":{"rendered":"https:\/\/nabfollower.com\/blog\/build-tool-calling-agents-with-langgraph-and-watsonxai-flows-engine-230c\/"},"modified":"2024-12-03T21:38:04","modified_gmt":"2024-12-03T18:08:04","slug":"build-tool-calling-agents-with-langgraph-and-watsonxai-flows-engine-230c","status":"publish","type":"post","link":"https:\/\/nabfollower.com\/blog\/build-tool-calling-agents-with-langgraph-and-watsonxai-flows-engine-230c\/","title":{"rendered":"\u0633\u0627\u062e\u062a \u0639\u0627\u0645\u0644 \u062a\u0645\u0627\u0633 \u0627\u0628\u0632\u0627\u0631 \u0628\u0627 LangGraph \u0648 IBM watsonx.ai Flow Engine"},"content":{"rendered":"<p>Summarize this content to 400 words in Persian Lang<br \/>\n              \u0647\u0648\u0634 \u0645\u0635\u0646\u0648\u0639\u06cc \u0645\u0648\u0644\u062f \u0628\u0647 \u0633\u0631\u0639\u062a \u062f\u0631 \u062d\u0627\u0644 \u062a\u06a9\u0627\u0645\u0644 \u0627\u0633\u062a\u060c \u0648 \u062f\u0631 \u0686\u0646\u062f \u0633\u0627\u0644 \u06af\u0630\u0634\u062a\u0647\u060c \u0645\u0627 \u0634\u0627\u0647\u062f \u0686\u0646\u062f \u0627\u0644\u06af\u0648\u06cc \u0648\u0627\u0636\u062d \u0628\u0648\u062f\u0647\u200c\u0627\u06cc\u0645 \u06a9\u0647 \u062a\u0648\u0633\u0639\u0647\u200c\u062f\u0647\u0646\u062f\u06af\u0627\u0646 \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u0646\u062f \u0622\u0646\u200c\u0647\u0627 \u0631\u0627 \u067e\u06cc\u0627\u062f\u0647\u200c\u0633\u0627\u0632\u06cc \u06a9\u0646\u0646\u062f \u2013 \u0627\u0632 \u062f\u0633\u062a\u0648\u0631 \u0633\u0627\u062f\u0647 \u0634\u0631\u0648\u0639\u060c \u0628\u0647 \u0633\u0645\u062a Retrieval Augmented Generation (RAG)\u060c \u0648 \u0627\u06a9\u0646\u0648\u0646 Tool Calling \u0648 Agents. \u0627\u06cc\u062c\u0627\u062f \u0628\u0631\u0646\u0627\u0645\u0647 \u0647\u0627\u06cc \u06a9\u0627\u0631\u0628\u0631\u062f\u06cc \u062f\u0631 \u0627\u0637\u0631\u0627\u0641 Agent \u0647\u0627 \u0627\u063a\u0644\u0628 \u0634\u0627\u0645\u0644 \u0627\u062a\u0635\u0627\u0644 \u0627\u0628\u0632\u0627\u0631\u0647\u0627\u060c \u0645\u062f\u0644 \u0647\u0627 \u0648 API \u0647\u0627\u06cc \u0645\u062e\u062a\u0644\u0641 \u0627\u0633\u062a.<\/p>\n<p>\u062f\u0631 \u0627\u06cc\u0646 \u0622\u0645\u0648\u0632\u0634\u060c \u0646\u062d\u0648\u0647 \u0631\u0627\u0647\u200c\u0627\u0646\u062f\u0627\u0632\u06cc \u0648 \u0627\u062c\u0631\u0627\u06cc \u06cc\u06a9 \u0639\u0627\u0645\u0644 \u0647\u0648\u0634 \u0645\u0635\u0646\u0648\u0639\u06cc \u0631\u0627 \u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 watsonx.ai Flow Engine \u0648 LangGraph\u060c \u0628\u0627 \u06a9\u0645\u06a9 \u0645\u062f\u0644\u200c\u0647\u0627\u06cc\u06cc \u06a9\u0647 \u062a\u0648\u0633\u0637 \u067e\u0644\u062a\u0641\u0631\u0645 watsonx.ai IBM \u0627\u0631\u0627\u0626\u0647 \u0645\u06cc\u200c\u0634\u0648\u0646\u062f\u060c \u062e\u0648\u0627\u0647\u06cc\u062f \u0622\u0645\u0648\u062e\u062a. \u0627\u06cc\u0646 \u0631\u0627\u0647\u0646\u0645\u0627 \u0634\u0645\u0627 \u0631\u0627 \u0642\u062f\u0645 \u0628\u0647 \u0642\u062f\u0645 \u0627\u0632 \u0637\u0631\u06cc\u0642 \u0646\u0635\u0628 \u0627\u0628\u0632\u0627\u0631\u0647\u0627\u06cc \u0645\u0648\u0631\u062f \u0646\u06cc\u0627\u0632\u060c \u0627\u0633\u062a\u0642\u0631\u0627\u0631 \u0627\u0628\u0632\u0627\u0631\u0647\u0627\u06cc \u062e\u0648\u062f \u062f\u0631 Flow Engine \u0648 \u0627\u062c\u0631\u0627\u06cc \u06cc\u06a9 \u0628\u0631\u0646\u0627\u0645\u0647 \u0686\u062a \u0628\u0631 \u0631\u0648\u06cc \u062f\u0633\u062a\u06af\u0627\u0647 \u062e\u0648\u062f \u0631\u0627\u0647\u0646\u0645\u0627\u06cc\u06cc \u0645\u06cc \u06a9\u0646\u062f.<\/p>\n<p>  \u062a\u0645\u0627\u0633 \u0628\u0627 \u0627\u0628\u0632\u0627\u0631 \u0648 \u0646\u0645\u0627\u06cc\u0646\u062f\u06af\u0627\u0646<\/p>\n<p>\u0641\u0631\u0627\u062e\u0648\u0627\u0646\u06cc \u0627\u0628\u0632\u0627\u0631 \u0628\u0647 \u0645\u062f\u0644 \u0647\u0627\u06cc \u0632\u0628\u0627\u0646 \u0628\u0632\u0631\u06af (LLM) \u0627\u062c\u0627\u0632\u0647 \u0645\u06cc \u062f\u0647\u062f \u062a\u0627 \u0628\u0627 \u067e\u06cc\u0631\u0648\u06cc \u0627\u0632 \u062f\u0633\u062a\u0648\u0631\u0627\u0644\u0639\u0645\u0644 \u0647\u0627\u06cc \u062a\u0639\u0631\u06cc\u0641 \u0634\u062f\u0647 \u062a\u0648\u0633\u0637 \u06a9\u0627\u0631\u0628\u0631\u060c \u0628\u0627 \u0627\u0628\u0632\u0627\u0631\u0647\u0627\u06cc \u062e\u0627\u0631\u062c\u06cc \u06a9\u0627\u0631 \u06a9\u0646\u0646\u062f. \u0645\u062f\u0644 \u0648\u0631\u0648\u062f\u06cc \u0647\u0627\u06cc \u0645\u0648\u0631\u062f \u0646\u06cc\u0627\u0632 \u06cc\u06a9 \u0627\u0628\u0632\u0627\u0631 \u0631\u0627 \u0645\u0634\u062e\u0635 \u0645\u06cc \u06a9\u0646\u062f \u0648 \u0627\u0628\u0632\u0627\u0631 \u06a9\u0627\u0631 \u0648\u0627\u0642\u0639\u06cc \u0631\u0627 \u0627\u0646\u062c\u0627\u0645 \u0645\u06cc \u062f\u0647\u062f. \u0627\u06cc\u0646 \u0628\u0631\u0627\u06cc \u062a\u0628\u062f\u06cc\u0644 \u062f\u0627\u062f\u0647 \u0647\u0627\u06cc \u0645\u0648\u062c\u0648\u062f \u0628\u0647 \u0627\u0637\u0644\u0627\u0639\u0627\u062a \u0633\u0627\u062e\u062a\u0627\u0631\u06cc\u0627\u0641\u062a\u0647 \u06cc\u0627 \u067e\u06cc\u0648\u0646\u062f \u062f\u0627\u062f\u0646 \u0627\u0628\u0632\u0627\u0631\u0647\u0627 \u0628\u0647 \u06af\u0631\u062f\u0634 \u06a9\u0627\u0631 \u0639\u0627\u0644\u06cc \u0627\u0633\u062a. Flow Engine \u0628\u0627 \u0627\u0631\u0627\u0626\u0647 \u0631\u0627\u0647\u200c\u0647\u0627\u06cc\u06cc \u0628\u0631\u0627\u06cc \u062a\u0628\u062f\u06cc\u0644 \u0645\u0646\u0627\u0628\u0639 \u062f\u0627\u062f\u0647 \u0645\u0648\u062c\u0648\u062f \u0645\u0627\u0646\u0646\u062f \u067e\u0627\u06cc\u06af\u0627\u0647\u200c\u0647\u0627\u06cc \u062f\u0627\u062f\u0647 \u0648 API\u0647\u0627 \u0628\u0647 \u0627\u0628\u0632\u0627\u0631 \u0648 \u0627\u062a\u0635\u0627\u0644 \u0628\u0647 \u0627\u06cc\u0646 \u0627\u0628\u0632\u0627\u0631\u0647\u0627 \u0627\u0632 \u0686\u0627\u0631\u0686\u0648\u0628\u200c\u0647\u0627\u06cc \u0645\u062e\u062a\u0644\u0641 \u0628\u0631\u0627\u06cc \u0633\u0627\u062e\u062a \u0628\u0631\u0646\u0627\u0645\u0647\u200c\u0647\u0627\u06cc \u0647\u0648\u0634 \u0645\u0635\u0646\u0648\u0639\u06cc \u0645\u0627\u0646\u0646\u062f LangChain \u0648 LangGraph\u060c \u0627\u06cc\u0646 \u0641\u0631\u0622\u06cc\u0646\u062f \u0631\u0627 \u0622\u0633\u0627\u0646\u200c\u062a\u0631 \u0645\u06cc\u200c\u06a9\u0646\u062f.<\/p>\n<p>Agent \u0647\u0627 \u0645\u0627\u0646\u0646\u062f \u06a9\u0645\u06a9 \u0647\u0627\u06cc \u0647\u0648\u0634 \u0645\u0635\u0646\u0648\u0639\u06cc \u0647\u0633\u062a\u0646\u062f \u06a9\u0647 \u0628\u0631\u0627\u06cc \u0627\u0646\u062c\u0627\u0645 \u0648\u0638\u0627\u06cc\u0641 \u062e\u0627\u0635 \u0633\u0627\u062e\u062a\u0647 \u0634\u062f\u0647 \u0627\u0646\u062f \u0648 \u0628\u0631\u0627\u06cc \u062a\u06a9\u0645\u06cc\u0644 \u0627\u06cc\u0646 \u06af\u0641\u062a\u06af\u0648\u0647\u0627 \u0628\u0647 \u0641\u0631\u0627\u062e\u0648\u0627\u0646\u06cc \u0627\u0628\u0632\u0627\u0631 \u062a\u06a9\u06cc\u0647 \u0645\u06cc \u06a9\u0646\u0646\u062f. \u0627\u06cc\u0646 \u0628\u0647 \u0622\u0646\u0647\u0627 \u0627\u062c\u0627\u0632\u0647 \u0645\u06cc \u062f\u0647\u062f \u062a\u0627 \u0628\u0647 \u0627\u0628\u0632\u0627\u0631\u0647\u0627\u06cc \u062e\u0627\u0631\u062c\u06cc \u062f\u0633\u062a\u0631\u0633\u06cc \u062f\u0627\u0634\u062a\u0647 \u0628\u0627\u0634\u0646\u062f\u060c \u0627\u0637\u0644\u0627\u0639\u0627\u062a \u0631\u0627 \u067e\u0631\u062f\u0627\u0632\u0634 \u06a9\u0646\u0646\u062f \u0648 \u062f\u0627\u0646\u0634 \u0645\u0648\u062c\u0648\u062f \u062f\u0631 LLM \u0631\u0627 \u0645\u062a\u0646\u0627\u0633\u0628 \u0628\u0627 \u0646\u06cc\u0627\u0632\u0647\u0627\u06cc \u06a9\u0627\u0631\u0628\u0631 \u06af\u0633\u062a\u0631\u0634 \u062f\u0647\u0646\u062f. \u0686\u0646\u062f\u06cc\u0646 \u0641\u0631\u06cc\u0645\u0648\u0631\u06a9 \u0645\u062d\u0628\u0648\u0628 \u0628\u0631\u0627\u06cc \u0633\u0627\u062e\u062a \u0639\u0648\u0627\u0645\u0644 \u0648\u062c\u0648\u062f \u062f\u0627\u0631\u062f\u060c \u0686\u0647 \u062f\u0631 \u062c\u0627\u0648\u0627 \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a \u0648 \u0686\u0647 \u062f\u0631 \u067e\u0627\u06cc\u062a\u0648\u0646. \u062f\u0631 \u0627\u06cc\u0646 \u0622\u0645\u0648\u0632\u0634 \u0645\u0627 \u0627\u0632 LangGraph \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc \u06a9\u0646\u06cc\u0645 \u06a9\u0647 \u0628\u0631 \u0627\u0633\u0627\u0633 LangChain \u0633\u0627\u062e\u062a\u0647 \u0634\u062f\u0647 \u0627\u0633\u062a \u062a\u0627 \u0639\u0627\u0645\u0644\u06cc \u0627\u06cc\u062c\u0627\u062f \u06a9\u0646\u06cc\u0645 \u06a9\u0647 \u0642\u0627\u062f\u0631 \u0628\u0647 \u0641\u0631\u0627\u062e\u0648\u0627\u0646\u06cc \u0627\u0628\u0632\u0627\u0631\u0647\u0627\u06cc\u06cc \u0627\u0633\u062a \u06a9\u0647 \u0645\u06cc \u062a\u0648\u0627\u0646\u0646\u062f \u0627\u0637\u0644\u0627\u0639\u0627\u062a \u0631\u0627 \u0627\u0632 Google Books \u0648 Wikipedia \u0628\u0627\u0632\u06cc\u0627\u0628\u06cc \u06a9\u0646\u0646\u062f. \u0647\u0645\u0627\u0646\u0637\u0648\u0631 \u06a9\u0647 \u062f\u0631 \u0628\u062e\u0634 \u0628\u0639\u062f\u06cc \u062e\u0648\u0627\u0647\u06cc\u062f \u0622\u0645\u0648\u062e\u062a\u060c \u0627\u0628\u0632\u0627\u0631\u0647\u0627 \u062f\u0631 Flow Engine \u062a\u0639\u0631\u06cc\u0641 \u0645\u06cc \u0634\u0648\u0646\u062f \u0648 \u0627\u0632 \u0637\u0631\u06cc\u0642 JavaScript SDK \u0645\u062a\u0635\u0644 \u0645\u06cc \u0634\u0648\u0646\u062f.<\/p>\n<p>  \u06cc\u06a9 \u0639\u0627\u0645\u0644 \u062a\u0645\u0627\u0633 \u0628\u0627 \u0627\u0628\u0632\u0627\u0631 \u0628\u0633\u0627\u0632\u06cc\u062f<\/p>\n<p>\u062f\u0631 \u0627\u06cc\u0646 \u0628\u062e\u0634 \u0646\u062d\u0648\u0647 \u0631\u0627\u0647 \u0627\u0646\u062f\u0627\u0632\u06cc \u0648 \u0627\u062c\u0631\u0627\u06cc \u06cc\u06a9 \u0639\u0627\u0645\u0644 \u0647\u0648\u0634 \u0645\u0635\u0646\u0648\u0639\u06cc \u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 watsonx.ai Flow Engine (wxflows) \u0648 LangGraph. \u0646\u0645\u0627\u06cc\u0646\u062f\u0647 \u0642\u0627\u062f\u0631 \u062e\u0648\u0627\u0647\u062f \u0628\u0648\u062f \u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0645\u062c\u0645\u0648\u0639\u0647 \u0627\u06cc \u0627\u0632 \u0627\u0628\u0632\u0627\u0631\u0647\u0627\u06cc \u0627\u0632 \u067e\u06cc\u0634 \u0633\u0627\u062e\u062a\u0647 \u0634\u062f\u0647 \u0627\u0646\u062c\u0645\u0646\u060c \u0628\u0627 \u0686\u0646\u062f\u06cc\u0646 \u0627\u0628\u0632\u0627\u0631 \u062a\u0645\u0627\u0633 \u0628\u06af\u06cc\u0631\u062f \u062a\u0627 \u0628\u0647 \u0633\u0624\u0627\u0644\u0627\u062a \u0645\u0631\u0628\u0648\u0637 \u0628\u0647 \u06a9\u062a\u0627\u0628 \u0647\u0627\u06cc \u0645\u0648\u0631\u062f \u0639\u0644\u0627\u0642\u0647 \u06cc\u0627 \u0633\u0627\u06cc\u0631 \u0631\u0633\u0627\u0646\u0647 \u0647\u0627\u06cc \u0645\u062d\u0628\u0648\u0628 \u0634\u0645\u0627 \u067e\u0627\u0633\u062e \u062f\u0647\u062f. \u0627\u0644\u0628\u062a\u0647\u060c \u0634\u0645\u0627 \u0647\u0645\u0686\u0646\u06cc\u0646 \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u062f \u0645\u0646\u0627\u0628\u0639 \u062f\u0627\u062f\u0647 \u062e\u0648\u062f (\u0645\u0627\u0646\u0646\u062f \u067e\u0627\u06cc\u06af\u0627\u0647 \u062f\u0627\u062f\u0647 \u0647\u0627 \u0648 API \u0647\u0627) \u0631\u0627 \u0628\u0647 \u0627\u0628\u0632\u0627\u0631 \u062a\u0628\u062f\u06cc\u0644 \u06a9\u0646\u06cc\u062f. \u0645\u0627 \u0647\u0645\u0647 \u0686\u06cc\u0632\u0647\u0627\u06cc\u06cc \u0631\u0627 \u06a9\u0647 \u0628\u0627\u06cc\u062f \u0628\u062f\u0627\u0646\u06cc\u062f\u060c \u0627\u0632 \u0646\u0635\u0628 \u0627\u0628\u0632\u0627\u0631\u0647\u0627 \u06af\u0631\u0641\u062a\u0647 \u062a\u0627 \u0627\u0633\u062a\u0642\u0631\u0627\u0631 \u0648 \u0627\u062c\u0631\u0627\u06cc \u0628\u0631\u0646\u0627\u0645\u0647 \u062f\u0631 \u062f\u0633\u062a\u06af\u0627\u0647\u062a\u0627\u0646 \u0631\u0627 \u067e\u0648\u0634\u0634 \u062e\u0648\u0627\u0647\u06cc\u0645 \u062f\u0627\u062f.<\/p>\n<p>\u0627\u06cc\u0646 \u0645\u062b\u0627\u0644 \u0634\u0627\u0645\u0644 \u0641\u0646\u0627\u0648\u0631\u06cc \u0647\u0627\u06cc \u0632\u06cc\u0631 \u0627\u0633\u062a:<\/p>\n<p>LangGraph SDK (\u0628\u0631\u0627\u06cc \u0639\u0627\u0645\u0644)<br \/>\n\u067e\u0633\u0648\u0646\u062f LangChain SDK watsonx.ai (\u0628\u0631\u0627\u06cc \u0645\u062f\u0644 \u0647\u0627)<\/p>\n<p>wxflows  SDK (\u0628\u0631\u0627\u06cc \u0627\u0628\u0632\u0627\u0631\u0647\u0627)<br \/>\nCarbon AI Chat (\u0628\u0631\u0627\u06cc \u0631\u0627\u0628\u0637 \u06a9\u0627\u0631\u0628\u0631\u06cc)<\/p>\n<p>\u0645\u0627 \u0627\u0632 \u0645\u062f\u0644 \u0686\u062a watsonx.ai \u0627\u0632 LangChain \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u062e\u0648\u0627\u0647\u06cc\u0645 \u06a9\u0631\u062f\u060c \u0627\u0645\u0627 \u0634\u0645\u0627 \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u062f \u0627\u0632 \u0647\u0631 \u06cc\u06a9 \u0627\u0632 \u0645\u062f\u0644 \u0647\u0627\u06cc \u0686\u062a \u067e\u0634\u062a\u06cc\u0628\u0627\u0646\u06cc \u0634\u062f\u0647 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u062f.<\/p>\n<p>\u0628\u0631\u0627\u06cc \u0634\u0631\u0648\u0639 \u0646\u0635\u0628 \u0628\u0647 \u0628\u062e\u0634 \u0628\u0639\u062f\u06cc \u0628\u0631\u0648\u06cc\u062f wxflows CLI\u060c \u067e\u0631\u0648\u0698\u0647 Flow Engine \u062e\u0648\u062f \u0631\u0627 \u0631\u0627\u0647 \u0627\u0646\u062f\u0627\u0632\u06cc \u06a9\u0646\u06cc\u062f \u0648 \u0639\u0627\u0645\u0644 \u0631\u0627 \u0627\u0632 \u0637\u0631\u06cc\u0642 \u06cc\u06a9 \u0628\u0631\u0646\u0627\u0645\u0647 \u0686\u062a \u0627\u062c\u0631\u0627 \u06a9\u0646\u06cc\u062f. \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u062e\u0648\u0627\u0647\u06cc\u0645 \u06a9\u0631\u062f google_books \u0648 wikipedia \u0628\u0647 \u0639\u0646\u0648\u0627\u0646 \u0646\u0645\u0648\u0646\u0647 \u0647\u0627\u06cc\u06cc \u0627\u0632 \u0627\u0628\u0632\u0627\u0631\u0647\u0627\u06cc\u06cc \u06a9\u0647 \u0646\u0645\u0627\u06cc\u0646\u062f\u0647 \u0645\u06cc \u062a\u0648\u0627\u0646\u062f \u0622\u0646\u0647\u0627 \u0631\u0627 \u0641\u0631\u0627\u062e\u0648\u0627\u0646\u06cc \u06a9\u0646\u062f.<\/p>\n<p>  \u067e\u06cc\u0634 \u0646\u06cc\u0627\u0632\u0647\u0627<\/p>\n<p>\u0642\u0628\u0644 \u0627\u0632 \u0634\u0631\u0648\u0639\u060c \u0628\u0627\u06cc\u062f \u06cc\u06a9 \u062d\u0633\u0627\u0628 \u06a9\u0627\u0631\u0628\u0631\u06cc \u0628\u0631\u0627\u06cc watsonx.ai Flow Engine \u0628\u0631\u0627\u06cc \u0627\u06cc\u0646 \u0622\u0645\u0648\u0632\u0634 \u0627\u06cc\u062c\u0627\u062f \u06a9\u0646\u06cc\u062f:<\/p>\n<p>  \u0645\u0631\u062d\u0644\u0647 1: \u0646\u0635\u0628 \u06a9\u0646\u06cc\u062f wxflows CLI<\/p>\n<p>\u0628\u0627 \u0646\u0635\u0628 \u0634\u0631\u0648\u0639 \u06a9\u0646\u06cc\u062f wxflows CLI\u060c \u06a9\u0647 \u0628\u0631\u0627\u06cc \u0646\u0635\u0628 \u067e\u0627\u06cc\u062a\u0648\u0646 (\u0646\u0633\u062e\u0647 3.8 \u06cc\u0627 \u0628\u0627\u0644\u0627\u062a\u0631) \u0631\u0648\u06cc \u062f\u0633\u062a\u06af\u0627\u0647 \u0645\u0627 \u0646\u06cc\u0627\u0632 \u062f\u0627\u0631\u062f. \u0627\u06cc\u0646 \u0645\u0631\u0627\u062d\u0644 \u0631\u0627 \u062f\u0646\u0628\u0627\u0644 \u06a9\u0646\u06cc\u062f:<\/p>\n<p>CLI \u0631\u0627 \u0627\u0632 \u0635\u0641\u062d\u0647 \u0646\u0635\u0628 \u062f\u0627\u0646\u0644\u0648\u062f \u06a9\u0646\u06cc\u062f.<\/p>\n<p>\u06cc\u06a9 \u067e\u0648\u0634\u0647 \u062c\u062f\u06cc\u062f \u062f\u0631 \u0631\u0627\u06cc\u0627\u0646\u0647 \u062e\u0648\u062f \u0627\u06cc\u062c\u0627\u062f \u06a9\u0646\u06cc\u062f.<br \/>\nmkdir wxflows-project<br \/>\ncd wxflows-project<\/p>\n<p>\u062f\u0631 \u062f\u0627\u062e\u0644 \u0627\u06cc\u0646 \u067e\u0648\u0634\u0647\u060c \u0627\u062c\u0631\u0627 \u06a9\u0646\u06cc\u062f:<br \/>\npip install wxflows_cli-1.0.0rc192-py3-none-any.whl &#8211;force-reinstall<\/p>\n<p>\u0627\u0632 \u0646\u0627\u0645 \u062f\u0642\u06cc\u0642 \u0622\u0646 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u062f .whl \u0641\u0627\u06cc\u0644\u06cc \u06a9\u0647 \u062f\u0627\u0646\u0644\u0648\u062f \u06a9\u0631\u062f\u06cc\u062f<\/p>\n<p>\u0628\u0627 \u062f\u0646\u0628\u0627\u0644 \u06a9\u0631\u062f\u0646 \u062f\u0633\u062a\u0648\u0631\u0627\u0644\u0639\u0645\u0644 \u0647\u0627\u06cc \u0648\u0631\u0648\u062f \u0628\u0647 CLI \u0648\u0627\u0631\u062f \u0634\u0648\u06cc\u062f.<br \/>\nwxflows login<\/p>\n<p>\u067e\u0633 \u0627\u0632 \u0631\u0627\u0647\u200c\u0627\u0646\u062f\u0627\u0632\u06cc CLI \u0628\u0631\u0627\u06cc watsonx.ai Flow Engine\u060c \u0627\u062c\u0627\u0632\u0647 \u062f\u0647\u06cc\u062f \u0628\u0647 \u0628\u062e\u0634 \u0628\u0639\u062f\u06cc \u0627\u062f\u0627\u0645\u0647 \u062f\u0647\u06cc\u0645 \u0648 \u0628\u0627 \u0627\u0628\u0632\u0627\u0631\u0647\u0627\u06cc Wikipedia \u0648 Google Books \u06cc\u06a9 \u0646\u0642\u0637\u0647 \u067e\u0627\u06cc\u0627\u0646\u06cc \u0627\u06cc\u062c\u0627\u062f \u06a9\u0646\u06cc\u0645.<\/p>\n<p>  \u0645\u0631\u062d\u0644\u0647 2: \u06cc\u06a9 \u067e\u0631\u0648\u0698\u0647 watsonx.ai Flow Engine \u0631\u0627 \u0631\u0627\u0647 \u0627\u0646\u062f\u0627\u0632\u06cc \u06a9\u0646\u06cc\u062f<\/p>\n<p>\u062d\u0627\u0644\u0627\u060c \u0631\u0627\u0647 \u0627\u0646\u062f\u0627\u0632\u06cc \u062c\u062f\u06cc\u062f wxflows \u067e\u0631\u0648\u0698\u0647 \u0627\u06cc\u0646 \u0634\u0627\u0645\u0644 \u062f\u0648 \u0627\u0628\u0632\u0627\u0631 \u062e\u0648\u0627\u0647\u062f \u0628\u0648\u062f:<\/p>\n<p>google_books: \u0628\u0631\u0627\u06cc \u062c\u0633\u062a\u062c\u0648 \u0648 \u0628\u0627\u0632\u06cc\u0627\u0628\u06cc \u0627\u0637\u0644\u0627\u0639\u0627\u062a \u0627\u0632 Google Books \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc \u0634\u0648\u062f.<\/p>\n<p>wikipedia: \u0628\u0631\u0627\u06cc \u067e\u0631\u0633 \u0648 \u062c\u0648 \u0648 \u0628\u0627\u0632\u06cc\u0627\u0628\u06cc \u0627\u0637\u0644\u0627\u0639\u0627\u062a \u0627\u0632 \u0648\u06cc\u06a9\u06cc \u067e\u062f\u06cc\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc \u0634\u0648\u062f.<\/p>\n<p>\u062f\u0633\u062a\u0648\u0631 \u0632\u06cc\u0631 \u0631\u0627 \u0628\u0631\u0627\u06cc \u0645\u0642\u062f\u0627\u0631\u062f\u0647\u06cc \u0627\u0648\u0644\u06cc\u0647 \u067e\u0631\u0648\u0698\u0647 \u0648 \u0648\u0627\u0631\u062f \u06a9\u0631\u062f\u0646 \u0627\u06cc\u0646 \u0627\u0628\u0632\u0627\u0631\u0647\u0627 \u0627\u062c\u0631\u0627 \u06a9\u0646\u06cc\u062f:<\/p>\n<p>wxflows init &#8211;endpoint-name api\/wxflows-toolcalling \\<br \/>\n&#8211;import-name google_books &#8211;import-package https:\/\/github.com\/IBM\/wxflows\/raw\/refs\/heads\/main\/tools\/google_books.zip \\<br \/>\n&#8211;import-tool-name google_books &#8211;import-tool-description &#8220;Retrieve information from Google Books. Find books by search string, for example to search for Daniel Keyes &#8216;Flowers for Algernon&#8217; use q: &#8216;intitle:flowers+inauthor:keyes'&#8221; &#8211;import-tool-fields &#8220;books|book&#8221; \\<br \/>\n&#8211;import-name wikipedia &#8211;import-package https:\/\/github.com\/IBM\/wxflows\/raw\/refs\/heads\/main\/tools\/wikipedia.zip \\<br \/>\n&#8211;import-tool-name wikipedia &#8211;import-tool-description &#8220;Retrieve information from Wikipedia.&#8221; &#8211;import-tool-fields &#8220;search|page&#8221;<\/p>\n<p>    \u0648\u0627\u0631\u062f \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u0634\u0648\u06cc\u062f<\/p>\n<p>    \u0627\u0632 \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u062e\u0627\u0631\u062c \u0634\u0648\u06cc\u062f<\/p>\n<p>\u062f\u0631 \u0627\u06cc\u0646\u062c\u0627 \u06a9\u0627\u0631\u06cc \u0627\u0633\u062a \u06a9\u0647 \u0627\u06cc\u0646 \u062f\u0633\u062a\u0648\u0631 \u0627\u0646\u062c\u0627\u0645 \u0645\u06cc \u062f\u0647\u062f:<\/p>\n<p>\u0646\u0642\u0637\u0647 \u067e\u0627\u06cc\u0627\u0646\u06cc \u0627\u06cc\u062c\u0627\u062f \u0645\u06cc \u06a9\u0646\u062f: \u06cc\u06a9 \u0646\u0642\u0637\u0647 \u067e\u0627\u06cc\u0627\u0646\u06cc \u0628\u0647 \u0646\u0627\u0645 \u0631\u0627 \u062a\u0639\u0631\u06cc\u0641 \u0645\u06cc \u06a9\u0646\u062f api\/wxflows-toolcalling.<\/p>\n<p>\u0648\u0627\u0631\u062f\u0627\u062a google_books: \u0627\u0628\u0632\u0627\u0631\u06cc \u0628\u0631\u0627\u06cc \u0628\u0627\u0632\u06cc\u0627\u0628\u06cc \u06a9\u062a\u0627\u0628\u200c\u0647\u0627 \u0627\u0632 Google Books \u0628\u0627 \u062a\u0648\u0636\u06cc\u062d\u0627\u062a \u0648 \u0641\u06cc\u0644\u062f\u0647\u0627\u06cc \u062e\u0627\u0635 \u0645\u0627\u0646\u0646\u062f \u0627\u0636\u0627\u0641\u0647 \u0645\u06cc\u200c\u06a9\u0646\u062f books|book.<\/p>\n<p>\u0648\u0627\u0631\u062f\u0627\u062a wikipedia: \u0627\u0628\u0632\u0627\u0631\u06cc \u0628\u0631\u0627\u06cc \u062c\u0633\u062a\u062c\u0648\u06cc \u0648\u06cc\u06a9\u06cc \u067e\u062f\u06cc\u0627 \u0628\u0627 \u062a\u0648\u0636\u06cc\u062d\u0627\u062a \u0648 \u0641\u06cc\u0644\u062f\u0647\u0627\u06cc\u06cc \u0645\u0627\u0646\u0646\u062f \u0627\u0636\u0627\u0641\u0647 \u0645\u06cc \u06a9\u0646\u062f search|page.<\/p>\n<p>\u067e\u0633 \u0627\u0632 \u0627\u062c\u0631\u0627\u06cc \u062f\u0633\u062a\u0648\u0631\u060c \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u062f a \u0631\u0627 \u0628\u0628\u06cc\u0646\u06cc\u062f wxflows.toml \u0641\u0627\u06cc\u0644 \u062f\u0631 \u0641\u0647\u0631\u0633\u062a \u0641\u0639\u0644\u06cc \u0638\u0627\u0647\u0631 \u0645\u06cc \u0634\u0648\u062f. \u0627\u06cc\u0646 \u0641\u0627\u06cc\u0644 \u067e\u06cc\u06a9\u0631\u0628\u0646\u062f\u06cc \u0627\u0628\u0632\u0627\u0631\u0647\u0627\u06cc \u0634\u0645\u0627 \u0631\u0627 \u062f\u0631 \u062e\u0648\u062f \u0646\u06af\u0647 \u0645\u06cc\u200c\u062f\u0627\u0631\u062f \u06a9\u0647 \u0628\u0627 \u0627\u062c\u0631\u0627\u06cc \u0622\u0646\u200c\u0647\u0627 \u0631\u0627 \u062f\u0631 \u06cc\u06a9 \u0646\u0642\u0637\u0647 \u067e\u0627\u06cc\u0627\u0646\u06cc \u0627\u062c\u0631\u0627 \u0645\u06cc\u200c\u06a9\u0646\u06cc\u0645:<\/p>\n<p>wxflows deploy<\/p>\n<p>    \u0648\u0627\u0631\u062f \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u0634\u0648\u06cc\u062f<\/p>\n<p>    \u0627\u0632 \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u062e\u0627\u0631\u062c \u0634\u0648\u06cc\u062f<\/p>\n<p>\u0627\u0633\u062a\u0642\u0631\u0627\u0631 \u0646\u0642\u0637\u0647 \u067e\u0627\u06cc\u0627\u0646\u06cc \u0641\u0642\u0637 \u0628\u0627\u06cc\u062f \u0686\u0646\u062f \u062b\u0627\u0646\u06cc\u0647 \u0637\u0648\u0644 \u0628\u06a9\u0634\u062f \u0648 \u0627\u06cc\u0646 wxflows SDK \u0627\u0632 \u0627\u06cc\u0646 \u0646\u0642\u0637\u0647 \u067e\u0627\u06cc\u0627\u0646\u06cc \u0628\u0631\u0627\u06cc \u0628\u0627\u0632\u06cc\u0627\u0628\u06cc \u0648 \u0641\u0631\u0627\u062e\u0648\u0627\u0646\u06cc \u0627\u0628\u0632\u0627\u0631\u0647\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u062e\u0648\u0627\u0647\u062f \u06a9\u0631\u062f\u060c \u0647\u0645\u0627\u0646\u0637\u0648\u0631 \u06a9\u0647 \u062f\u0631 \u0628\u062e\u0634 \u0628\u0639\u062f\u06cc \u06cc\u0627\u062f \u062e\u0648\u0627\u0647\u06cc\u062f \u06af\u0631\u0641\u062a.<\/p>\n<p>  \u0645\u0631\u062d\u0644\u0647 3: \u0627\u0632 LangGraph \u0628\u0631\u0627\u06cc \u0627\u06cc\u062c\u0627\u062f \u06cc\u06a9 \u0639\u0627\u0645\u0644 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u062f<\/p>\n<p>\u0627\u06a9\u0646\u0648\u0646 \u06a9\u0647 \u06cc\u06a9 \u0646\u0642\u0637\u0647 \u067e\u0627\u06cc\u0627\u0646\u06cc Flow Engine \u062f\u0627\u0631\u06cc\u0645\u060c \u0628\u0627\u06cc\u062f \u0639\u0627\u0645\u0644\u06cc \u0627\u06cc\u062c\u0627\u062f \u06a9\u0646\u06cc\u0645 \u06a9\u0647 \u0628\u062a\u0648\u0627\u0646\u062f \u0627\u0632 \u0627\u06cc\u0646 \u0646\u0642\u0637\u0647 \u067e\u0627\u06cc\u0627\u0646\u06cc \u0628\u0631\u0627\u06cc \u0641\u0631\u0627\u062e\u0648\u0627\u0646\u06cc \u0627\u0628\u0632\u0627\u0631 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u062f. \u0645\u0627 \u0627\u0632 LangGraph \u0628\u0631\u0627\u06cc \u0627\u06cc\u0646 \u06a9\u0627\u0631 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u062e\u0648\u0627\u0647\u06cc\u0645 \u06a9\u0631\u062f\u060c \u0647\u0645\u0631\u0627\u0647 \u0628\u0627 wxflows SDK \u0648 \u067e\u0633\u0648\u0646\u062f LangChain \u0628\u0631\u0627\u06cc watsonx.ai:<\/p>\n<p>\u06cc\u06a9 \u062f\u0627\u06cc\u0631\u06a9\u062a\u0648\u0631\u06cc \u062c\u062f\u06cc\u062f \u0627\u06cc\u062c\u0627\u062f \u06a9\u0646\u06cc\u062f:<br \/>\nmkdir langgraph<br \/>\ncd langgraph<\/p>\n<p>\u062f\u0631 \u0627\u06cc\u0646 \u062f\u0627\u06cc\u0631\u06a9\u062a\u0648\u0631\u06cc \u062f\u0633\u062a\u0648\u0631 \u0632\u06cc\u0631 \u0631\u0627 \u0628\u0631\u0627\u06cc \u0631\u0627\u0647 \u0627\u0646\u062f\u0627\u0632\u06cc \u06cc\u06a9 \u067e\u0631\u0648\u0698\u0647 TypeScript \u062c\u062f\u06cc\u062f \u0648 \u0646\u0635\u0628 \u0648\u0627\u0628\u0633\u062a\u06af\u06cc \u0647\u0627\u06cc \u0645\u0648\u0631\u062f \u0646\u06cc\u0627\u0632 \u0627\u062c\u0631\u0627 \u06a9\u0646\u06cc\u062f:<br \/>\nnpm init -y<br \/>\nnpm i @langchain\/langgraph @langchain\/core @langchain\/community dotenv typescript @wxflows\/sdk@beta<\/p>\n<p>\u0627\u06cc\u0646 \u0628\u0633\u062a\u0647 \u0647\u0627\u06cc \u0632\u06cc\u0631 \u0631\u0627 \u0646\u0635\u0628 \u0645\u06cc \u06a9\u0646\u062f:<\/p>\n<p>&#8211; `@langchain\/langgraph`: Build agents, structured workflows and handle tool calling.<br \/>\n&#8211; `@langchain\/core`: Provides core functionality for building and managing AI-driven workflows.<br \/>\n&#8211; `@langchain\/community`: Provides access to experimental and community-contributed integrations and tools, such as models on the watsonx.ai platform.<br \/>\n&#8211; `dotenv`: Loads environment variables from a `.env` file, making it easier to manage API keys and configuration values.<br \/>\n&#8211; `typescript`: Sets up TypeScript, a superset of JavaScript, for type checking and better code quality.<br \/>\n&#8211; `@wxflows\/sdk@beta`: Includes the SDK for working with watsonx.ai Flows Engine, which allows you to deploy and manage tools.<\/p>\n<p>    \u0648\u0627\u0631\u062f \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u0634\u0648\u06cc\u062f<\/p>\n<p>    \u0627\u0632 \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u062e\u0627\u0631\u062c \u0634\u0648\u06cc\u062f<\/p>\n<p>\u067e\u0633 \u0627\u0632 \u0627\u062c\u0631\u0627\u06cc \u0627\u06cc\u0646 \u062f\u0633\u062a\u0648\u0631\u0627\u062a\u060c \u067e\u0631\u0648\u0698\u0647 \u0634\u0645\u0627 \u0622\u0645\u0627\u062f\u0647 \u0634\u0631\u0648\u0639 \u0633\u0627\u062e\u062a \u06cc\u06a9 \u0639\u0627\u0645\u0644 \u062e\u0648\u0627\u0647\u062f \u0628\u0648\u062f.<\/p>\n<p>\u0627\u06cc\u062c\u0627\u062f \u06a9\u0646\u06cc\u062f .env \u0641\u0627\u06cc\u0644 \u0628\u0627 \u0645\u0642\u0627\u062f\u06cc\u0631 \u0632\u06cc\u0631:<br \/>\n# You can get these credentials from https:\/\/dataplatform.cloud.ibm.com\/developer-access?context=wx<br \/>\nWATSONX_AI_AUTH_TYPE=iam<br \/>\nWATSONX_AI_ENDPOINT=https:\/\/us-south.ml.cloud.ibm.com<br \/>\nWATSONX_AI_IDENTITY_SERVER=iam.cloud.ibm.com<br \/>\nWATSONX_AI_APIKEY=<br \/>\nWATSONX_AI_PROJECT_ID=<\/p>\n<p># run the command &#8216;wxflows whoami &#8211;apikey&#8217;<br \/>\nWXFLOWS_APIKEY=<\/p>\n<p># endpoint shows in your terminal after running &#8216;wxflows deploy&#8217;<br \/>\nWXFLOWS_ENDPOINT=<\/p>\n<p>\u067e\u0633 \u0627\u0632 \u0627\u06cc\u062c\u0627\u062f .env \u0641\u0627\u06cc\u0644\u060c \u06cc\u06a9 \u0641\u0627\u06cc\u0644 \u062c\u062f\u06cc\u062f \u0628\u0647 \u0646\u0627\u0645 \u0627\u06cc\u062c\u0627\u062f \u06a9\u0646\u06cc\u062f index.ts \u0648 \u06a9\u062f LangGraph \u0631\u0627 \u0627\u0636\u0627\u0641\u0647 \u06a9\u0646\u06cc\u062f:<br \/>\nimport { AIMessage, BaseMessage, HumanMessage, SystemMessage } from &#8220;@langchain\/core\/messages&#8221;;<br \/>\nimport { ChatWatsonx } from &#8220;@langchain\/community\/chat_models\/ibm&#8221;;<br \/>\nimport { StateGraph } from &#8220;@langchain\/langgraph&#8221;;<br \/>\nimport { MemorySaver, Annotation } from &#8220;@langchain\/langgraph&#8221;;<br \/>\nimport { ToolNode } from &#8220;@langchain\/langgraph\/prebuilt&#8221;;<br \/>\nimport wxflows from &#8220;@wxflows\/sdk\/langchain&#8221;;<br \/>\nimport &#8220;dotenv\/config&#8221;;<\/p>\n<p>(async () =&gt; {<br \/>\n    \/\/ Define the graph state<br \/>\n    \/\/ See here for more info: https:\/\/langchain-ai.github.io\/langgraphjs\/how-tos\/define-state\/<br \/>\n    const StateAnnotation = Annotation.Root({<br \/>\n        messages: Annotation&lt;BaseMessage[]&gt;({<br \/>\n            reducer: (x, y) =&gt; x.concat(y),<br \/>\n        }),<br \/>\n    });<\/p>\n<p>    const toolClient = new wxflows({<br \/>\n        endpoint: process.env.WXFLOWS_ENDPOINT,<br \/>\n        apikey: process.env.WXFLOWS_APIKEY,<br \/>\n        traceSession: &#8216;&#8230;&#8217;<br \/>\n    });<\/p>\n<p>    const tools = await toolClient.lcTools;<br \/>\n    const toolNode = new ToolNode(tools);<\/p>\n<p>    \/\/ Connect to the LLM provider<br \/>\n    const model = new ChatWatsonx({<br \/>\n        model: &#8220;mistralai\/mistral-large&#8221;,<br \/>\n        projectId: process.env.WATSONX_AI_PROJECT_ID,<br \/>\n        serviceUrl: process.env.WATSONX_AI_ENDPOINT,<br \/>\n        version: &#8216;2024-05-31&#8217;,<br \/>\n    }).bindTools(tools);<\/p>\n<p>\u0627\u06cc\u0646 \u0642\u0633\u0645\u062a \u0627\u0648\u0644 \u06a9\u062f \u0648\u0627\u0628\u0633\u062a\u06af\u06cc\u200c\u0647\u0627\u06cc \u0645\u0648\u0631\u062f \u0646\u06cc\u0627\u0632 \u0631\u0627 \u0648\u0627\u0631\u062f \u0645\u06cc\u200c\u06a9\u0646\u062f\u060c \u0627\u0628\u0632\u0627\u0631\u0647\u0627 \u0631\u0627 \u0627\u0632 watsonx.ai Flow Engine \u0628\u0627\u0632\u06cc\u0627\u0628\u06cc \u0645\u06cc\u200c\u06a9\u0646\u062f \u0648 \u0627\u062a\u0635\u0627\u0644 \u0628\u0647 Mistral Large \u0631\u0627 \u062f\u0631 \u062d\u0627\u0644 \u0627\u062c\u0631\u0627 \u0628\u0631 \u0631\u0648\u06cc \u067e\u0644\u062a \u0641\u0631\u0645 watsonx.ai \u062a\u0646\u0638\u06cc\u0645 \u0645\u06cc\u200c\u06a9\u0646\u062f. \u0628\u06cc\u0627\u06cc\u06cc\u062f \u0642\u0633\u0645\u062a \u062f\u0648\u0645 \u06a9\u062f \u0631\u0627 \u0627\u0636\u0627\u0641\u0647 \u06a9\u0646\u06cc\u0645 index.ts \u0641\u0627\u06cc\u0644\u06cc \u06a9\u0647 \u0627\u06cc\u062c\u0627\u062f \u0639\u0627\u0645\u0644 \u0631\u0627 \u0627\u0646\u062c\u0627\u0645 \u0645\u06cc \u062f\u0647\u062f:<br \/>\n    \/\/ Define the function that determines whether to continue or not<br \/>\n    \/\/ We can extract the state typing via `StateAnnotation.State`<br \/>\n    function shouldContinue(state: typeof StateAnnotation.State) {<br \/>\n        const messages = state.messages;<br \/>\n        const lastMessage = messages[messages.length &#8211; 1] as AIMessage;<\/p>\n<p>        \/\/ If the LLM makes a tool call, then we route to the &#8220;tools&#8221; node<br \/>\n        if (lastMessage.tool_calls?.length) {<br \/>\n        console.log(&#8216;TOOL CALL&#8217;, lastMessage.tool_calls)<br \/>\n        return &#8220;tools&#8221;;<br \/>\n        }<br \/>\n        \/\/ Otherwise, we stop (reply to the user)<br \/>\n        return &#8220;__end__&#8221;;<br \/>\n    }<\/p>\n<p>    \/\/ Define the function that calls the model<br \/>\n    async function callModel(state: typeof StateAnnotation.State) {<br \/>\n        const messages = state.messages;<br \/>\n        const response = await model.invoke(messages);<\/p>\n<p>        \/\/ We return a list, because this will get added to the existing list<br \/>\n        return { messages: [response] };<br \/>\n    }<\/p>\n<p>    \/\/ Define a new graph<br \/>\n    const workflow = new StateGraph(StateAnnotation)<br \/>\n        .addNode(&#8220;agent&#8221;, callModel)<br \/>\n        .addNode(&#8220;tools&#8221;, toolNode)<br \/>\n        .addEdge(&#8220;__start__&#8221;, &#8220;agent&#8221;)<br \/>\n        .addConditionalEdges(&#8220;agent&#8221;, shouldContinue)<br \/>\n        .addEdge(&#8220;tools&#8221;, &#8220;agent&#8221;);<\/p>\n<p>    \/\/ Initialize memory to persist state between graph runs<br \/>\n    const checkpointer = new MemorySaver();<\/p>\n<p>    \/\/ Finally, we compile it!<br \/>\n    \/\/ This compiles it into a LangChain Runnable.<br \/>\n    \/\/ Note that we&#8217;re (optionally) passing the memory when compiling the graph<br \/>\n    const app = workflow.compile({ checkpointer });<\/p>\n<p>    \/\/ Use the Runnable<br \/>\n    const finalState = await app.invoke(<br \/>\n        {<br \/>\n        messages: [<br \/>\n            new SystemMessage(<br \/>\n            &#8220;Only use the tools available, don&#8217;t answer the question based on pre-trained data&#8221;<br \/>\n            ),<br \/>\n            new HumanMessage(<br \/>\n            &#8220;Search information about the book escape from james patterson&#8221;<br \/>\n            ),<br \/>\n        ],<br \/>\n        },<br \/>\n        { configurable: { thread_id: &#8220;42&#8221; } }<br \/>\n    );<\/p>\n<p>    console.log(finalState.messages[finalState.messages.length &#8211; 1].content);<br \/>\n    \/\/ You can use the `thread_id` to ask follow up questions, the conversation context is retained via the saved state (i.e. stored list of messages):<br \/>\n})();<\/p>\n<p>\u062f\u0631 \u0627\u06cc\u0646 \u0642\u0633\u0645\u062a \u062f\u0648\u0645 \u06a9\u062f\u060c \u0639\u0627\u0645\u0644 \u0627\u06cc\u062c\u0627\u062f \u0645\u06cc \u0634\u0648\u062f \u0648 \u067e\u06cc\u0627\u0645\u06cc \u0631\u0627 \u0628\u0647 \u0639\u0627\u0645\u0644 \u0627\u0631\u0633\u0627\u0644 \u0645\u06cc \u06a9\u0646\u06cc\u0645: &#8220;\u062c\u0633\u062a\u062c\u0648\u06cc \u0627\u0637\u0644\u0627\u0639\u0627\u062a \u0645\u0631\u0628\u0648\u0637 \u0628\u0647 \u06a9\u062a\u0627\u0628 \u0641\u0631\u0627\u0631 \u0627\u0632 \u062c\u06cc\u0645\u0632 \u067e\u062a\u0631\u0633\u0648\u0646&#8221;. \u0627\u06cc\u0646 \u06cc\u06a9 \u0633\u0631\u06cc \u0627\u0632 \u062a\u0639\u0627\u0645\u0644\u0627\u062a \u0628\u06cc\u0646 \u0627\u0628\u0632\u0627\u0631\u0647\u0627\u06cc \u062f\u0631 \u062d\u0627\u0644 \u0627\u062c\u0631\u0627 \u062f\u0631 Flow Engine \u0648 LLM \u062f\u0631 watsonx.ai \u0631\u0627 \u0622\u063a\u0627\u0632 \u0645\u06cc \u06a9\u0646\u062f \u062a\u0627 \u0628\u0647 \u0634\u0645\u0627 \u067e\u0627\u0633\u062e \u062f\u0647\u062f.<\/p>\n<p>\u0628\u0631\u0627\u06cc \u0627\u062c\u0631\u0627\u06cc \u06a9\u062f \u0628\u0627\u0644\u0627 \u0628\u0627\u06cc\u062f a \u0631\u0627 \u0627\u0636\u0627\u0641\u0647 \u06a9\u0646\u06cc\u062f start \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a \u0628\u0647 package.json \u0641\u0627\u06cc\u0644:<\/p>\n<p>&#8220;scripts&#8221;: {<br \/>\n    &#8220;start&#8221;: &#8220;npx tsx .\/index.ts&#8221;,<br \/>\n    &#8220;test&#8221;: &#8220;echo \\&#8221;Error: no test specified\\&#8221; &amp;&amp; exit 1&#8243;<br \/>\n}<\/p>\n<p>\u0628\u0631\u0627\u06cc \u0627\u0631\u0633\u0627\u0644 \u067e\u06cc\u0627\u0645 \u0628\u0647 \u0646\u0645\u0627\u06cc\u0646\u062f\u0647\u060c \u0627\u06a9\u0646\u0648\u0646 \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u062f \u0627\u062c\u0631\u0627 \u06a9\u0646\u06cc\u062f npm start \u0627\u0632 \u062a\u0631\u0645\u06cc\u0646\u0627\u0644\u060c \u06a9\u0647 \u0628\u0627\u06cc\u062f \u0627\u0637\u0644\u0627\u0639\u0627\u062a \u0628\u06cc\u0634\u062a\u0631\u06cc \u062f\u0631 \u0645\u0648\u0631\u062f \u06a9\u062a\u0627\u0628 &#8220;\u0641\u0631\u0627\u0631&#8221; \u0646\u0648\u0634\u062a\u0647 &#8220;\u062c\u06cc\u0645\u0632 \u067e\u062a\u0631\u0633\u0648\u0646&#8221; \u0628\u0647 \u0634\u0645\u0627 \u0627\u0631\u0627\u0626\u0647 \u062f\u0647\u062f. \u062f\u0631 \u06a9\u0646\u0627\u0631 \u0627\u0637\u0644\u0627\u0639\u0627\u062a\u060c \u062a\u0645\u0627\u0633 \u0647\u0627\u06cc \u0627\u0628\u0632\u0627\u0631 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0634\u062f\u0647 \u0646\u06cc\u0632 \u062f\u0631 \u062a\u0631\u0645\u06cc\u0646\u0627\u0644 \u0634\u0645\u0627 \u0686\u0627\u067e \u0645\u06cc \u0634\u0648\u062f.<\/p>\n<p>\u0641\u0631\u0627\u062e\u0648\u0627\u0646\u06cc \u0627\u0628\u0632\u0627\u0631 \u0628\u0647 \u0634\u06a9\u0644 \u0632\u06cc\u0631 \u062e\u0648\u0627\u0647\u062f \u0628\u0648\u062f:<\/p>\n<p>TOOL CALL [<br \/>\n  {<br \/>\n    name: &#8216;google_books&#8217;,<br \/>\n    args: {<br \/>\n      query: &#8216;{\\n&#8217; +<br \/>\n        &#8216;  books(q: &#8220;intitle:escape+inauthor:patterson&#8221;) {\\n&#8217; +<br \/>\n        &#8216;    authors\\n&#8217; +<br \/>\n        &#8216;    title\\n&#8217; +<br \/>\n        &#8216;    volumeId\\n&#8217; +<br \/>\n        &#8216;  }\\n&#8217; +<br \/>\n        &#8216;}&#8217;<br \/>\n    },<br \/>\n    type: &#8216;tool_call&#8217;,<br \/>\n    id: &#8216;Zg9jXPOR2&#8217;<br \/>\n  }<br \/>\n]\n<p>watsonx.ai Flow Engine \u0627\u0632 GraphQL \u0628\u0647 \u0639\u0646\u0648\u0627\u0646 \u0641\u0646\u0627\u0648\u0631\u06cc \u0627\u0633\u0627\u0633\u06cc \u0628\u0631\u0627\u06cc \u062a\u0639\u0631\u06cc\u0641 \u0648 \u0641\u0631\u0627\u062e\u0648\u0627\u0646\u06cc \u0627\u0628\u0632\u0627\u0631\u0647\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc \u06a9\u0646\u062f.<\/p>\n<p>\u0648 \u067e\u0627\u0633\u062e \u0646\u0647\u0627\u06cc\u06cc \u0686\u06cc\u0632\u06cc \u0634\u0628\u06cc\u0647 \u0628\u0647 \u0627\u06cc\u0646 \u0627\u0633\u062a:<\/p>\n<p>### Information about the book &#8220;Escape&#8221; by James Patterson<\/p>\n<p>Here is the information about the book &#8220;Escape&#8221; by James Patterson:<\/p>\n<p>&#8211; **Authors:** James Patterson, David Ellis<br \/>\n&#8211; **Title:** Escape<br \/>\n&#8211; **Volume ID:** EFtHEAAAQBAJ<\/p>\n<p>\u0642\u062f\u0645 \u0628\u0639\u062f\u06cc \u067e\u06cc\u0627\u062f\u0647 \u0633\u0627\u0632\u06cc \u06cc\u06a9 \u0628\u0631\u0646\u0627\u0645\u0647 \u0686\u062a \u0627\u0633\u062a \u06a9\u0647 \u0627\u0632 \u0646\u0642\u0637\u0647 \u067e\u0627\u06cc\u0627\u0646\u06cc Flow Engine \u0648 \u0639\u0627\u0645\u0644 LangGraph \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc \u06a9\u0646\u062f\u060c \u0647\u0645\u0627\u0646\u0637\u0648\u0631 \u06a9\u0647 \u062f\u0631 \u0628\u062e\u0634 \u0628\u0639\u062f\u06cc \u062e\u0648\u0627\u0647\u06cc\u062f \u0622\u0645\u0648\u062e\u062a.<\/p>\n<p>  \u0645\u0631\u062d\u0644\u0647 4: \u0627\u0632 \u0639\u0627\u0645\u0644 \u062f\u0631 \u06cc\u06a9 \u0628\u0631\u0646\u0627\u0645\u0647 \u0686\u062a \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u062f<\/p>\n<p>\u0645\u0631\u062d\u0644\u0647 \u0622\u062e\u0631 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0639\u0627\u0645\u0644 \u0648 \u0627\u0628\u0632\u0627\u0631\u0647\u0627\u06cc \u0627\u0646\u062a\u0647\u0627\u06cc\u06cc \u062f\u0631 \u06cc\u06a9 \u0628\u0631\u0646\u0627\u0645\u0647 \u0686\u062a \u0627\u0633\u062a \u06a9\u0647 \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u062f \u062f\u0631 \u0627\u06cc\u0646 \u0645\u062e\u0632\u0646 \u067e\u06cc\u062f\u0627 \u06a9\u0646\u06cc\u062f.<\/p>\n<p>\u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0633\u0631\u0648\u06cc\u0633 \u0631\u0627\u06cc\u06af\u0627\u0646 StackBlitz \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u062f \u0627\u06cc\u0646 \u0628\u0631\u0646\u0627\u0645\u0647 \u0631\u0627 \u062f\u0631 \u0645\u0631\u0648\u0631\u06af\u0631 \u0627\u062c\u0631\u0627 \u06a9\u0646\u06cc\u062f:<\/p>\n<p>\u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u062f \u0628\u0631\u0646\u0627\u0645\u0647 \u0686\u062a \u0631\u0627 \u062f\u0631 \u0645\u0631\u0648\u0631\u06af\u0631 \u0627\u0632 \u0637\u0631\u06cc\u0642 StackBlitz \u0627\u062c\u0631\u0627 \u06a9\u0646\u06cc\u062f \u06cc\u0627 \u0627\u0632 \u062f\u06a9\u0645\u0647 &#8220;\u062f\u0627\u0646\u0644\u0648\u062f&#8221; \u0628\u0631\u0627\u06cc \u062f\u0627\u0646\u0644\u0648\u062f \u06a9\u062f \u0645\u0646\u0628\u0639 \u0628\u0631\u0646\u0627\u0645\u0647 \u0648 \u0627\u062c\u0631\u0627\u06cc \u0622\u0646 \u0628\u0647 \u0635\u0648\u0631\u062a \u0645\u062d\u0644\u06cc \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u062f.<\/p>\n<p>\u0627\u06cc\u0646 \u0628\u0631\u0646\u0627\u0645\u0647 \u0628\u0647 \u0647\u0645\u0627\u0646 \u0627\u0639\u062a\u0628\u0627\u0631\u0646\u0627\u0645\u0647\u200c\u0647\u0627\u06cc \u0645\u0631\u062d\u0644\u0647 3.3 \u0646\u06cc\u0627\u0632 \u062f\u0627\u0631\u062f \u06a9\u0647 \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u06cc\u062f \u0622\u0646\u200c\u0647\u0627 \u0631\u0627 \u062f\u0631 \u0646\u0633\u062e\u0647 \u062c\u062f\u06cc\u062f \u0630\u062e\u06cc\u0631\u0647 \u06a9\u0646\u06cc\u062f .env \u0641\u0627\u06cc\u0644 \u0645\u0633\u062a\u0642\u06cc\u0645\u0627\u064b \u062f\u0631 StackBlitz \u06cc\u0627 \u0628\u0647 \u0635\u0648\u0631\u062a \u0645\u062d\u0644\u06cc:<\/p>\n<p># You can get these credentials from https:\/\/dataplatform.cloud.ibm.com\/developer-access?context=wx<br \/>\nWATSONX_AI_AUTH_TYPE=iam<br \/>\nWATSONX_AI_ENDPOINT=https:\/\/us-south.ml.cloud.ibm.com<br \/>\nWATSONX_AI_IDENTITY_SERVER=iam.cloud.ibm.com<br \/>\nWATSONX_AI_APIKEY=<br \/>\nWATSONX_AI_PROJECT_ID=<\/p>\n<p># run the command &#8216;wxflows whoami &#8211;apikey&#8217;<br \/>\nWXFLOWS_APIKEY=<\/p>\n<p># endpoint shows in your terminal after running &#8216;wxflows deploy&#8217;<br \/>\nWXFLOWS_ENDPOINT=<\/p>\n<p>    \u0648\u0627\u0631\u062f \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u0634\u0648\u06cc\u062f<\/p>\n<p>    \u0627\u0632 \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u062e\u0627\u0631\u062c \u0634\u0648\u06cc\u062f<\/p>\n<p>\u0627\u06af\u0631 \u0645\u06cc \u062e\u0648\u0627\u0647\u06cc\u062f \u0628\u0631\u0646\u0627\u0645\u0647 \u0631\u0627 \u0628\u0647 \u0635\u0648\u0631\u062a \u0645\u062d\u0644\u06cc \u0627\u062c\u0631\u0627 \u06a9\u0646\u06cc\u062f\u060c \u0627\u062c\u0631\u0627\u06cc \u0622\u0646 \u0631\u0627 \u0641\u0631\u0627\u0645\u0648\u0634 \u0646\u06a9\u0646\u06cc\u062f npm i \u062f\u0631 \u062f\u0627\u06cc\u0631\u06a9\u062a\u0648\u0631\u06cc \u0628\u0631\u0646\u0627\u0645\u0647 \u0628\u0631\u0627\u06cc \u0646\u0635\u0628 \u0648\u0627\u0628\u0633\u062a\u06af\u06cc \u0647\u0627. \u0628\u0639\u062f \u0627\u0632 \u0646\u0635\u0628 \u0627\u06cc\u0646 \u0647\u0627 \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u062f \u0627\u062c\u0631\u0627 \u06a9\u0646\u06cc\u062f npm start \u0628\u0631\u0627\u06cc \u0631\u0627\u0647 \u0627\u0646\u062f\u0627\u0632\u06cc \u0628\u0631\u0646\u0627\u0645\u0647<\/p>\n<p>\u0628\u0631\u0646\u0627\u0645\u0647 \u0686\u062a \u0627\u0632 \u06a9\u062a\u0627\u0628\u062e\u0627\u0646\u0647 \u0645\u0624\u0644\u0641\u0647 \u0647\u0627\u06cc Carbon Chat AI IBM \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc \u06a9\u0646\u062f \u0648 \u0628\u0647 \u0634\u06a9\u0644 \u0632\u06cc\u0631 \u0627\u0633\u062a:<\/p>\n<p>\u0627\u06a9\u0646\u0648\u0646 \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u062f \u0647\u0631 \u0646\u0648\u0639 \u0633\u0648\u0627\u0644\u06cc \u0631\u0627 \u06a9\u0647 \u0645\u0631\u0628\u0648\u0637 \u0628\u0647 \u06a9\u062a\u0627\u0628 \u06cc\u0627 \u0633\u0627\u06cc\u0631 \u0631\u0633\u0627\u0646\u0647 \u0647\u0627\u06cc \u0645\u062d\u0628\u0648\u0628 \u0627\u0633\u062a \u0628\u067e\u0631\u0633\u06cc\u062f. \u0646\u0645\u0627\u06cc\u0646\u062f\u0647 \u0627\u0632 Google Books \u06cc\u0627 \u0627\u0628\u0632\u0627\u0631 Wikipedia \u0627\u0632 watsonx.ai Flow Engine \u0628\u0631\u0627\u06cc \u067e\u0627\u0633\u062e \u0628\u0647 \u0633\u0624\u0627\u0644\u0627\u062a \u0634\u0645\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc \u06a9\u0646\u062f\u060c \u0632\u06cc\u0631\u0627 LangGraph \u0648\u0636\u0639\u06cc\u062a \u062d\u0627\u0641\u0638\u0647 \u0631\u0627 \u062d\u0641\u0638 \u0645\u06cc \u06a9\u0646\u062f \u0648 \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u062f \u0633\u0624\u0627\u0644\u0627\u062a \u0628\u0639\u062f\u06cc \u0631\u0627 \u0646\u06cc\u0632 \u0628\u067e\u0631\u0633\u06cc\u062f. \u06af\u0627\u0645 \u0628\u0639\u062f\u06cc \u0627\u06cc\u0646 \u0627\u0633\u062a \u06a9\u0647 \u062f\u0627\u062f\u0647 \u0647\u0627\u06cc \u062e\u0648\u062f (\u0633\u0627\u0632\u0645\u0627\u0646) \u0631\u0627 \u0628\u0647 \u06cc\u06a9 \u0627\u0628\u0632\u0627\u0631 \u062a\u0628\u062f\u06cc\u0644 \u06a9\u0646\u06cc\u062f\u060c \u06a9\u0647 \u0628\u0631\u0627\u06cc \u0622\u0646 \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u062f \u0628\u0647 \u0627\u06cc\u0646 \u062f\u0633\u062a\u0648\u0631\u0627\u0644\u0639\u0645\u0644 \u0647\u0627 \u0646\u06af\u0627\u0647\u06cc \u0628\u06cc\u0646\u062f\u0627\u0632\u06cc\u062f.<\/p>\n<p>  \u062e\u0644\u0627\u0635\u0647 \u0648 \u0645\u0631\u0627\u062d\u0644 \u0628\u0639\u062f\u06cc<\/p>\n<p>\u0627\u06cc\u0646 \u0622\u0645\u0648\u0632\u0634 \u0628\u0647 \u0634\u0645\u0627 \u0646\u0634\u0627\u0646 \u0645\u06cc \u062f\u0647\u062f \u06a9\u0647 \u0686\u06af\u0648\u0646\u0647 \u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 IBM watsonx.ai Flow Engine \u0648 LangGraph \u06cc\u06a9 \u0639\u0627\u0645\u0644 \u0647\u0648\u0634 \u0645\u0635\u0646\u0648\u0639\u06cc \u0631\u0627 \u0631\u0627\u0647 \u0627\u0646\u062f\u0627\u0632\u06cc \u0648 \u0627\u062c\u0631\u0627 \u06a9\u0646\u06cc\u062f. \u0634\u0645\u0627 \u06cc\u0627\u062f \u06af\u0631\u0641\u062a\u06cc\u062f \u06a9\u0647 \u0686\u06af\u0648\u0646\u0647 \u0627\u0628\u0632\u0627\u0631\u0647\u0627 \u0631\u0627 \u067e\u06cc\u06a9\u0631\u0628\u0646\u062f\u06cc \u06a9\u0646\u06cc\u062f google_books \u0648 wikipedia\u060c \u06cc\u06a9 \u067e\u0631\u0648\u0698\u0647 Flow Engine \u0631\u0627 \u0627\u062c\u0631\u0627 \u06a9\u0646\u06cc\u062f \u0648 \u0628\u0631\u0646\u0627\u0645\u0647 \u0631\u0627 \u0628\u0647 \u0635\u0648\u0631\u062a \u0645\u062d\u0644\u06cc \u06cc\u0627 \u062f\u0631 \u06cc\u06a9 \u0645\u0631\u0648\u0631\u06af\u0631 \u0627\u062c\u0631\u0627 \u06a9\u0646\u06cc\u062f. \u0627\u06cc\u0646 \u0627\u0628\u0632\u0627\u0631\u0647\u0627 \u0639\u0627\u0645\u0644 \u0634\u0645\u0627 \u0631\u0627 \u0642\u0627\u062f\u0631 \u0645\u06cc \u0633\u0627\u0632\u062f \u062a\u0627 \u062f\u0627\u062f\u0647 \u0647\u0627\u06cc \u0628\u0644\u0627\u062f\u0631\u0646\u06af \u0631\u0627 \u0628\u0627\u0632\u06cc\u0627\u0628\u06cc \u06a9\u0646\u062f \u0648 \u0628\u0627 API \u0647\u0627\u06cc \u062e\u0627\u0631\u062c\u06cc \u062a\u0639\u0627\u0645\u0644 \u062f\u0627\u0634\u062a\u0647 \u0628\u0627\u0634\u062f.<\/p>\n<p>\u0628\u0627 \u0627\u06cc\u0646 \u0645\u0647\u0627\u0631\u062a\u200c\u0647\u0627\u06cc \u062c\u062f\u06cc\u062f\u060c \u0627\u06a9\u0646\u0648\u0646 \u067e\u0627\u06cc\u0647\u200c\u0627\u06cc \u0642\u0648\u06cc \u0628\u0631\u0627\u06cc \u0633\u0627\u062e\u062a \u0627\u067e\u0644\u06cc\u06a9\u06cc\u0634\u0646\u200c\u0647\u0627\u06cc \u0645\u0628\u062a\u0646\u06cc \u0628\u0631 \u0647\u0648\u0634 \u0645\u0635\u0646\u0648\u0639\u06cc \u062f\u0627\u0631\u06cc\u062f wxflows \u0648 watsonx.ai. \u0686\u0647 \u062f\u0631 \u062d\u0627\u0644 \u0627\u06cc\u062c\u0627\u062f \u06af\u0631\u062f\u0634 \u06a9\u0627\u0631 \u0633\u0627\u062f\u0647 \u06cc\u0627 \u0627\u062f\u063a\u0627\u0645 \u0647\u0627\u06cc \u067e\u06cc\u0686\u06cc\u062f\u0647 \u062a\u0631 \u0628\u0627\u0634\u06cc\u062f\u060c CLI \u0648 SDK \u0627\u062c\u0631\u0627\u06cc \u067e\u0631\u0648\u0698\u0647 \u0647\u0627\u06cc \u062e\u0648\u062f \u0631\u0627 \u0622\u0633\u0627\u0646 \u0645\u06cc \u06a9\u0646\u0646\u062f.<\/p>\n<p>\u0645\u0627 \u0628\u0631\u0627\u06cc \u062f\u06cc\u062f\u0646 \u0622\u0646\u0686\u0647 \u0634\u0645\u0627 \u0627\u06cc\u062c\u0627\u062f \u0645\u06cc \u06a9\u0646\u06cc\u062f \u0647\u06cc\u062c\u0627\u0646 \u0632\u062f\u0647 \u0647\u0633\u062a\u06cc\u0645! \u0628\u0647 \u0627\u0646\u062c\u0645\u0646 Discord \u0645\u0627 \u0628\u067e\u06cc\u0648\u0646\u062f\u06cc\u062f \u0648 \u067e\u0631\u0648\u0698\u0647 \u0647\u0627\u06cc \u062e\u0648\u062f \u0631\u0627 \u0628\u0627 \u0645\u0627 \u0628\u0647 \u0627\u0634\u062a\u0631\u0627\u06a9 \u0628\u06af\u0630\u0627\u0631\u06cc\u062f!<\/p>\n<div data-article-id=\"2134159\" id=\"article-body\">\n<p>\u0647\u0648\u0634 \u0645\u0635\u0646\u0648\u0639\u06cc \u0645\u0648\u0644\u062f \u0628\u0647 \u0633\u0631\u0639\u062a \u062f\u0631 \u062d\u0627\u0644 \u062a\u06a9\u0627\u0645\u0644 \u0627\u0633\u062a\u060c \u0648 \u062f\u0631 \u0686\u0646\u062f \u0633\u0627\u0644 \u06af\u0630\u0634\u062a\u0647\u060c \u0645\u0627 \u0634\u0627\u0647\u062f \u0686\u0646\u062f \u0627\u0644\u06af\u0648\u06cc \u0648\u0627\u0636\u062d \u0628\u0648\u062f\u0647\u200c\u0627\u06cc\u0645 \u06a9\u0647 \u062a\u0648\u0633\u0639\u0647\u200c\u062f\u0647\u0646\u062f\u06af\u0627\u0646 \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u0646\u062f \u0622\u0646\u200c\u0647\u0627 \u0631\u0627 \u067e\u06cc\u0627\u062f\u0647\u200c\u0633\u0627\u0632\u06cc \u06a9\u0646\u0646\u062f \u2013 \u0627\u0632 \u062f\u0633\u062a\u0648\u0631 \u0633\u0627\u062f\u0647 \u0634\u0631\u0648\u0639\u060c \u0628\u0647 \u0633\u0645\u062a Retrieval Augmented Generation (RAG)\u060c \u0648 \u0627\u06a9\u0646\u0648\u0646 Tool Calling \u0648 Agents. \u0627\u06cc\u062c\u0627\u062f \u0628\u0631\u0646\u0627\u0645\u0647 \u0647\u0627\u06cc \u06a9\u0627\u0631\u0628\u0631\u062f\u06cc \u062f\u0631 \u0627\u0637\u0631\u0627\u0641 Agent \u0647\u0627 \u0627\u063a\u0644\u0628 \u0634\u0627\u0645\u0644 \u0627\u062a\u0635\u0627\u0644 \u0627\u0628\u0632\u0627\u0631\u0647\u0627\u060c \u0645\u062f\u0644 \u0647\u0627 \u0648 API \u0647\u0627\u06cc \u0645\u062e\u062a\u0644\u0641 \u0627\u0633\u062a.<\/p>\n<p>\u062f\u0631 \u0627\u06cc\u0646 \u0622\u0645\u0648\u0632\u0634\u060c \u0646\u062d\u0648\u0647 \u0631\u0627\u0647\u200c\u0627\u0646\u062f\u0627\u0632\u06cc \u0648 \u0627\u062c\u0631\u0627\u06cc \u06cc\u06a9 \u0639\u0627\u0645\u0644 \u0647\u0648\u0634 \u0645\u0635\u0646\u0648\u0639\u06cc \u0631\u0627 \u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 watsonx.ai Flow Engine \u0648 LangGraph\u060c \u0628\u0627 \u06a9\u0645\u06a9 \u0645\u062f\u0644\u200c\u0647\u0627\u06cc\u06cc \u06a9\u0647 \u062a\u0648\u0633\u0637 \u067e\u0644\u062a\u0641\u0631\u0645 watsonx.ai IBM \u0627\u0631\u0627\u0626\u0647 \u0645\u06cc\u200c\u0634\u0648\u0646\u062f\u060c \u062e\u0648\u0627\u0647\u06cc\u062f \u0622\u0645\u0648\u062e\u062a. \u0627\u06cc\u0646 \u0631\u0627\u0647\u0646\u0645\u0627 \u0634\u0645\u0627 \u0631\u0627 \u0642\u062f\u0645 \u0628\u0647 \u0642\u062f\u0645 \u0627\u0632 \u0637\u0631\u06cc\u0642 \u0646\u0635\u0628 \u0627\u0628\u0632\u0627\u0631\u0647\u0627\u06cc \u0645\u0648\u0631\u062f \u0646\u06cc\u0627\u0632\u060c \u0627\u0633\u062a\u0642\u0631\u0627\u0631 \u0627\u0628\u0632\u0627\u0631\u0647\u0627\u06cc \u062e\u0648\u062f \u062f\u0631 Flow Engine \u0648 \u0627\u062c\u0631\u0627\u06cc \u06cc\u06a9 \u0628\u0631\u0646\u0627\u0645\u0647 \u0686\u062a \u0628\u0631 \u0631\u0648\u06cc \u062f\u0633\u062a\u06af\u0627\u0647 \u062e\u0648\u062f \u0631\u0627\u0647\u0646\u0645\u0627\u06cc\u06cc \u0645\u06cc \u06a9\u0646\u062f.<\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_81 counter-hierarchy ez-toc-counter-rtl ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">\u0641\u0647\u0631\u0633\u062a \u0645\u0637\u0627\u0644\u0628<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/nabfollower.com\/blog\/build-tool-calling-agents-with-langgraph-and-watsonxai-flows-engine-230c\/#%D8%AA%D9%85%D8%A7%D8%B3_%D8%A8%D8%A7_%D8%A7%D8%A8%D8%B2%D8%A7%D8%B1_%D9%88_%D9%86%D9%85%D8%A7%DB%8C%D9%86%D8%AF%DA%AF%D8%A7%D9%86\" >\u062a\u0645\u0627\u0633 \u0628\u0627 \u0627\u0628\u0632\u0627\u0631 \u0648 \u0646\u0645\u0627\u06cc\u0646\u062f\u06af\u0627\u0646<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/nabfollower.com\/blog\/build-tool-calling-agents-with-langgraph-and-watsonxai-flows-engine-230c\/#%DB%8C%DA%A9_%D8%B9%D8%A7%D9%85%D9%84_%D8%AA%D9%85%D8%A7%D8%B3_%D8%A8%D8%A7_%D8%A7%D8%A8%D8%B2%D8%A7%D8%B1_%D8%A8%D8%B3%D8%A7%D8%B2%DB%8C%D8%AF\" >\u06cc\u06a9 \u0639\u0627\u0645\u0644 \u062a\u0645\u0627\u0633 \u0628\u0627 \u0627\u0628\u0632\u0627\u0631 \u0628\u0633\u0627\u0632\u06cc\u062f<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/nabfollower.com\/blog\/build-tool-calling-agents-with-langgraph-and-watsonxai-flows-engine-230c\/#%D9%BE%DB%8C%D8%B4_%D9%86%DB%8C%D8%A7%D8%B2%D9%87%D8%A7\" >\u067e\u06cc\u0634 \u0646\u06cc\u0627\u0632\u0647\u0627<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/nabfollower.com\/blog\/build-tool-calling-agents-with-langgraph-and-watsonxai-flows-engine-230c\/#%D9%85%D8%B1%D8%AD%D9%84%D9%87_1_%D9%86%D8%B5%D8%A8_%DA%A9%D9%86%DB%8C%D8%AF_wxflows_CLI\" >\u0645\u0631\u062d\u0644\u0647 1: \u0646\u0635\u0628 \u06a9\u0646\u06cc\u062f wxflows CLI<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/nabfollower.com\/blog\/build-tool-calling-agents-with-langgraph-and-watsonxai-flows-engine-230c\/#%D9%85%D8%B1%D8%AD%D9%84%D9%87_2_%DB%8C%DA%A9_%D9%BE%D8%B1%D9%88%DA%98%D9%87_watsonxai_Flow_Engine_%D8%B1%D8%A7_%D8%B1%D8%A7%D9%87_%D8%A7%D9%86%D8%AF%D8%A7%D8%B2%DB%8C_%DA%A9%D9%86%DB%8C%D8%AF\" >\u0645\u0631\u062d\u0644\u0647 2: \u06cc\u06a9 \u067e\u0631\u0648\u0698\u0647 watsonx.ai Flow Engine \u0631\u0627 \u0631\u0627\u0647 \u0627\u0646\u062f\u0627\u0632\u06cc \u06a9\u0646\u06cc\u062f<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/nabfollower.com\/blog\/build-tool-calling-agents-with-langgraph-and-watsonxai-flows-engine-230c\/#%D9%85%D8%B1%D8%AD%D9%84%D9%87_3_%D8%A7%D8%B2_LangGraph_%D8%A8%D8%B1%D8%A7%DB%8C_%D8%A7%DB%8C%D8%AC%D8%A7%D8%AF_%DB%8C%DA%A9_%D8%B9%D8%A7%D9%85%D9%84_%D8%A7%D8%B3%D8%AA%D9%81%D8%A7%D8%AF%D9%87_%DA%A9%D9%86%DB%8C%D8%AF\" >\u0645\u0631\u062d\u0644\u0647 3: \u0627\u0632 LangGraph \u0628\u0631\u0627\u06cc \u0627\u06cc\u062c\u0627\u062f \u06cc\u06a9 \u0639\u0627\u0645\u0644 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u062f<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/nabfollower.com\/blog\/build-tool-calling-agents-with-langgraph-and-watsonxai-flows-engine-230c\/#%D9%85%D8%B1%D8%AD%D9%84%D9%87_4_%D8%A7%D8%B2_%D8%B9%D8%A7%D9%85%D9%84_%D8%AF%D8%B1_%DB%8C%DA%A9_%D8%A8%D8%B1%D9%86%D8%A7%D9%85%D9%87_%DA%86%D8%AA_%D8%A7%D8%B3%D8%AA%D9%81%D8%A7%D8%AF%D9%87_%DA%A9%D9%86%DB%8C%D8%AF\" >\u0645\u0631\u062d\u0644\u0647 4: \u0627\u0632 \u0639\u0627\u0645\u0644 \u062f\u0631 \u06cc\u06a9 \u0628\u0631\u0646\u0627\u0645\u0647 \u0686\u062a \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u062f<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/nabfollower.com\/blog\/build-tool-calling-agents-with-langgraph-and-watsonxai-flows-engine-230c\/#%D8%AE%D9%84%D8%A7%D8%B5%D9%87_%D9%88_%D9%85%D8%B1%D8%A7%D8%AD%D9%84_%D8%A8%D8%B9%D8%AF%DB%8C\" >\u062e\u0644\u0627\u0635\u0647 \u0648 \u0645\u0631\u0627\u062d\u0644 \u0628\u0639\u062f\u06cc<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"%D8%AA%D9%85%D8%A7%D8%B3_%D8%A8%D8%A7_%D8%A7%D8%A8%D8%B2%D8%A7%D8%B1_%D9%88_%D9%86%D9%85%D8%A7%DB%8C%D9%86%D8%AF%DA%AF%D8%A7%D9%86\"><\/span>\n<p>  \u062a\u0645\u0627\u0633 \u0628\u0627 \u0627\u0628\u0632\u0627\u0631 \u0648 \u0646\u0645\u0627\u06cc\u0646\u062f\u06af\u0627\u0646<br \/>\n<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>\u0641\u0631\u0627\u062e\u0648\u0627\u0646\u06cc \u0627\u0628\u0632\u0627\u0631 \u0628\u0647 \u0645\u062f\u0644 \u0647\u0627\u06cc \u0632\u0628\u0627\u0646 \u0628\u0632\u0631\u06af (LLM) \u0627\u062c\u0627\u0632\u0647 \u0645\u06cc \u062f\u0647\u062f \u062a\u0627 \u0628\u0627 \u067e\u06cc\u0631\u0648\u06cc \u0627\u0632 \u062f\u0633\u062a\u0648\u0631\u0627\u0644\u0639\u0645\u0644 \u0647\u0627\u06cc \u062a\u0639\u0631\u06cc\u0641 \u0634\u062f\u0647 \u062a\u0648\u0633\u0637 \u06a9\u0627\u0631\u0628\u0631\u060c \u0628\u0627 \u0627\u0628\u0632\u0627\u0631\u0647\u0627\u06cc \u062e\u0627\u0631\u062c\u06cc \u06a9\u0627\u0631 \u06a9\u0646\u0646\u062f. \u0645\u062f\u0644 \u0648\u0631\u0648\u062f\u06cc \u0647\u0627\u06cc \u0645\u0648\u0631\u062f \u0646\u06cc\u0627\u0632 \u06cc\u06a9 \u0627\u0628\u0632\u0627\u0631 \u0631\u0627 \u0645\u0634\u062e\u0635 \u0645\u06cc \u06a9\u0646\u062f \u0648 \u0627\u0628\u0632\u0627\u0631 \u06a9\u0627\u0631 \u0648\u0627\u0642\u0639\u06cc \u0631\u0627 \u0627\u0646\u062c\u0627\u0645 \u0645\u06cc \u062f\u0647\u062f. \u0627\u06cc\u0646 \u0628\u0631\u0627\u06cc \u062a\u0628\u062f\u06cc\u0644 \u062f\u0627\u062f\u0647 \u0647\u0627\u06cc \u0645\u0648\u062c\u0648\u062f \u0628\u0647 \u0627\u0637\u0644\u0627\u0639\u0627\u062a \u0633\u0627\u062e\u062a\u0627\u0631\u06cc\u0627\u0641\u062a\u0647 \u06cc\u0627 \u067e\u06cc\u0648\u0646\u062f \u062f\u0627\u062f\u0646 \u0627\u0628\u0632\u0627\u0631\u0647\u0627 \u0628\u0647 \u06af\u0631\u062f\u0634 \u06a9\u0627\u0631 \u0639\u0627\u0644\u06cc \u0627\u0633\u062a. Flow Engine \u0628\u0627 \u0627\u0631\u0627\u0626\u0647 \u0631\u0627\u0647\u200c\u0647\u0627\u06cc\u06cc \u0628\u0631\u0627\u06cc \u062a\u0628\u062f\u06cc\u0644 \u0645\u0646\u0627\u0628\u0639 \u062f\u0627\u062f\u0647 \u0645\u0648\u062c\u0648\u062f \u0645\u0627\u0646\u0646\u062f \u067e\u0627\u06cc\u06af\u0627\u0647\u200c\u0647\u0627\u06cc \u062f\u0627\u062f\u0647 \u0648 API\u0647\u0627 \u0628\u0647 \u0627\u0628\u0632\u0627\u0631 \u0648 \u0627\u062a\u0635\u0627\u0644 \u0628\u0647 \u0627\u06cc\u0646 \u0627\u0628\u0632\u0627\u0631\u0647\u0627 \u0627\u0632 \u0686\u0627\u0631\u0686\u0648\u0628\u200c\u0647\u0627\u06cc \u0645\u062e\u062a\u0644\u0641 \u0628\u0631\u0627\u06cc \u0633\u0627\u062e\u062a \u0628\u0631\u0646\u0627\u0645\u0647\u200c\u0647\u0627\u06cc \u0647\u0648\u0634 \u0645\u0635\u0646\u0648\u0639\u06cc \u0645\u0627\u0646\u0646\u062f LangChain \u0648 LangGraph\u060c \u0627\u06cc\u0646 \u0641\u0631\u0622\u06cc\u0646\u062f \u0631\u0627 \u0622\u0633\u0627\u0646\u200c\u062a\u0631 \u0645\u06cc\u200c\u06a9\u0646\u062f.<\/p>\n<p>Agent \u0647\u0627 \u0645\u0627\u0646\u0646\u062f \u06a9\u0645\u06a9 \u0647\u0627\u06cc \u0647\u0648\u0634 \u0645\u0635\u0646\u0648\u0639\u06cc \u0647\u0633\u062a\u0646\u062f \u06a9\u0647 \u0628\u0631\u0627\u06cc \u0627\u0646\u062c\u0627\u0645 \u0648\u0638\u0627\u06cc\u0641 \u062e\u0627\u0635 \u0633\u0627\u062e\u062a\u0647 \u0634\u062f\u0647 \u0627\u0646\u062f \u0648 \u0628\u0631\u0627\u06cc \u062a\u06a9\u0645\u06cc\u0644 \u0627\u06cc\u0646 \u06af\u0641\u062a\u06af\u0648\u0647\u0627 \u0628\u0647 \u0641\u0631\u0627\u062e\u0648\u0627\u0646\u06cc \u0627\u0628\u0632\u0627\u0631 \u062a\u06a9\u06cc\u0647 \u0645\u06cc \u06a9\u0646\u0646\u062f. \u0627\u06cc\u0646 \u0628\u0647 \u0622\u0646\u0647\u0627 \u0627\u062c\u0627\u0632\u0647 \u0645\u06cc \u062f\u0647\u062f \u062a\u0627 \u0628\u0647 \u0627\u0628\u0632\u0627\u0631\u0647\u0627\u06cc \u062e\u0627\u0631\u062c\u06cc \u062f\u0633\u062a\u0631\u0633\u06cc \u062f\u0627\u0634\u062a\u0647 \u0628\u0627\u0634\u0646\u062f\u060c \u0627\u0637\u0644\u0627\u0639\u0627\u062a \u0631\u0627 \u067e\u0631\u062f\u0627\u0632\u0634 \u06a9\u0646\u0646\u062f \u0648 \u062f\u0627\u0646\u0634 \u0645\u0648\u062c\u0648\u062f \u062f\u0631 LLM \u0631\u0627 \u0645\u062a\u0646\u0627\u0633\u0628 \u0628\u0627 \u0646\u06cc\u0627\u0632\u0647\u0627\u06cc \u06a9\u0627\u0631\u0628\u0631 \u06af\u0633\u062a\u0631\u0634 \u062f\u0647\u0646\u062f. \u0686\u0646\u062f\u06cc\u0646 \u0641\u0631\u06cc\u0645\u0648\u0631\u06a9 \u0645\u062d\u0628\u0648\u0628 \u0628\u0631\u0627\u06cc \u0633\u0627\u062e\u062a \u0639\u0648\u0627\u0645\u0644 \u0648\u062c\u0648\u062f \u062f\u0627\u0631\u062f\u060c \u0686\u0647 \u062f\u0631 \u062c\u0627\u0648\u0627 \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a \u0648 \u0686\u0647 \u062f\u0631 \u067e\u0627\u06cc\u062a\u0648\u0646. \u062f\u0631 \u0627\u06cc\u0646 \u0622\u0645\u0648\u0632\u0634 \u0645\u0627 \u0627\u0632 LangGraph \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc \u06a9\u0646\u06cc\u0645 \u06a9\u0647 \u0628\u0631 \u0627\u0633\u0627\u0633 LangChain \u0633\u0627\u062e\u062a\u0647 \u0634\u062f\u0647 \u0627\u0633\u062a \u062a\u0627 \u0639\u0627\u0645\u0644\u06cc \u0627\u06cc\u062c\u0627\u062f \u06a9\u0646\u06cc\u0645 \u06a9\u0647 \u0642\u0627\u062f\u0631 \u0628\u0647 \u0641\u0631\u0627\u062e\u0648\u0627\u0646\u06cc \u0627\u0628\u0632\u0627\u0631\u0647\u0627\u06cc\u06cc \u0627\u0633\u062a \u06a9\u0647 \u0645\u06cc \u062a\u0648\u0627\u0646\u0646\u062f \u0627\u0637\u0644\u0627\u0639\u0627\u062a \u0631\u0627 \u0627\u0632 Google Books \u0648 Wikipedia \u0628\u0627\u0632\u06cc\u0627\u0628\u06cc \u06a9\u0646\u0646\u062f. \u0647\u0645\u0627\u0646\u0637\u0648\u0631 \u06a9\u0647 \u062f\u0631 \u0628\u062e\u0634 \u0628\u0639\u062f\u06cc \u062e\u0648\u0627\u0647\u06cc\u062f \u0622\u0645\u0648\u062e\u062a\u060c \u0627\u0628\u0632\u0627\u0631\u0647\u0627 \u062f\u0631 Flow Engine \u062a\u0639\u0631\u06cc\u0641 \u0645\u06cc \u0634\u0648\u0646\u062f \u0648 \u0627\u0632 \u0637\u0631\u06cc\u0642 JavaScript SDK \u0645\u062a\u0635\u0644 \u0645\u06cc \u0634\u0648\u0646\u062f.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"%DB%8C%DA%A9_%D8%B9%D8%A7%D9%85%D9%84_%D8%AA%D9%85%D8%A7%D8%B3_%D8%A8%D8%A7_%D8%A7%D8%A8%D8%B2%D8%A7%D8%B1_%D8%A8%D8%B3%D8%A7%D8%B2%DB%8C%D8%AF\"><\/span>\n<p>  \u06cc\u06a9 \u0639\u0627\u0645\u0644 \u062a\u0645\u0627\u0633 \u0628\u0627 \u0627\u0628\u0632\u0627\u0631 \u0628\u0633\u0627\u0632\u06cc\u062f<br \/>\n<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>\u062f\u0631 \u0627\u06cc\u0646 \u0628\u062e\u0634 \u0646\u062d\u0648\u0647 \u0631\u0627\u0647 \u0627\u0646\u062f\u0627\u0632\u06cc \u0648 \u0627\u062c\u0631\u0627\u06cc \u06cc\u06a9 \u0639\u0627\u0645\u0644 \u0647\u0648\u0634 \u0645\u0635\u0646\u0648\u0639\u06cc \u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 watsonx.ai Flow Engine (<code>wxflows<\/code>) \u0648 LangGraph. \u0646\u0645\u0627\u06cc\u0646\u062f\u0647 \u0642\u0627\u062f\u0631 \u062e\u0648\u0627\u0647\u062f \u0628\u0648\u062f \u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0645\u062c\u0645\u0648\u0639\u0647 \u0627\u06cc \u0627\u0632 \u0627\u0628\u0632\u0627\u0631\u0647\u0627\u06cc \u0627\u0632 \u067e\u06cc\u0634 \u0633\u0627\u062e\u062a\u0647 \u0634\u062f\u0647 \u0627\u0646\u062c\u0645\u0646\u060c \u0628\u0627 \u0686\u0646\u062f\u06cc\u0646 \u0627\u0628\u0632\u0627\u0631 \u062a\u0645\u0627\u0633 \u0628\u06af\u06cc\u0631\u062f \u062a\u0627 \u0628\u0647 \u0633\u0624\u0627\u0644\u0627\u062a \u0645\u0631\u0628\u0648\u0637 \u0628\u0647 \u06a9\u062a\u0627\u0628 \u0647\u0627\u06cc \u0645\u0648\u0631\u062f \u0639\u0644\u0627\u0642\u0647 \u06cc\u0627 \u0633\u0627\u06cc\u0631 \u0631\u0633\u0627\u0646\u0647 \u0647\u0627\u06cc \u0645\u062d\u0628\u0648\u0628 \u0634\u0645\u0627 \u067e\u0627\u0633\u062e \u062f\u0647\u062f. \u0627\u0644\u0628\u062a\u0647\u060c \u0634\u0645\u0627 \u0647\u0645\u0686\u0646\u06cc\u0646 \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u062f \u0645\u0646\u0627\u0628\u0639 \u062f\u0627\u062f\u0647 \u062e\u0648\u062f (\u0645\u0627\u0646\u0646\u062f \u067e\u0627\u06cc\u06af\u0627\u0647 \u062f\u0627\u062f\u0647 \u0647\u0627 \u0648 API \u0647\u0627) \u0631\u0627 \u0628\u0647 \u0627\u0628\u0632\u0627\u0631 \u062a\u0628\u062f\u06cc\u0644 \u06a9\u0646\u06cc\u062f. \u0645\u0627 \u0647\u0645\u0647 \u0686\u06cc\u0632\u0647\u0627\u06cc\u06cc \u0631\u0627 \u06a9\u0647 \u0628\u0627\u06cc\u062f \u0628\u062f\u0627\u0646\u06cc\u062f\u060c \u0627\u0632 \u0646\u0635\u0628 \u0627\u0628\u0632\u0627\u0631\u0647\u0627 \u06af\u0631\u0641\u062a\u0647 \u062a\u0627 \u0627\u0633\u062a\u0642\u0631\u0627\u0631 \u0648 \u0627\u062c\u0631\u0627\u06cc \u0628\u0631\u0646\u0627\u0645\u0647 \u062f\u0631 \u062f\u0633\u062a\u06af\u0627\u0647\u062a\u0627\u0646 \u0631\u0627 \u067e\u0648\u0634\u0634 \u062e\u0648\u0627\u0647\u06cc\u0645 \u062f\u0627\u062f.<\/p>\n<p>\u0627\u06cc\u0646 \u0645\u062b\u0627\u0644 \u0634\u0627\u0645\u0644 \u0641\u0646\u0627\u0648\u0631\u06cc \u0647\u0627\u06cc \u0632\u06cc\u0631 \u0627\u0633\u062a:<\/p>\n<ul>\n<li>LangGraph SDK (\u0628\u0631\u0627\u06cc \u0639\u0627\u0645\u0644)<\/li>\n<li>\u067e\u0633\u0648\u0646\u062f LangChain SDK watsonx.ai (\u0628\u0631\u0627\u06cc \u0645\u062f\u0644 \u0647\u0627)<\/li>\n<li>\n<code>wxflows<\/code>  SDK (\u0628\u0631\u0627\u06cc \u0627\u0628\u0632\u0627\u0631\u0647\u0627)<\/li>\n<li>Carbon AI Chat (\u0628\u0631\u0627\u06cc \u0631\u0627\u0628\u0637 \u06a9\u0627\u0631\u0628\u0631\u06cc)<\/li>\n<\/ul>\n<blockquote>\n<p>\u0645\u0627 \u0627\u0632 \u0645\u062f\u0644 \u0686\u062a watsonx.ai \u0627\u0632 LangChain \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u062e\u0648\u0627\u0647\u06cc\u0645 \u06a9\u0631\u062f\u060c \u0627\u0645\u0627 \u0634\u0645\u0627 \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u062f \u0627\u0632 \u0647\u0631 \u06cc\u06a9 \u0627\u0632 \u0645\u062f\u0644 \u0647\u0627\u06cc \u0686\u062a \u067e\u0634\u062a\u06cc\u0628\u0627\u0646\u06cc \u0634\u062f\u0647 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u062f.<\/p>\n<\/blockquote>\n<p><\/p>\n<p>\u0628\u0631\u0627\u06cc \u0634\u0631\u0648\u0639 \u0646\u0635\u0628 \u0628\u0647 \u0628\u062e\u0634 \u0628\u0639\u062f\u06cc \u0628\u0631\u0648\u06cc\u062f <code>wxflows<\/code> CLI\u060c \u067e\u0631\u0648\u0698\u0647 Flow Engine \u062e\u0648\u062f \u0631\u0627 \u0631\u0627\u0647 \u0627\u0646\u062f\u0627\u0632\u06cc \u06a9\u0646\u06cc\u062f \u0648 \u0639\u0627\u0645\u0644 \u0631\u0627 \u0627\u0632 \u0637\u0631\u06cc\u0642 \u06cc\u06a9 \u0628\u0631\u0646\u0627\u0645\u0647 \u0686\u062a \u0627\u062c\u0631\u0627 \u06a9\u0646\u06cc\u062f. \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u062e\u0648\u0627\u0647\u06cc\u0645 \u06a9\u0631\u062f <code>google_books<\/code> \u0648 <code>wikipedia<\/code> \u0628\u0647 \u0639\u0646\u0648\u0627\u0646 \u0646\u0645\u0648\u0646\u0647 \u0647\u0627\u06cc\u06cc \u0627\u0632 \u0627\u0628\u0632\u0627\u0631\u0647\u0627\u06cc\u06cc \u06a9\u0647 \u0646\u0645\u0627\u06cc\u0646\u062f\u0647 \u0645\u06cc \u062a\u0648\u0627\u0646\u062f \u0622\u0646\u0647\u0627 \u0631\u0627 \u0641\u0631\u0627\u062e\u0648\u0627\u0646\u06cc \u06a9\u0646\u062f.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"%D9%BE%DB%8C%D8%B4_%D9%86%DB%8C%D8%A7%D8%B2%D9%87%D8%A7\"><\/span>\n<p>  \u067e\u06cc\u0634 \u0646\u06cc\u0627\u0632\u0647\u0627<br \/>\n<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\u0642\u0628\u0644 \u0627\u0632 \u0634\u0631\u0648\u0639\u060c \u0628\u0627\u06cc\u062f \u06cc\u06a9 \u062d\u0633\u0627\u0628 \u06a9\u0627\u0631\u0628\u0631\u06cc \u0628\u0631\u0627\u06cc watsonx.ai Flow Engine \u0628\u0631\u0627\u06cc \u0627\u06cc\u0646 \u0622\u0645\u0648\u0632\u0634 \u0627\u06cc\u062c\u0627\u062f \u06a9\u0646\u06cc\u062f:<\/p>\n<h3><span class=\"ez-toc-section\" id=\"%D9%85%D8%B1%D8%AD%D9%84%D9%87_1_%D9%86%D8%B5%D8%A8_%DA%A9%D9%86%DB%8C%D8%AF_wxflows_CLI\"><\/span>\n<p>  \u0645\u0631\u062d\u0644\u0647 1: \u0646\u0635\u0628 \u06a9\u0646\u06cc\u062f <code>wxflows<\/code> CLI<br \/>\n<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\u0628\u0627 \u0646\u0635\u0628 \u0634\u0631\u0648\u0639 \u06a9\u0646\u06cc\u062f <code>wxflows<\/code> CLI\u060c \u06a9\u0647 \u0628\u0631\u0627\u06cc \u0646\u0635\u0628 \u067e\u0627\u06cc\u062a\u0648\u0646 (\u0646\u0633\u062e\u0647 3.8 \u06cc\u0627 \u0628\u0627\u0644\u0627\u062a\u0631) \u0631\u0648\u06cc \u062f\u0633\u062a\u06af\u0627\u0647 \u0645\u0627 \u0646\u06cc\u0627\u0632 \u062f\u0627\u0631\u062f. \u0627\u06cc\u0646 \u0645\u0631\u0627\u062d\u0644 \u0631\u0627 \u062f\u0646\u0628\u0627\u0644 \u06a9\u0646\u06cc\u062f:<\/p>\n<ol>\n<li>\n<p>CLI \u0631\u0627 \u0627\u0632 \u0635\u0641\u062d\u0647 \u0646\u0635\u0628 \u062f\u0627\u0646\u0644\u0648\u062f \u06a9\u0646\u06cc\u062f.<\/p>\n<\/li>\n<li>\n<p>\u06cc\u06a9 \u067e\u0648\u0634\u0647 \u062c\u062f\u06cc\u062f \u062f\u0631 \u0631\u0627\u06cc\u0627\u0646\u0647 \u062e\u0648\u062f \u0627\u06cc\u062c\u0627\u062f \u06a9\u0646\u06cc\u062f.<\/p>\n<pre class=\"highlight shell\"><code><span class=\"nb\">mkdir <\/span>wxflows-project\n<span class=\"nb\">cd <\/span>wxflows-project\n<\/code><\/pre>\n<\/li>\n<li>\n<p>\u062f\u0631 \u062f\u0627\u062e\u0644 \u0627\u06cc\u0646 \u067e\u0648\u0634\u0647\u060c \u0627\u062c\u0631\u0627 \u06a9\u0646\u06cc\u062f:<\/p>\n<pre class=\"highlight shell\"><code>pip <span class=\"nb\">install <\/span>wxflows_cli-1.0.0rc192-py3-none-any.whl <span class=\"nt\">--force-reinstall<\/span>\n<\/code><\/pre>\n<p>\u0627\u0632 \u0646\u0627\u0645 \u062f\u0642\u06cc\u0642 \u0622\u0646 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u062f <code>.whl<\/code> \u0641\u0627\u06cc\u0644\u06cc \u06a9\u0647 \u062f\u0627\u0646\u0644\u0648\u062f \u06a9\u0631\u062f\u06cc\u062f<\/p>\n<\/li>\n<li>\n<p>\u0628\u0627 \u062f\u0646\u0628\u0627\u0644 \u06a9\u0631\u062f\u0646 \u062f\u0633\u062a\u0648\u0631\u0627\u0644\u0639\u0645\u0644 \u0647\u0627\u06cc \u0648\u0631\u0648\u062f \u0628\u0647 CLI \u0648\u0627\u0631\u062f \u0634\u0648\u06cc\u062f.<\/p>\n<pre class=\"highlight shell\"><code>wxflows login\n<\/code><\/pre>\n<\/li>\n<\/ol>\n<p>\u067e\u0633 \u0627\u0632 \u0631\u0627\u0647\u200c\u0627\u0646\u062f\u0627\u0632\u06cc CLI \u0628\u0631\u0627\u06cc watsonx.ai Flow Engine\u060c \u0627\u062c\u0627\u0632\u0647 \u062f\u0647\u06cc\u062f \u0628\u0647 \u0628\u062e\u0634 \u0628\u0639\u062f\u06cc \u0627\u062f\u0627\u0645\u0647 \u062f\u0647\u06cc\u0645 \u0648 \u0628\u0627 \u0627\u0628\u0632\u0627\u0631\u0647\u0627\u06cc Wikipedia \u0648 Google Books \u06cc\u06a9 \u0646\u0642\u0637\u0647 \u067e\u0627\u06cc\u0627\u0646\u06cc \u0627\u06cc\u062c\u0627\u062f \u06a9\u0646\u06cc\u0645.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"%D9%85%D8%B1%D8%AD%D9%84%D9%87_2_%DB%8C%DA%A9_%D9%BE%D8%B1%D9%88%DA%98%D9%87_watsonxai_Flow_Engine_%D8%B1%D8%A7_%D8%B1%D8%A7%D9%87_%D8%A7%D9%86%D8%AF%D8%A7%D8%B2%DB%8C_%DA%A9%D9%86%DB%8C%D8%AF\"><\/span>\n<p>  \u0645\u0631\u062d\u0644\u0647 2: \u06cc\u06a9 \u067e\u0631\u0648\u0698\u0647 watsonx.ai Flow Engine \u0631\u0627 \u0631\u0627\u0647 \u0627\u0646\u062f\u0627\u0632\u06cc \u06a9\u0646\u06cc\u062f<br \/>\n<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\u062d\u0627\u0644\u0627\u060c \u0631\u0627\u0647 \u0627\u0646\u062f\u0627\u0632\u06cc \u062c\u062f\u06cc\u062f <code>wxflows<\/code> \u067e\u0631\u0648\u0698\u0647 \u0627\u06cc\u0646 \u0634\u0627\u0645\u0644 \u062f\u0648 \u0627\u0628\u0632\u0627\u0631 \u062e\u0648\u0627\u0647\u062f \u0628\u0648\u062f:<\/p>\n<ul>\n<li>\n<strong><code>google_books<\/code><\/strong>: \u0628\u0631\u0627\u06cc \u062c\u0633\u062a\u062c\u0648 \u0648 \u0628\u0627\u0632\u06cc\u0627\u0628\u06cc \u0627\u0637\u0644\u0627\u0639\u0627\u062a \u0627\u0632 Google Books \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc \u0634\u0648\u062f.<\/li>\n<li>\n<strong><code>wikipedia<\/code><\/strong>: \u0628\u0631\u0627\u06cc \u067e\u0631\u0633 \u0648 \u062c\u0648 \u0648 \u0628\u0627\u0632\u06cc\u0627\u0628\u06cc \u0627\u0637\u0644\u0627\u0639\u0627\u062a \u0627\u0632 \u0648\u06cc\u06a9\u06cc \u067e\u062f\u06cc\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc \u0634\u0648\u062f.<\/li>\n<\/ul>\n<p>\u062f\u0633\u062a\u0648\u0631 \u0632\u06cc\u0631 \u0631\u0627 \u0628\u0631\u0627\u06cc \u0645\u0642\u062f\u0627\u0631\u062f\u0647\u06cc \u0627\u0648\u0644\u06cc\u0647 \u067e\u0631\u0648\u0698\u0647 \u0648 \u0648\u0627\u0631\u062f \u06a9\u0631\u062f\u0646 \u0627\u06cc\u0646 \u0627\u0628\u0632\u0627\u0631\u0647\u0627 \u0627\u062c\u0631\u0627 \u06a9\u0646\u06cc\u062f:<\/p>\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight shell\"><code>wxflows init <span class=\"nt\">--endpoint-name<\/span> api\/wxflows-toolcalling <span class=\"se\">\\<\/span>\n<span class=\"nt\">--import-name<\/span> google_books <span class=\"nt\">--import-package<\/span> https:\/\/github.com\/IBM\/wxflows\/raw\/refs\/heads\/main\/tools\/google_books.zip <span class=\"se\">\\<\/span>\n<span class=\"nt\">--import-tool-name<\/span> google_books <span class=\"nt\">--import-tool-description<\/span> <span class=\"s2\">\"Retrieve information from Google Books. Find books by search string, for example to search for Daniel Keyes 'Flowers for Algernon' use q: 'intitle:flowers+inauthor:keyes'\"<\/span> <span class=\"nt\">--import-tool-fields<\/span> <span class=\"s2\">\"books|book\"<\/span> <span class=\"se\">\\<\/span>\n<span class=\"nt\">--import-name<\/span> wikipedia <span class=\"nt\">--import-package<\/span> https:\/\/github.com\/IBM\/wxflows\/raw\/refs\/heads\/main\/tools\/wikipedia.zip <span class=\"se\">\\<\/span>\n<span class=\"nt\">--import-tool-name<\/span> wikipedia <span class=\"nt\">--import-tool-description<\/span> <span class=\"s2\">\"Retrieve information from Wikipedia.\"<\/span> <span class=\"nt\">--import-tool-fields<\/span> <span class=\"s2\">\"search|page\"<\/span>\n<\/code><\/pre>\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\">\n    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-on\"><title>\u0648\u0627\u0631\u062f \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z\"\/>\n<\/svg><\/p>\n<p>    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-off\"><title>\u0627\u0632 \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u062e\u0627\u0631\u062c \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z\"\/>\n<\/svg><\/p>\n<\/div>\n<\/div>\n<\/div>\n<p>\u062f\u0631 \u0627\u06cc\u0646\u062c\u0627 \u06a9\u0627\u0631\u06cc \u0627\u0633\u062a \u06a9\u0647 \u0627\u06cc\u0646 \u062f\u0633\u062a\u0648\u0631 \u0627\u0646\u062c\u0627\u0645 \u0645\u06cc \u062f\u0647\u062f:<\/p>\n<ul>\n<li>\n<strong>\u0646\u0642\u0637\u0647 \u067e\u0627\u06cc\u0627\u0646\u06cc \u0627\u06cc\u062c\u0627\u062f \u0645\u06cc \u06a9\u0646\u062f<\/strong>: \u06cc\u06a9 \u0646\u0642\u0637\u0647 \u067e\u0627\u06cc\u0627\u0646\u06cc \u0628\u0647 \u0646\u0627\u0645 \u0631\u0627 \u062a\u0639\u0631\u06cc\u0641 \u0645\u06cc \u06a9\u0646\u062f <code>api\/wxflows-toolcalling<\/code>.<\/li>\n<li>\n<strong>\u0648\u0627\u0631\u062f\u0627\u062a <code>google_books<\/code><\/strong>: \u0627\u0628\u0632\u0627\u0631\u06cc \u0628\u0631\u0627\u06cc \u0628\u0627\u0632\u06cc\u0627\u0628\u06cc \u06a9\u062a\u0627\u0628\u200c\u0647\u0627 \u0627\u0632 Google Books \u0628\u0627 \u062a\u0648\u0636\u06cc\u062d\u0627\u062a \u0648 \u0641\u06cc\u0644\u062f\u0647\u0627\u06cc \u062e\u0627\u0635 \u0645\u0627\u0646\u0646\u062f \u0627\u0636\u0627\u0641\u0647 \u0645\u06cc\u200c\u06a9\u0646\u062f <code>books|book<\/code>.<\/li>\n<li>\n<strong>\u0648\u0627\u0631\u062f\u0627\u062a <code>wikipedia<\/code><\/strong>: \u0627\u0628\u0632\u0627\u0631\u06cc \u0628\u0631\u0627\u06cc \u062c\u0633\u062a\u062c\u0648\u06cc \u0648\u06cc\u06a9\u06cc \u067e\u062f\u06cc\u0627 \u0628\u0627 \u062a\u0648\u0636\u06cc\u062d\u0627\u062a \u0648 \u0641\u06cc\u0644\u062f\u0647\u0627\u06cc\u06cc \u0645\u0627\u0646\u0646\u062f \u0627\u0636\u0627\u0641\u0647 \u0645\u06cc \u06a9\u0646\u062f <code>search|page<\/code>.<\/li>\n<\/ul>\n<p>\u067e\u0633 \u0627\u0632 \u0627\u062c\u0631\u0627\u06cc \u062f\u0633\u062a\u0648\u0631\u060c \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u062f a \u0631\u0627 \u0628\u0628\u06cc\u0646\u06cc\u062f <code>wxflows.toml<\/code> \u0641\u0627\u06cc\u0644 \u062f\u0631 \u0641\u0647\u0631\u0633\u062a \u0641\u0639\u0644\u06cc \u0638\u0627\u0647\u0631 \u0645\u06cc \u0634\u0648\u062f. \u0627\u06cc\u0646 \u0641\u0627\u06cc\u0644 \u067e\u06cc\u06a9\u0631\u0628\u0646\u062f\u06cc \u0627\u0628\u0632\u0627\u0631\u0647\u0627\u06cc \u0634\u0645\u0627 \u0631\u0627 \u062f\u0631 \u062e\u0648\u062f \u0646\u06af\u0647 \u0645\u06cc\u200c\u062f\u0627\u0631\u062f \u06a9\u0647 \u0628\u0627 \u0627\u062c\u0631\u0627\u06cc \u0622\u0646\u200c\u0647\u0627 \u0631\u0627 \u062f\u0631 \u06cc\u06a9 \u0646\u0642\u0637\u0647 \u067e\u0627\u06cc\u0627\u0646\u06cc \u0627\u062c\u0631\u0627 \u0645\u06cc\u200c\u06a9\u0646\u06cc\u0645:<\/p>\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight shell\"><code>wxflows deploy\n<\/code><\/pre>\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\">\n    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-on\"><title>\u0648\u0627\u0631\u062f \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z\"\/>\n<\/svg><\/p>\n<p>    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-off\"><title>\u0627\u0632 \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u062e\u0627\u0631\u062c \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z\"\/>\n<\/svg><\/p>\n<\/div>\n<\/div>\n<\/div>\n<p>\u0627\u0633\u062a\u0642\u0631\u0627\u0631 \u0646\u0642\u0637\u0647 \u067e\u0627\u06cc\u0627\u0646\u06cc \u0641\u0642\u0637 \u0628\u0627\u06cc\u062f \u0686\u0646\u062f \u062b\u0627\u0646\u06cc\u0647 \u0637\u0648\u0644 \u0628\u06a9\u0634\u062f \u0648 \u0627\u06cc\u0646 <code>wxflows<\/code> SDK \u0627\u0632 \u0627\u06cc\u0646 \u0646\u0642\u0637\u0647 \u067e\u0627\u06cc\u0627\u0646\u06cc \u0628\u0631\u0627\u06cc \u0628\u0627\u0632\u06cc\u0627\u0628\u06cc \u0648 \u0641\u0631\u0627\u062e\u0648\u0627\u0646\u06cc \u0627\u0628\u0632\u0627\u0631\u0647\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u062e\u0648\u0627\u0647\u062f \u06a9\u0631\u062f\u060c \u0647\u0645\u0627\u0646\u0637\u0648\u0631 \u06a9\u0647 \u062f\u0631 \u0628\u062e\u0634 \u0628\u0639\u062f\u06cc \u06cc\u0627\u062f \u062e\u0648\u0627\u0647\u06cc\u062f \u06af\u0631\u0641\u062a.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"%D9%85%D8%B1%D8%AD%D9%84%D9%87_3_%D8%A7%D8%B2_LangGraph_%D8%A8%D8%B1%D8%A7%DB%8C_%D8%A7%DB%8C%D8%AC%D8%A7%D8%AF_%DB%8C%DA%A9_%D8%B9%D8%A7%D9%85%D9%84_%D8%A7%D8%B3%D8%AA%D9%81%D8%A7%D8%AF%D9%87_%DA%A9%D9%86%DB%8C%D8%AF\"><\/span>\n<p>  \u0645\u0631\u062d\u0644\u0647 3: \u0627\u0632 LangGraph \u0628\u0631\u0627\u06cc \u0627\u06cc\u062c\u0627\u062f \u06cc\u06a9 \u0639\u0627\u0645\u0644 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u062f<br \/>\n<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\u0627\u06a9\u0646\u0648\u0646 \u06a9\u0647 \u06cc\u06a9 \u0646\u0642\u0637\u0647 \u067e\u0627\u06cc\u0627\u0646\u06cc Flow Engine \u062f\u0627\u0631\u06cc\u0645\u060c \u0628\u0627\u06cc\u062f \u0639\u0627\u0645\u0644\u06cc \u0627\u06cc\u062c\u0627\u062f \u06a9\u0646\u06cc\u0645 \u06a9\u0647 \u0628\u062a\u0648\u0627\u0646\u062f \u0627\u0632 \u0627\u06cc\u0646 \u0646\u0642\u0637\u0647 \u067e\u0627\u06cc\u0627\u0646\u06cc \u0628\u0631\u0627\u06cc \u0641\u0631\u0627\u062e\u0648\u0627\u0646\u06cc \u0627\u0628\u0632\u0627\u0631 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u062f. \u0645\u0627 \u0627\u0632 LangGraph \u0628\u0631\u0627\u06cc \u0627\u06cc\u0646 \u06a9\u0627\u0631 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u062e\u0648\u0627\u0647\u06cc\u0645 \u06a9\u0631\u062f\u060c \u0647\u0645\u0631\u0627\u0647 \u0628\u0627 <code>wxflows<\/code> SDK \u0648 \u067e\u0633\u0648\u0646\u062f LangChain \u0628\u0631\u0627\u06cc watsonx.ai:<\/p>\n<ol>\n<li>\n<p>\u06cc\u06a9 \u062f\u0627\u06cc\u0631\u06a9\u062a\u0648\u0631\u06cc \u062c\u062f\u06cc\u062f \u0627\u06cc\u062c\u0627\u062f \u06a9\u0646\u06cc\u062f:<\/p>\n<pre class=\"highlight shell\"><code><span class=\"nb\">mkdir <\/span>langgraph\n<span class=\"nb\">cd <\/span>langgraph\n<\/code><\/pre>\n<\/li>\n<li>\n<p>\u062f\u0631 \u0627\u06cc\u0646 \u062f\u0627\u06cc\u0631\u06a9\u062a\u0648\u0631\u06cc \u062f\u0633\u062a\u0648\u0631 \u0632\u06cc\u0631 \u0631\u0627 \u0628\u0631\u0627\u06cc \u0631\u0627\u0647 \u0627\u0646\u062f\u0627\u0632\u06cc \u06cc\u06a9 \u067e\u0631\u0648\u0698\u0647 TypeScript \u062c\u062f\u06cc\u062f \u0648 \u0646\u0635\u0628 \u0648\u0627\u0628\u0633\u062a\u06af\u06cc \u0647\u0627\u06cc \u0645\u0648\u0631\u062f \u0646\u06cc\u0627\u0632 \u0627\u062c\u0631\u0627 \u06a9\u0646\u06cc\u062f:<\/p>\n<pre class=\"highlight shell\"><code>npm init <span class=\"nt\">-y<\/span>\nnpm i @langchain\/langgraph @langchain\/core @langchain\/community dotenv typescript @wxflows\/sdk@beta\n<\/code><\/pre>\n<p>\u0627\u06cc\u0646 \u0628\u0633\u062a\u0647 \u0647\u0627\u06cc \u0632\u06cc\u0631 \u0631\u0627 \u0646\u0635\u0628 \u0645\u06cc \u06a9\u0646\u062f:<\/p>\n<\/li>\n<\/ol>\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight plaintext\"><code>- `@langchain\/langgraph`: Build agents, structured workflows and handle tool calling.\n- `@langchain\/core`: Provides core functionality for building and managing AI-driven workflows.\n- `@langchain\/community`: Provides access to experimental and community-contributed integrations and tools, such as models on the watsonx.ai platform.\n- `dotenv`: Loads environment variables from a `.env` file, making it easier to manage API keys and configuration values.\n- `typescript`: Sets up TypeScript, a superset of JavaScript, for type checking and better code quality.\n- `@wxflows\/sdk@beta`: Includes the SDK for working with watsonx.ai Flows Engine, which allows you to deploy and manage tools.\n<\/code><\/pre>\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\">\n    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-on\"><title>\u0648\u0627\u0631\u062f \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z\"\/>\n<\/svg><\/p>\n<p>    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-off\"><title>\u0627\u0632 \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u062e\u0627\u0631\u062c \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z\"\/>\n<\/svg><\/p>\n<\/div>\n<\/div>\n<\/div>\n<p>\u067e\u0633 \u0627\u0632 \u0627\u062c\u0631\u0627\u06cc \u0627\u06cc\u0646 \u062f\u0633\u062a\u0648\u0631\u0627\u062a\u060c \u067e\u0631\u0648\u0698\u0647 \u0634\u0645\u0627 \u0622\u0645\u0627\u062f\u0647 \u0634\u0631\u0648\u0639 \u0633\u0627\u062e\u062a \u06cc\u06a9 \u0639\u0627\u0645\u0644 \u062e\u0648\u0627\u0647\u062f \u0628\u0648\u062f.<\/p>\n<ol>\n<li>\n<p>\u0627\u06cc\u062c\u0627\u062f \u06a9\u0646\u06cc\u062f <code>.env<\/code> \u0641\u0627\u06cc\u0644 \u0628\u0627 \u0645\u0642\u0627\u062f\u06cc\u0631 \u0632\u06cc\u0631:<\/p>\n<pre class=\"highlight shell\"><code><span class=\"c\"># You can get these credentials from https:\/\/dataplatform.cloud.ibm.com\/developer-access?context=wx<\/span>\n<span class=\"nv\">WATSONX_AI_AUTH_TYPE<\/span><span class=\"o\">=<\/span>iam\n<span class=\"nv\">WATSONX_AI_ENDPOINT<\/span><span class=\"o\">=<\/span>https:\/\/us-south.ml.cloud.ibm.com\n<span class=\"nv\">WATSONX_AI_IDENTITY_SERVER<\/span><span class=\"o\">=<\/span>iam.cloud.ibm.com\n<span class=\"nv\">WATSONX_AI_APIKEY<\/span><span class=\"o\">=<\/span>\n<span class=\"nv\">WATSONX_AI_PROJECT_ID<\/span><span class=\"o\">=<\/span>\n\n<span class=\"c\"># run the command 'wxflows whoami --apikey'<\/span>\n<span class=\"nv\">WXFLOWS_APIKEY<\/span><span class=\"o\">=<\/span>\n\n<span class=\"c\"># endpoint shows in your terminal after running 'wxflows deploy'<\/span>\n<span class=\"nv\">WXFLOWS_ENDPOINT<\/span><span class=\"o\">=<\/span>\n<\/code><\/pre>\n<\/li>\n<li>\n<p>\u067e\u0633 \u0627\u0632 \u0627\u06cc\u062c\u0627\u062f <code>.env<\/code> \u0641\u0627\u06cc\u0644\u060c \u06cc\u06a9 \u0641\u0627\u06cc\u0644 \u062c\u062f\u06cc\u062f \u0628\u0647 \u0646\u0627\u0645 \u0627\u06cc\u062c\u0627\u062f \u06a9\u0646\u06cc\u062f <code>index.ts<\/code> \u0648 \u06a9\u062f LangGraph \u0631\u0627 \u0627\u0636\u0627\u0641\u0647 \u06a9\u0646\u06cc\u062f:<\/p>\n<pre class=\"highlight typescript\"><code><span class=\"k\">import<\/span> <span class=\"p\">{<\/span> <span class=\"nx\">AIMessage<\/span><span class=\"p\">,<\/span> <span class=\"nx\">BaseMessage<\/span><span class=\"p\">,<\/span> <span class=\"nx\">HumanMessage<\/span><span class=\"p\">,<\/span> <span class=\"nx\">SystemMessage<\/span> <span class=\"p\">}<\/span> <span class=\"k\">from<\/span> <span class=\"dl\">\"<\/span><span class=\"s2\">@langchain\/core\/messages<\/span><span class=\"dl\">\"<\/span><span class=\"p\">;<\/span>\n<span class=\"k\">import<\/span> <span class=\"p\">{<\/span> <span class=\"nx\">ChatWatsonx<\/span> <span class=\"p\">}<\/span> <span class=\"k\">from<\/span> <span class=\"dl\">\"<\/span><span class=\"s2\">@langchain\/community\/chat_models\/ibm<\/span><span class=\"dl\">\"<\/span><span class=\"p\">;<\/span>\n<span class=\"k\">import<\/span> <span class=\"p\">{<\/span> <span class=\"nx\">StateGraph<\/span> <span class=\"p\">}<\/span> <span class=\"k\">from<\/span> <span class=\"dl\">\"<\/span><span class=\"s2\">@langchain\/langgraph<\/span><span class=\"dl\">\"<\/span><span class=\"p\">;<\/span>\n<span class=\"k\">import<\/span> <span class=\"p\">{<\/span> <span class=\"nx\">MemorySaver<\/span><span class=\"p\">,<\/span> <span class=\"nx\">Annotation<\/span> <span class=\"p\">}<\/span> <span class=\"k\">from<\/span> <span class=\"dl\">\"<\/span><span class=\"s2\">@langchain\/langgraph<\/span><span class=\"dl\">\"<\/span><span class=\"p\">;<\/span>\n<span class=\"k\">import<\/span> <span class=\"p\">{<\/span> <span class=\"nx\">ToolNode<\/span> <span class=\"p\">}<\/span> <span class=\"k\">from<\/span> <span class=\"dl\">\"<\/span><span class=\"s2\">@langchain\/langgraph\/prebuilt<\/span><span class=\"dl\">\"<\/span><span class=\"p\">;<\/span>\n<span class=\"k\">import<\/span> <span class=\"nx\">wxflows<\/span> <span class=\"k\">from<\/span> <span class=\"dl\">\"<\/span><span class=\"s2\">@wxflows\/sdk\/langchain<\/span><span class=\"dl\">\"<\/span><span class=\"p\">;<\/span>\n<span class=\"k\">import<\/span> <span class=\"dl\">\"<\/span><span class=\"s2\">dotenv\/config<\/span><span class=\"dl\">\"<\/span><span class=\"p\">;<\/span>\n\n<span class=\"p\">(<\/span><span class=\"k\">async <\/span><span class=\"p\">()<\/span> <span class=\"o\">=&gt;<\/span> <span class=\"p\">{<\/span>\n    <span class=\"c1\">\/\/ Define the graph state<\/span>\n    <span class=\"c1\">\/\/ See here for more info: https:\/\/langchain-ai.github.io\/langgraphjs\/how-tos\/define-state\/<\/span>\n    <span class=\"kd\">const<\/span> <span class=\"nx\">StateAnnotation<\/span> <span class=\"o\">=<\/span> <span class=\"nx\">Annotation<\/span><span class=\"p\">.<\/span><span class=\"nc\">Root<\/span><span class=\"p\">({<\/span>\n        <span class=\"na\">messages<\/span><span class=\"p\">:<\/span> <span class=\"nx\">Annotation<\/span><span class=\"o\">&lt;<\/span><span class=\"nx\">BaseMessage<\/span><span class=\"p\">[]<\/span><span class=\"o\">&gt;<\/span><span class=\"p\">({<\/span>\n            <span class=\"na\">reducer<\/span><span class=\"p\">:<\/span> <span class=\"p\">(<\/span><span class=\"nx\">x<\/span><span class=\"p\">,<\/span> <span class=\"nx\">y<\/span><span class=\"p\">)<\/span> <span class=\"o\">=&gt;<\/span> <span class=\"nx\">x<\/span><span class=\"p\">.<\/span><span class=\"nf\">concat<\/span><span class=\"p\">(<\/span><span class=\"nx\">y<\/span><span class=\"p\">),<\/span>\n        <span class=\"p\">}),<\/span>\n    <span class=\"p\">});<\/span>\n\n    <span class=\"kd\">const<\/span> <span class=\"nx\">toolClient<\/span> <span class=\"o\">=<\/span> <span class=\"k\">new<\/span> <span class=\"nf\">wxflows<\/span><span class=\"p\">({<\/span>\n        <span class=\"na\">endpoint<\/span><span class=\"p\">:<\/span> <span class=\"nx\">process<\/span><span class=\"p\">.<\/span><span class=\"nx\">env<\/span><span class=\"p\">.<\/span><span class=\"nx\">WXFLOWS_ENDPOINT<\/span><span class=\"p\">,<\/span>\n        <span class=\"na\">apikey<\/span><span class=\"p\">:<\/span> <span class=\"nx\">process<\/span><span class=\"p\">.<\/span><span class=\"nx\">env<\/span><span class=\"p\">.<\/span><span class=\"nx\">WXFLOWS_APIKEY<\/span><span class=\"p\">,<\/span>\n        <span class=\"na\">traceSession<\/span><span class=\"p\">:<\/span> <span class=\"dl\">'<\/span><span class=\"s1\">...<\/span><span class=\"dl\">'<\/span>\n    <span class=\"p\">});<\/span>\n\n    <span class=\"kd\">const<\/span> <span class=\"nx\">tools<\/span> <span class=\"o\">=<\/span> <span class=\"k\">await<\/span> <span class=\"nx\">toolClient<\/span><span class=\"p\">.<\/span><span class=\"nx\">lcTools<\/span><span class=\"p\">;<\/span>\n    <span class=\"kd\">const<\/span> <span class=\"nx\">toolNode<\/span> <span class=\"o\">=<\/span> <span class=\"k\">new<\/span> <span class=\"nc\">ToolNode<\/span><span class=\"p\">(<\/span><span class=\"nx\">tools<\/span><span class=\"p\">);<\/span>\n\n    <span class=\"c1\">\/\/ Connect to the LLM provider <\/span>\n    <span class=\"kd\">const<\/span> <span class=\"nx\">model<\/span> <span class=\"o\">=<\/span> <span class=\"k\">new<\/span> <span class=\"nc\">ChatWatsonx<\/span><span class=\"p\">({<\/span>\n        <span class=\"na\">model<\/span><span class=\"p\">:<\/span> <span class=\"dl\">\"<\/span><span class=\"s2\">mistralai\/mistral-large<\/span><span class=\"dl\">\"<\/span><span class=\"p\">,<\/span>\n        <span class=\"na\">projectId<\/span><span class=\"p\">:<\/span> <span class=\"nx\">process<\/span><span class=\"p\">.<\/span><span class=\"nx\">env<\/span><span class=\"p\">.<\/span><span class=\"nx\">WATSONX_AI_PROJECT_ID<\/span><span class=\"p\">,<\/span>\n        <span class=\"na\">serviceUrl<\/span><span class=\"p\">:<\/span> <span class=\"nx\">process<\/span><span class=\"p\">.<\/span><span class=\"nx\">env<\/span><span class=\"p\">.<\/span><span class=\"nx\">WATSONX_AI_ENDPOINT<\/span><span class=\"p\">,<\/span>\n        <span class=\"na\">version<\/span><span class=\"p\">:<\/span> <span class=\"dl\">'<\/span><span class=\"s1\">2024-05-31<\/span><span class=\"dl\">'<\/span><span class=\"p\">,<\/span>\n    <span class=\"p\">}).<\/span><span class=\"nf\">bindTools<\/span><span class=\"p\">(<\/span><span class=\"nx\">tools<\/span><span class=\"p\">);<\/span>\n<\/code><\/pre>\n<p>\u0627\u06cc\u0646 \u0642\u0633\u0645\u062a \u0627\u0648\u0644 \u06a9\u062f \u0648\u0627\u0628\u0633\u062a\u06af\u06cc\u200c\u0647\u0627\u06cc \u0645\u0648\u0631\u062f \u0646\u06cc\u0627\u0632 \u0631\u0627 \u0648\u0627\u0631\u062f \u0645\u06cc\u200c\u06a9\u0646\u062f\u060c \u0627\u0628\u0632\u0627\u0631\u0647\u0627 \u0631\u0627 \u0627\u0632 watsonx.ai Flow Engine \u0628\u0627\u0632\u06cc\u0627\u0628\u06cc \u0645\u06cc\u200c\u06a9\u0646\u062f \u0648 \u0627\u062a\u0635\u0627\u0644 \u0628\u0647 Mistral Large \u0631\u0627 \u062f\u0631 \u062d\u0627\u0644 \u0627\u062c\u0631\u0627 \u0628\u0631 \u0631\u0648\u06cc \u067e\u0644\u062a \u0641\u0631\u0645 watsonx.ai \u062a\u0646\u0638\u06cc\u0645 \u0645\u06cc\u200c\u06a9\u0646\u062f. \u0628\u06cc\u0627\u06cc\u06cc\u062f \u0642\u0633\u0645\u062a \u062f\u0648\u0645 \u06a9\u062f \u0631\u0627 \u0627\u0636\u0627\u0641\u0647 \u06a9\u0646\u06cc\u0645 <code>index.ts<\/code> \u0641\u0627\u06cc\u0644\u06cc \u06a9\u0647 \u0627\u06cc\u062c\u0627\u062f \u0639\u0627\u0645\u0644 \u0631\u0627 \u0627\u0646\u062c\u0627\u0645 \u0645\u06cc \u062f\u0647\u062f:<\/p>\n<pre class=\"highlight typescript\"><code>    <span class=\"c1\">\/\/ Define the function that determines whether to continue or not<\/span>\n    <span class=\"c1\">\/\/ We can extract the state typing via `StateAnnotation.State`<\/span>\n    <span class=\"kd\">function<\/span> <span class=\"nf\">shouldContinue<\/span><span class=\"p\">(<\/span><span class=\"nx\">state<\/span><span class=\"p\">:<\/span> <span class=\"k\">typeof<\/span> <span class=\"nx\">StateAnnotation<\/span><span class=\"p\">.<\/span><span class=\"nx\">State<\/span><span class=\"p\">)<\/span> <span class=\"p\">{<\/span>\n        <span class=\"kd\">const<\/span> <span class=\"nx\">messages<\/span> <span class=\"o\">=<\/span> <span class=\"nx\">state<\/span><span class=\"p\">.<\/span><span class=\"nx\">messages<\/span><span class=\"p\">;<\/span>\n        <span class=\"kd\">const<\/span> <span class=\"nx\">lastMessage<\/span> <span class=\"o\">=<\/span> <span class=\"nx\">messages<\/span><span class=\"p\">[<\/span><span class=\"nx\">messages<\/span><span class=\"p\">.<\/span><span class=\"nx\">length<\/span> <span class=\"o\">-<\/span> <span class=\"mi\">1<\/span><span class=\"p\">]<\/span> <span class=\"k\">as<\/span> <span class=\"nx\">AIMessage<\/span><span class=\"p\">;<\/span>\n\n        <span class=\"c1\">\/\/ If the LLM makes a tool call, then we route to the \"tools\" node<\/span>\n        <span class=\"k\">if <\/span><span class=\"p\">(<\/span><span class=\"nx\">lastMessage<\/span><span class=\"p\">.<\/span><span class=\"nx\">tool_calls<\/span><span class=\"p\">?.<\/span><span class=\"nx\">length<\/span><span class=\"p\">)<\/span> <span class=\"p\">{<\/span>\n        <span class=\"nx\">console<\/span><span class=\"p\">.<\/span><span class=\"nf\">log<\/span><span class=\"p\">(<\/span><span class=\"dl\">'<\/span><span class=\"s1\">TOOL CALL<\/span><span class=\"dl\">'<\/span><span class=\"p\">,<\/span> <span class=\"nx\">lastMessage<\/span><span class=\"p\">.<\/span><span class=\"nx\">tool_calls<\/span><span class=\"p\">)<\/span>\n        <span class=\"k\">return<\/span> <span class=\"dl\">\"<\/span><span class=\"s2\">tools<\/span><span class=\"dl\">\"<\/span><span class=\"p\">;<\/span>\n        <span class=\"p\">}<\/span>\n        <span class=\"c1\">\/\/ Otherwise, we stop (reply to the user)<\/span>\n        <span class=\"k\">return<\/span> <span class=\"dl\">\"<\/span><span class=\"s2\">__end__<\/span><span class=\"dl\">\"<\/span><span class=\"p\">;<\/span>\n    <span class=\"p\">}<\/span>\n\n    <span class=\"c1\">\/\/ Define the function that calls the model<\/span>\n    <span class=\"k\">async<\/span> <span class=\"kd\">function<\/span> <span class=\"nf\">callModel<\/span><span class=\"p\">(<\/span><span class=\"nx\">state<\/span><span class=\"p\">:<\/span> <span class=\"k\">typeof<\/span> <span class=\"nx\">StateAnnotation<\/span><span class=\"p\">.<\/span><span class=\"nx\">State<\/span><span class=\"p\">)<\/span> <span class=\"p\">{<\/span>\n        <span class=\"kd\">const<\/span> <span class=\"nx\">messages<\/span> <span class=\"o\">=<\/span> <span class=\"nx\">state<\/span><span class=\"p\">.<\/span><span class=\"nx\">messages<\/span><span class=\"p\">;<\/span>\n        <span class=\"kd\">const<\/span> <span class=\"nx\">response<\/span> <span class=\"o\">=<\/span> <span class=\"k\">await<\/span> <span class=\"nx\">model<\/span><span class=\"p\">.<\/span><span class=\"nf\">invoke<\/span><span class=\"p\">(<\/span><span class=\"nx\">messages<\/span><span class=\"p\">);<\/span>\n\n        <span class=\"c1\">\/\/ We return a list, because this will get added to the existing list<\/span>\n        <span class=\"k\">return<\/span> <span class=\"p\">{<\/span> <span class=\"na\">messages<\/span><span class=\"p\">:<\/span> <span class=\"p\">[<\/span><span class=\"nx\">response<\/span><span class=\"p\">]<\/span> <span class=\"p\">};<\/span>\n    <span class=\"p\">}<\/span>\n\n    <span class=\"c1\">\/\/ Define a new graph<\/span>\n    <span class=\"kd\">const<\/span> <span class=\"nx\">workflow<\/span> <span class=\"o\">=<\/span> <span class=\"k\">new<\/span> <span class=\"nc\">StateGraph<\/span><span class=\"p\">(<\/span><span class=\"nx\">StateAnnotation<\/span><span class=\"p\">)<\/span>\n        <span class=\"p\">.<\/span><span class=\"nf\">addNode<\/span><span class=\"p\">(<\/span><span class=\"dl\">\"<\/span><span class=\"s2\">agent<\/span><span class=\"dl\">\"<\/span><span class=\"p\">,<\/span> <span class=\"nx\">callModel<\/span><span class=\"p\">)<\/span>\n        <span class=\"p\">.<\/span><span class=\"nf\">addNode<\/span><span class=\"p\">(<\/span><span class=\"dl\">\"<\/span><span class=\"s2\">tools<\/span><span class=\"dl\">\"<\/span><span class=\"p\">,<\/span> <span class=\"nx\">toolNode<\/span><span class=\"p\">)<\/span>\n        <span class=\"p\">.<\/span><span class=\"nf\">addEdge<\/span><span class=\"p\">(<\/span><span class=\"dl\">\"<\/span><span class=\"s2\">__start__<\/span><span class=\"dl\">\"<\/span><span class=\"p\">,<\/span> <span class=\"dl\">\"<\/span><span class=\"s2\">agent<\/span><span class=\"dl\">\"<\/span><span class=\"p\">)<\/span>\n        <span class=\"p\">.<\/span><span class=\"nf\">addConditionalEdges<\/span><span class=\"p\">(<\/span><span class=\"dl\">\"<\/span><span class=\"s2\">agent<\/span><span class=\"dl\">\"<\/span><span class=\"p\">,<\/span> <span class=\"nx\">shouldContinue<\/span><span class=\"p\">)<\/span>\n        <span class=\"p\">.<\/span><span class=\"nf\">addEdge<\/span><span class=\"p\">(<\/span><span class=\"dl\">\"<\/span><span class=\"s2\">tools<\/span><span class=\"dl\">\"<\/span><span class=\"p\">,<\/span> <span class=\"dl\">\"<\/span><span class=\"s2\">agent<\/span><span class=\"dl\">\"<\/span><span class=\"p\">);<\/span>\n\n    <span class=\"c1\">\/\/ Initialize memory to persist state between graph runs<\/span>\n    <span class=\"kd\">const<\/span> <span class=\"nx\">checkpointer<\/span> <span class=\"o\">=<\/span> <span class=\"k\">new<\/span> <span class=\"nc\">MemorySaver<\/span><span class=\"p\">();<\/span>\n\n    <span class=\"c1\">\/\/ Finally, we compile it!<\/span>\n    <span class=\"c1\">\/\/ This compiles it into a LangChain Runnable.<\/span>\n    <span class=\"c1\">\/\/ Note that we're (optionally) passing the memory when compiling the graph<\/span>\n    <span class=\"kd\">const<\/span> <span class=\"nx\">app<\/span> <span class=\"o\">=<\/span> <span class=\"nx\">workflow<\/span><span class=\"p\">.<\/span><span class=\"nf\">compile<\/span><span class=\"p\">({<\/span> <span class=\"nx\">checkpointer<\/span> <span class=\"p\">});<\/span>\n\n    <span class=\"c1\">\/\/ Use the Runnable<\/span>\n    <span class=\"kd\">const<\/span> <span class=\"nx\">finalState<\/span> <span class=\"o\">=<\/span> <span class=\"k\">await<\/span> <span class=\"nx\">app<\/span><span class=\"p\">.<\/span><span class=\"nf\">invoke<\/span><span class=\"p\">(<\/span>\n        <span class=\"p\">{<\/span>\n        <span class=\"na\">messages<\/span><span class=\"p\">:<\/span> <span class=\"p\">[<\/span>\n            <span class=\"k\">new<\/span> <span class=\"nc\">SystemMessage<\/span><span class=\"p\">(<\/span>\n            <span class=\"dl\">\"<\/span><span class=\"s2\">Only use the tools available, don't answer the question based on pre-trained data<\/span><span class=\"dl\">\"<\/span>\n            <span class=\"p\">),<\/span>\n            <span class=\"k\">new<\/span> <span class=\"nc\">HumanMessage<\/span><span class=\"p\">(<\/span>\n            <span class=\"dl\">\"<\/span><span class=\"s2\">Search information about the book escape from james patterson<\/span><span class=\"dl\">\"<\/span>\n            <span class=\"p\">),<\/span>\n        <span class=\"p\">],<\/span>\n        <span class=\"p\">},<\/span>\n        <span class=\"p\">{<\/span> <span class=\"na\">configurable<\/span><span class=\"p\">:<\/span> <span class=\"p\">{<\/span> <span class=\"na\">thread_id<\/span><span class=\"p\">:<\/span> <span class=\"dl\">\"<\/span><span class=\"s2\">42<\/span><span class=\"dl\">\"<\/span> <span class=\"p\">}<\/span> <span class=\"p\">}<\/span>\n    <span class=\"p\">);<\/span>\n\n    <span class=\"nx\">console<\/span><span class=\"p\">.<\/span><span class=\"nf\">log<\/span><span class=\"p\">(<\/span><span class=\"nx\">finalState<\/span><span class=\"p\">.<\/span><span class=\"nx\">messages<\/span><span class=\"p\">[<\/span><span class=\"nx\">finalState<\/span><span class=\"p\">.<\/span><span class=\"nx\">messages<\/span><span class=\"p\">.<\/span><span class=\"nx\">length<\/span> <span class=\"o\">-<\/span> <span class=\"mi\">1<\/span><span class=\"p\">].<\/span><span class=\"nx\">content<\/span><span class=\"p\">);<\/span>\n    <span class=\"c1\">\/\/ You can use the `thread_id` to ask follow up questions, the conversation context is retained via the saved state (i.e. stored list of messages):<\/span>\n<span class=\"p\">})();<\/span>\n<\/code><\/pre>\n<p>\u062f\u0631 \u0627\u06cc\u0646 \u0642\u0633\u0645\u062a \u062f\u0648\u0645 \u06a9\u062f\u060c \u0639\u0627\u0645\u0644 \u0627\u06cc\u062c\u0627\u062f \u0645\u06cc \u0634\u0648\u062f \u0648 \u067e\u06cc\u0627\u0645\u06cc \u0631\u0627 \u0628\u0647 \u0639\u0627\u0645\u0644 \u0627\u0631\u0633\u0627\u0644 \u0645\u06cc \u06a9\u0646\u06cc\u0645: &#8220;\u062c\u0633\u062a\u062c\u0648\u06cc \u0627\u0637\u0644\u0627\u0639\u0627\u062a \u0645\u0631\u0628\u0648\u0637 \u0628\u0647 \u06a9\u062a\u0627\u0628 \u0641\u0631\u0627\u0631 \u0627\u0632 \u062c\u06cc\u0645\u0632 \u067e\u062a\u0631\u0633\u0648\u0646&#8221;. \u0627\u06cc\u0646 \u06cc\u06a9 \u0633\u0631\u06cc \u0627\u0632 \u062a\u0639\u0627\u0645\u0644\u0627\u062a \u0628\u06cc\u0646 \u0627\u0628\u0632\u0627\u0631\u0647\u0627\u06cc \u062f\u0631 \u062d\u0627\u0644 \u0627\u062c\u0631\u0627 \u062f\u0631 Flow Engine \u0648 LLM \u062f\u0631 watsonx.ai \u0631\u0627 \u0622\u063a\u0627\u0632 \u0645\u06cc \u06a9\u0646\u062f \u062a\u0627 \u0628\u0647 \u0634\u0645\u0627 \u067e\u0627\u0633\u062e \u062f\u0647\u062f.<\/p>\n<ol>\n<li>\u0628\u0631\u0627\u06cc \u0627\u062c\u0631\u0627\u06cc \u06a9\u062f \u0628\u0627\u0644\u0627 \u0628\u0627\u06cc\u062f a \u0631\u0627 \u0627\u0636\u0627\u0641\u0647 \u06a9\u0646\u06cc\u062f <code>start<\/code> \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a \u0628\u0647 <code>package.json<\/code> \u0641\u0627\u06cc\u0644:\n<\/li>\n<\/ol>\n<pre class=\"highlight json\"><code><span class=\"nl\">\"scripts\"<\/span><span class=\"p\">:<\/span><span class=\"w\"> <\/span><span class=\"p\">{<\/span><span class=\"w\">\n    <\/span><span class=\"nl\">\"start\"<\/span><span class=\"p\">:<\/span><span class=\"w\"> <\/span><span class=\"s2\">\"npx tsx .\/index.ts\"<\/span><span class=\"p\">,<\/span><span class=\"w\">\n    <\/span><span class=\"nl\">\"test\"<\/span><span class=\"p\">:<\/span><span class=\"w\"> <\/span><span class=\"s2\">\"echo <\/span><span class=\"se\">\\\"<\/span><span class=\"s2\">Error: no test specified<\/span><span class=\"se\">\\\"<\/span><span class=\"s2\"> &amp;&amp; exit 1\"<\/span><span class=\"w\">\n<\/span><span class=\"p\">}<\/span><span class=\"w\">\n<\/span><\/code><\/pre>\n<ol>\n<li>\u0628\u0631\u0627\u06cc \u0627\u0631\u0633\u0627\u0644 \u067e\u06cc\u0627\u0645 \u0628\u0647 \u0646\u0645\u0627\u06cc\u0646\u062f\u0647\u060c \u0627\u06a9\u0646\u0648\u0646 \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u062f \u0627\u062c\u0631\u0627 \u06a9\u0646\u06cc\u062f <code>npm start<\/code> \u0627\u0632 \u062a\u0631\u0645\u06cc\u0646\u0627\u0644\u060c \u06a9\u0647 \u0628\u0627\u06cc\u062f \u0627\u0637\u0644\u0627\u0639\u0627\u062a \u0628\u06cc\u0634\u062a\u0631\u06cc \u062f\u0631 \u0645\u0648\u0631\u062f \u06a9\u062a\u0627\u0628 &#8220;\u0641\u0631\u0627\u0631&#8221; \u0646\u0648\u0634\u062a\u0647 &#8220;\u062c\u06cc\u0645\u0632 \u067e\u062a\u0631\u0633\u0648\u0646&#8221; \u0628\u0647 \u0634\u0645\u0627 \u0627\u0631\u0627\u0626\u0647 \u062f\u0647\u062f. \u062f\u0631 \u06a9\u0646\u0627\u0631 \u0627\u0637\u0644\u0627\u0639\u0627\u062a\u060c \u062a\u0645\u0627\u0633 \u0647\u0627\u06cc \u0627\u0628\u0632\u0627\u0631 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0634\u062f\u0647 \u0646\u06cc\u0632 \u062f\u0631 \u062a\u0631\u0645\u06cc\u0646\u0627\u0644 \u0634\u0645\u0627 \u0686\u0627\u067e \u0645\u06cc \u0634\u0648\u062f.<\/li>\n<\/ol>\n<p>\u0641\u0631\u0627\u062e\u0648\u0627\u0646\u06cc \u0627\u0628\u0632\u0627\u0631 \u0628\u0647 \u0634\u06a9\u0644 \u0632\u06cc\u0631 \u062e\u0648\u0627\u0647\u062f \u0628\u0648\u062f:<\/p>\n<pre class=\"highlight shell\"><code>TOOL CALL <span class=\"o\">[<\/span>\n  <span class=\"o\">{<\/span>\n    name: <span class=\"s1\">'google_books'<\/span>,\n    args: <span class=\"o\">{<\/span>\n      query: <span class=\"s1\">'{\\n'<\/span> +\n        <span class=\"s1\">'  books(q: \"intitle:escape+inauthor:patterson\") {\\n'<\/span> +\n        <span class=\"s1\">'    authors\\n'<\/span> +\n        <span class=\"s1\">'    title\\n'<\/span> +\n        <span class=\"s1\">'    volumeId\\n'<\/span> +\n        <span class=\"s1\">'  }\\n'<\/span> +\n        <span class=\"s1\">'}'<\/span>\n    <span class=\"o\">}<\/span>,\n    <span class=\"nb\">type<\/span>: <span class=\"s1\">'tool_call'<\/span>,\n    <span class=\"nb\">id<\/span>: <span class=\"s1\">'Zg9jXPOR2'<\/span>\n  <span class=\"o\">}<\/span>\n<span class=\"o\">]<\/span>\n<\/code><\/pre>\n<blockquote>\n<p>watsonx.ai Flow Engine \u0627\u0632 GraphQL \u0628\u0647 \u0639\u0646\u0648\u0627\u0646 \u0641\u0646\u0627\u0648\u0631\u06cc \u0627\u0633\u0627\u0633\u06cc \u0628\u0631\u0627\u06cc \u062a\u0639\u0631\u06cc\u0641 \u0648 \u0641\u0631\u0627\u062e\u0648\u0627\u0646\u06cc \u0627\u0628\u0632\u0627\u0631\u0647\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc \u06a9\u0646\u062f.<\/p>\n<\/blockquote>\n<p>\u0648 \u067e\u0627\u0633\u062e \u0646\u0647\u0627\u06cc\u06cc \u0686\u06cc\u0632\u06cc \u0634\u0628\u06cc\u0647 \u0628\u0647 \u0627\u06cc\u0646 \u0627\u0633\u062a:<\/p>\n<pre class=\"highlight shell\"><code><span class=\"c\">### Information about the book \"Escape\" by James Patterson<\/span>\n\nHere is the information about the book <span class=\"s2\">\"Escape\"<\/span> by James Patterson:\n\n- <span class=\"k\">**<\/span>Authors:<span class=\"k\">**<\/span> James Patterson, David Ellis\n- <span class=\"k\">**<\/span>Title:<span class=\"k\">**<\/span> Escape\n- <span class=\"k\">**<\/span>Volume ID:<span class=\"k\">**<\/span> EFtHEAAAQBAJ\n<\/code><\/pre>\n<p>\u0642\u062f\u0645 \u0628\u0639\u062f\u06cc \u067e\u06cc\u0627\u062f\u0647 \u0633\u0627\u0632\u06cc \u06cc\u06a9 \u0628\u0631\u0646\u0627\u0645\u0647 \u0686\u062a \u0627\u0633\u062a \u06a9\u0647 \u0627\u0632 \u0646\u0642\u0637\u0647 \u067e\u0627\u06cc\u0627\u0646\u06cc Flow Engine \u0648 \u0639\u0627\u0645\u0644 LangGraph \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc \u06a9\u0646\u062f\u060c \u0647\u0645\u0627\u0646\u0637\u0648\u0631 \u06a9\u0647 \u062f\u0631 \u0628\u062e\u0634 \u0628\u0639\u062f\u06cc \u062e\u0648\u0627\u0647\u06cc\u062f \u0622\u0645\u0648\u062e\u062a.<\/p>\n<\/li>\n<\/ol>\n<h3><span class=\"ez-toc-section\" id=\"%D9%85%D8%B1%D8%AD%D9%84%D9%87_4_%D8%A7%D8%B2_%D8%B9%D8%A7%D9%85%D9%84_%D8%AF%D8%B1_%DB%8C%DA%A9_%D8%A8%D8%B1%D9%86%D8%A7%D9%85%D9%87_%DA%86%D8%AA_%D8%A7%D8%B3%D8%AA%D9%81%D8%A7%D8%AF%D9%87_%DA%A9%D9%86%DB%8C%D8%AF\"><\/span>\n<p>  \u0645\u0631\u062d\u0644\u0647 4: \u0627\u0632 \u0639\u0627\u0645\u0644 \u062f\u0631 \u06cc\u06a9 \u0628\u0631\u0646\u0627\u0645\u0647 \u0686\u062a \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u062f<br \/>\n<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\u0645\u0631\u062d\u0644\u0647 \u0622\u062e\u0631 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0639\u0627\u0645\u0644 \u0648 \u0627\u0628\u0632\u0627\u0631\u0647\u0627\u06cc \u0627\u0646\u062a\u0647\u0627\u06cc\u06cc \u062f\u0631 \u06cc\u06a9 \u0628\u0631\u0646\u0627\u0645\u0647 \u0686\u062a \u0627\u0633\u062a \u06a9\u0647 \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u062f \u062f\u0631 \u0627\u06cc\u0646 \u0645\u062e\u0632\u0646 \u067e\u06cc\u062f\u0627 \u06a9\u0646\u06cc\u062f.<\/p>\n<p>\u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0633\u0631\u0648\u06cc\u0633 \u0631\u0627\u06cc\u06af\u0627\u0646 StackBlitz \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u062f \u0627\u06cc\u0646 \u0628\u0631\u0646\u0627\u0645\u0647 \u0631\u0627 \u062f\u0631 \u0645\u0631\u0648\u0631\u06af\u0631 \u0627\u062c\u0631\u0627 \u06a9\u0646\u06cc\u062f:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/media2.dev.to\/dynamic\/image\/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto\/https%3A%2F%2Fdeveloper.stackblitz.com%2Fimg%2Fopen_in_stackblitz.svg\" alt=\"\u062f\u0631 StackBlitz \u0628\u0627\u0632 \u06a9\u0646\u06cc\u062f\" loading=\"lazy\" width=\"162\" height=\"32\" title=\"\"><\/p>\n<p>\u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u062f \u0628\u0631\u0646\u0627\u0645\u0647 \u0686\u062a \u0631\u0627 \u062f\u0631 \u0645\u0631\u0648\u0631\u06af\u0631 \u0627\u0632 \u0637\u0631\u06cc\u0642 StackBlitz \u0627\u062c\u0631\u0627 \u06a9\u0646\u06cc\u062f \u06cc\u0627 \u0627\u0632 \u062f\u06a9\u0645\u0647 &#8220;\u062f\u0627\u0646\u0644\u0648\u062f&#8221; \u0628\u0631\u0627\u06cc \u062f\u0627\u0646\u0644\u0648\u062f \u06a9\u062f \u0645\u0646\u0628\u0639 \u0628\u0631\u0646\u0627\u0645\u0647 \u0648 \u0627\u062c\u0631\u0627\u06cc \u0622\u0646 \u0628\u0647 \u0635\u0648\u0631\u062a \u0645\u062d\u0644\u06cc \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u062f.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/media2.dev.to\/dynamic\/image\/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto\/https%3A%2F%2Fcf-courses-data.s3.us.cloud-object-storage.appdomain.cloud%2FQn644YyV-DiTEj7hOsce-Q%2FUntitled.png\" title=\"\u0644\u0646\u06af\u06af\u0631\u0627\u0641 wxflows stackblitz\" alt=\"\u0644\u0646\u06af\u06af\u0631\u0627\u0641 wxflows stackblitz\" loading=\"lazy\" width=\"800\" height=\"412\"\/><\/p>\n<p>\u0627\u06cc\u0646 \u0628\u0631\u0646\u0627\u0645\u0647 \u0628\u0647 \u0647\u0645\u0627\u0646 \u0627\u0639\u062a\u0628\u0627\u0631\u0646\u0627\u0645\u0647\u200c\u0647\u0627\u06cc \u0645\u0631\u062d\u0644\u0647 3.3 \u0646\u06cc\u0627\u0632 \u062f\u0627\u0631\u062f \u06a9\u0647 \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u06cc\u062f \u0622\u0646\u200c\u0647\u0627 \u0631\u0627 \u062f\u0631 \u0646\u0633\u062e\u0647 \u062c\u062f\u06cc\u062f \u0630\u062e\u06cc\u0631\u0647 \u06a9\u0646\u06cc\u062f <code>.env<\/code> \u0641\u0627\u06cc\u0644 \u0645\u0633\u062a\u0642\u06cc\u0645\u0627\u064b \u062f\u0631 StackBlitz \u06cc\u0627 \u0628\u0647 \u0635\u0648\u0631\u062a \u0645\u062d\u0644\u06cc:<\/p>\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight shell\"><code><span class=\"c\"># You can get these credentials from https:\/\/dataplatform.cloud.ibm.com\/developer-access?context=wx<\/span>\n<span class=\"nv\">WATSONX_AI_AUTH_TYPE<\/span><span class=\"o\">=<\/span>iam\n<span class=\"nv\">WATSONX_AI_ENDPOINT<\/span><span class=\"o\">=<\/span>https:\/\/us-south.ml.cloud.ibm.com\n<span class=\"nv\">WATSONX_AI_IDENTITY_SERVER<\/span><span class=\"o\">=<\/span>iam.cloud.ibm.com\n<span class=\"nv\">WATSONX_AI_APIKEY<\/span><span class=\"o\">=<\/span>\n<span class=\"nv\">WATSONX_AI_PROJECT_ID<\/span><span class=\"o\">=<\/span>\n\n<span class=\"c\"># run the command 'wxflows whoami --apikey'<\/span>\n<span class=\"nv\">WXFLOWS_APIKEY<\/span><span class=\"o\">=<\/span>\n\n<span class=\"c\"># endpoint shows in your terminal after running 'wxflows deploy'<\/span>\n<span class=\"nv\">WXFLOWS_ENDPOINT<\/span><span class=\"o\">=<\/span>\n<\/code><\/pre>\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\">\n    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-on\"><title>\u0648\u0627\u0631\u062f \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z\"\/>\n<\/svg><\/p>\n<p>    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-off\"><title>\u0627\u0632 \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u062e\u0627\u0631\u062c \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z\"\/>\n<\/svg><\/p>\n<\/div>\n<\/div>\n<\/div>\n<p>\u0627\u06af\u0631 \u0645\u06cc \u062e\u0648\u0627\u0647\u06cc\u062f \u0628\u0631\u0646\u0627\u0645\u0647 \u0631\u0627 \u0628\u0647 \u0635\u0648\u0631\u062a \u0645\u062d\u0644\u06cc \u0627\u062c\u0631\u0627 \u06a9\u0646\u06cc\u062f\u060c \u0627\u062c\u0631\u0627\u06cc \u0622\u0646 \u0631\u0627 \u0641\u0631\u0627\u0645\u0648\u0634 \u0646\u06a9\u0646\u06cc\u062f <code>npm i<\/code> \u062f\u0631 \u062f\u0627\u06cc\u0631\u06a9\u062a\u0648\u0631\u06cc \u0628\u0631\u0646\u0627\u0645\u0647 \u0628\u0631\u0627\u06cc \u0646\u0635\u0628 \u0648\u0627\u0628\u0633\u062a\u06af\u06cc \u0647\u0627. \u0628\u0639\u062f \u0627\u0632 \u0646\u0635\u0628 \u0627\u06cc\u0646 \u0647\u0627 \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u062f \u0627\u062c\u0631\u0627 \u06a9\u0646\u06cc\u062f <code>npm start<\/code> \u0628\u0631\u0627\u06cc \u0631\u0627\u0647 \u0627\u0646\u062f\u0627\u0632\u06cc \u0628\u0631\u0646\u0627\u0645\u0647<\/p>\n<p>\u0628\u0631\u0646\u0627\u0645\u0647 \u0686\u062a \u0627\u0632 \u06a9\u062a\u0627\u0628\u062e\u0627\u0646\u0647 \u0645\u0624\u0644\u0641\u0647 \u0647\u0627\u06cc Carbon Chat AI IBM \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc \u06a9\u0646\u062f \u0648 \u0628\u0647 \u0634\u06a9\u0644 \u0632\u06cc\u0631 \u0627\u0633\u062a:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/media2.dev.to\/dynamic\/image\/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto\/https%3A%2F%2Fcf-courses-data.s3.us.cloud-object-storage.appdomain.cloud%2FhjNP90zk5kO0FcIiVabDNg%2Fstackblitz-com-github-IBM-wxflows-tree-main-examples-chat-app-file--env.png\" title=\"\u0628\u0631\u0646\u0627\u0645\u0647 \u0686\u062a carbon ai \u0628\u0627 \u0644\u0646\u06af\u06af\u0631\u0627\u0641\" alt=\"\u0628\u0631\u0646\u0627\u0645\u0647 \u0686\u062a carbon ai \u0628\u0627 \u0644\u0646\u06af\u06af\u0631\u0627\u0641\" loading=\"lazy\" width=\"800\" height=\"449\"\/><\/p>\n<p>\u0627\u06a9\u0646\u0648\u0646 \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u062f \u0647\u0631 \u0646\u0648\u0639 \u0633\u0648\u0627\u0644\u06cc \u0631\u0627 \u06a9\u0647 \u0645\u0631\u0628\u0648\u0637 \u0628\u0647 \u06a9\u062a\u0627\u0628 \u06cc\u0627 \u0633\u0627\u06cc\u0631 \u0631\u0633\u0627\u0646\u0647 \u0647\u0627\u06cc \u0645\u062d\u0628\u0648\u0628 \u0627\u0633\u062a \u0628\u067e\u0631\u0633\u06cc\u062f. \u0646\u0645\u0627\u06cc\u0646\u062f\u0647 \u0627\u0632 Google Books \u06cc\u0627 \u0627\u0628\u0632\u0627\u0631 Wikipedia \u0627\u0632 watsonx.ai Flow Engine \u0628\u0631\u0627\u06cc \u067e\u0627\u0633\u062e \u0628\u0647 \u0633\u0624\u0627\u0644\u0627\u062a \u0634\u0645\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc \u06a9\u0646\u062f\u060c \u0632\u06cc\u0631\u0627 LangGraph \u0648\u0636\u0639\u06cc\u062a \u062d\u0627\u0641\u0638\u0647 \u0631\u0627 \u062d\u0641\u0638 \u0645\u06cc \u06a9\u0646\u062f \u0648 \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u062f \u0633\u0624\u0627\u0644\u0627\u062a \u0628\u0639\u062f\u06cc \u0631\u0627 \u0646\u06cc\u0632 \u0628\u067e\u0631\u0633\u06cc\u062f. \u06af\u0627\u0645 \u0628\u0639\u062f\u06cc \u0627\u06cc\u0646 \u0627\u0633\u062a \u06a9\u0647 \u062f\u0627\u062f\u0647 \u0647\u0627\u06cc \u062e\u0648\u062f (\u0633\u0627\u0632\u0645\u0627\u0646) \u0631\u0627 \u0628\u0647 \u06cc\u06a9 \u0627\u0628\u0632\u0627\u0631 \u062a\u0628\u062f\u06cc\u0644 \u06a9\u0646\u06cc\u062f\u060c \u06a9\u0647 \u0628\u0631\u0627\u06cc \u0622\u0646 \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u062f \u0628\u0647 \u0627\u06cc\u0646 \u062f\u0633\u062a\u0648\u0631\u0627\u0644\u0639\u0645\u0644 \u0647\u0627 \u0646\u06af\u0627\u0647\u06cc \u0628\u06cc\u0646\u062f\u0627\u0632\u06cc\u062f.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"%D8%AE%D9%84%D8%A7%D8%B5%D9%87_%D9%88_%D9%85%D8%B1%D8%A7%D8%AD%D9%84_%D8%A8%D8%B9%D8%AF%DB%8C\"><\/span>\n<p>  \u062e\u0644\u0627\u0635\u0647 \u0648 \u0645\u0631\u0627\u062d\u0644 \u0628\u0639\u062f\u06cc<br \/>\n<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\u0627\u06cc\u0646 \u0622\u0645\u0648\u0632\u0634 \u0628\u0647 \u0634\u0645\u0627 \u0646\u0634\u0627\u0646 \u0645\u06cc \u062f\u0647\u062f \u06a9\u0647 \u0686\u06af\u0648\u0646\u0647 \u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 IBM watsonx.ai Flow Engine \u0648 LangGraph \u06cc\u06a9 \u0639\u0627\u0645\u0644 \u0647\u0648\u0634 \u0645\u0635\u0646\u0648\u0639\u06cc \u0631\u0627 \u0631\u0627\u0647 \u0627\u0646\u062f\u0627\u0632\u06cc \u0648 \u0627\u062c\u0631\u0627 \u06a9\u0646\u06cc\u062f. \u0634\u0645\u0627 \u06cc\u0627\u062f \u06af\u0631\u0641\u062a\u06cc\u062f \u06a9\u0647 \u0686\u06af\u0648\u0646\u0647 \u0627\u0628\u0632\u0627\u0631\u0647\u0627 \u0631\u0627 \u067e\u06cc\u06a9\u0631\u0628\u0646\u062f\u06cc \u06a9\u0646\u06cc\u062f <code>google_books<\/code> \u0648 <code>wikipedia<\/code>\u060c \u06cc\u06a9 \u067e\u0631\u0648\u0698\u0647 Flow Engine \u0631\u0627 \u0627\u062c\u0631\u0627 \u06a9\u0646\u06cc\u062f \u0648 \u0628\u0631\u0646\u0627\u0645\u0647 \u0631\u0627 \u0628\u0647 \u0635\u0648\u0631\u062a \u0645\u062d\u0644\u06cc \u06cc\u0627 \u062f\u0631 \u06cc\u06a9 \u0645\u0631\u0648\u0631\u06af\u0631 \u0627\u062c\u0631\u0627 \u06a9\u0646\u06cc\u062f. \u0627\u06cc\u0646 \u0627\u0628\u0632\u0627\u0631\u0647\u0627 \u0639\u0627\u0645\u0644 \u0634\u0645\u0627 \u0631\u0627 \u0642\u0627\u062f\u0631 \u0645\u06cc \u0633\u0627\u0632\u062f \u062a\u0627 \u062f\u0627\u062f\u0647 \u0647\u0627\u06cc \u0628\u0644\u0627\u062f\u0631\u0646\u06af \u0631\u0627 \u0628\u0627\u0632\u06cc\u0627\u0628\u06cc \u06a9\u0646\u062f \u0648 \u0628\u0627 API \u0647\u0627\u06cc \u062e\u0627\u0631\u062c\u06cc \u062a\u0639\u0627\u0645\u0644 \u062f\u0627\u0634\u062a\u0647 \u0628\u0627\u0634\u062f.<\/p>\n<p>\u0628\u0627 \u0627\u06cc\u0646 \u0645\u0647\u0627\u0631\u062a\u200c\u0647\u0627\u06cc \u062c\u062f\u06cc\u062f\u060c \u0627\u06a9\u0646\u0648\u0646 \u067e\u0627\u06cc\u0647\u200c\u0627\u06cc \u0642\u0648\u06cc \u0628\u0631\u0627\u06cc \u0633\u0627\u062e\u062a \u0627\u067e\u0644\u06cc\u06a9\u06cc\u0634\u0646\u200c\u0647\u0627\u06cc \u0645\u0628\u062a\u0646\u06cc \u0628\u0631 \u0647\u0648\u0634 \u0645\u0635\u0646\u0648\u0639\u06cc \u062f\u0627\u0631\u06cc\u062f <code>wxflows<\/code> \u0648 watsonx.ai. \u0686\u0647 \u062f\u0631 \u062d\u0627\u0644 \u0627\u06cc\u062c\u0627\u062f \u06af\u0631\u062f\u0634 \u06a9\u0627\u0631 \u0633\u0627\u062f\u0647 \u06cc\u0627 \u0627\u062f\u063a\u0627\u0645 \u0647\u0627\u06cc \u067e\u06cc\u0686\u06cc\u062f\u0647 \u062a\u0631 \u0628\u0627\u0634\u06cc\u062f\u060c CLI \u0648 SDK \u0627\u062c\u0631\u0627\u06cc \u067e\u0631\u0648\u0698\u0647 \u0647\u0627\u06cc \u062e\u0648\u062f \u0631\u0627 \u0622\u0633\u0627\u0646 \u0645\u06cc \u06a9\u0646\u0646\u062f.<\/p>\n<p>\u0645\u0627 \u0628\u0631\u0627\u06cc \u062f\u06cc\u062f\u0646 \u0622\u0646\u0686\u0647 \u0634\u0645\u0627 \u0627\u06cc\u062c\u0627\u062f \u0645\u06cc \u06a9\u0646\u06cc\u062f \u0647\u06cc\u062c\u0627\u0646 \u0632\u062f\u0647 \u0647\u0633\u062a\u06cc\u0645! \u0628\u0647 \u0627\u0646\u062c\u0645\u0646 Discord \u0645\u0627 \u0628\u067e\u06cc\u0648\u0646\u062f\u06cc\u062f \u0648 \u067e\u0631\u0648\u0698\u0647 \u0647\u0627\u06cc \u062e\u0648\u062f \u0631\u0627 \u0628\u0627 \u0645\u0627 \u0628\u0647 \u0627\u0634\u062a\u0631\u0627\u06a9 \u0628\u06af\u0630\u0627\u0631\u06cc\u062f!<\/p>\n<\/p><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Summarize this content to 400 words in Persian Lang \u0647\u0648\u0634 \u0645\u0635\u0646\u0648\u0639\u06cc \u0645\u0648\u0644\u062f \u0628\u0647 \u0633\u0631\u0639\u062a \u062f\u0631 \u062d\u0627\u0644 \u062a\u06a9\u0627\u0645\u0644 \u0627\u0633\u062a\u060c \u0648 \u062f\u0631 \u0686\u0646\u062f \u0633\u0627\u0644 \u06af\u0630\u0634\u062a\u0647\u060c \u0645\u0627 \u0634\u0627\u0647\u062f \u0686\u0646\u062f \u0627\u0644\u06af\u0648\u06cc \u0648\u0627\u0636\u062d \u0628\u0648\u062f\u0647\u200c\u0627\u06cc\u0645 \u06a9\u0647 \u062a\u0648\u0633\u0639\u0647\u200c\u062f\u0647\u0646\u062f\u06af\u0627\u0646 \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u0646\u062f \u0622\u0646\u200c\u0647\u0627 \u0631\u0627 \u067e\u06cc\u0627\u062f\u0647\u200c\u0633\u0627\u0632\u06cc \u06a9\u0646\u0646\u062f \u2013 \u0627\u0632 \u062f\u0633\u062a\u0648\u0631 \u0633\u0627\u062f\u0647 \u0634\u0631\u0648\u0639\u060c \u0628\u0647 \u0633\u0645\u062a Retrieval Augmented Generation (RAG)\u060c \u0648 \u0627\u06a9\u0646\u0648\u0646 Tool Calling \u0648 Agents. \u0627\u06cc\u062c\u0627\u062f \u0628\u0631\u0646\u0627\u0645\u0647 &hellip;<\/p>\n","protected":false},"author":2,"featured_media":86661,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"fifu_image_url":"","fifu_image_alt":"","footnotes":""},"categories":[339],"tags":[],"class_list":["post-86660","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-dev"],"_links":{"self":[{"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/posts\/86660","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/comments?post=86660"}],"version-history":[{"count":0,"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/posts\/86660\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/media\/86661"}],"wp:attachment":[{"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/media?parent=86660"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/categories?post=86660"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/tags?post=86660"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}