{"id":105120,"date":"2025-05-06T10:22:09","date_gmt":"2025-05-06T03:22:09","guid":{"rendered":"https:\/\/wiki.tino.org\/?p=105120"},"modified":"2025-07-29T14:19:05","modified_gmt":"2025-07-29T07:19:05","slug":"cach-su-dung-node-ai-agent-tren-n8n","status":"publish","type":"post","link":"https:\/\/tino.vn\/blog\/cach-su-dung-node-ai-agent-tren-n8n\/","title":{"rendered":"AI Agent l\u00e0 g\u00ec? C\u00e1ch s\u1eed d\u1ee5ng node AI Agent tr\u00ean n8n c\u1ef1c d\u1ec5"},"content":{"rendered":"\n<p><strong>Trong th\u1eddi \u0111\u1ea1i t\u1ef1 \u0111\u1ed9ng h\u00f3a v\u00e0 tr\u00ed tu\u1ec7 nh\u00e2n t\u1ea1o b\u00f9ng n\u1ed5, AI Agent ng\u00e0y c\u00e0ng tr\u1edf th\u00e0nh c\u00f4ng c\u1ee5 h\u1ed7 tr\u1ee3 \u0111\u1eafc l\u1ef1c cho doanh nghi\u1ec7p v\u00e0 c\u00e1 nh\u00e2n t\u1ed1i \u01b0u quy tr\u00ecnh l\u00e0m vi\u1ec7c. Nh\u01b0ng b\u1ea1n \u0111\u00e3 th\u1ef1c s\u1ef1 hi\u1ec3u AI Agent l\u00e0 g\u00ec? C\u00e1ch s\u1eed d\u1ee5ng node AI Agent tr\u00ean n8n nh\u01b0 th\u1ebf n\u00e0o? C\u00f9ng Tino kh\u00e1m ph\u00e1 qua b\u00e0i vi\u1ebft d\u01b0\u1edbi \u0111\u00e2y nh\u00e9!<\/strong><\/p>\n\n\n\n<h2 id=\"\u0110\u1ecbnh_ngh\u0129a_AI_Agent\"><a id=\"post-105120-_cx5q2l2go19k\"><\/a><strong>\u0110\u1ecbnh ngh\u0129a AI Agent<\/strong><\/h2>\n\n\n\n<h3 id=\"AI_Agent_l\u00e0_g\u00ec?\"><a id=\"post-105120-_m3ckovx6pcx2\"><\/a><strong>AI Agent l\u00e0 g\u00ec?<\/strong><\/h3>\n\n\n\n<p>AI Agent l\u00e0 m\u1ed9t h\u1ec7 th\u1ed1ng ho\u1eb7c ch\u01b0\u01a1ng tr\u00ecnh th\u00f4ng minh \u0111\u01b0\u1ee3c thi\u1ebft k\u1ebf \u0111\u1ec3 th\u1ef1c hi\u1ec7n c\u00e1c nhi\u1ec7m v\u1ee5 t\u1ef1 \u0111\u1ed9ng, \u0111\u01b0a ra quy\u1ebft \u0111\u1ecbnh ho\u1eb7c x\u1eed l\u00fd th\u00f4ng tin d\u1ef1a tr\u00ean d\u1eef li\u1ec7u \u0111\u1ea7u v\u00e0o b\u1eb1ng c\u00e1ch s\u1eed d\u1ee5ng c\u00e1c thu\u1eadt to\u00e1n tr\u00ed tu\u1ec7 nh\u00e2n t\u1ea1o (AI).<\/p>\n\n\n\n<p>AI Agent c\u00f3 kh\u1ea3 n\u0103ng h\u1ecdc h\u1ecfi, ph\u00e2n t\u00edch v\u00e0 t\u01b0\u01a1ng t\u00e1c v\u1edbi m\u00f4i tr\u01b0\u1eddng xung quanh (nh\u01b0 d\u1eef li\u1ec7u, \u1ee9ng d\u1ee5ng ho\u1eb7c ng\u01b0\u1eddi d\u00f9ng) \u0111\u1ec3 ho\u00e0n th\u00e0nh m\u1ee5c ti\u00eau m\u00e0 kh\u00f4ng c\u1ea7n can thi\u1ec7p th\u1ee7 c\u00f4ng li\u00ean t\u1ee5c.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" width=\"700\" height=\"375\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/cach-su-dung-node-ai-agent-tren-n8n-1.png\" alt=\"AI Agent l\u00e0 g\u00ec?\" class=\"wp-image-105136\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/cach-su-dung-node-ai-agent-tren-n8n-1.png 700w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/cach-su-dung-node-ai-agent-tren-n8n-1-300x161.png 300w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><figcaption class=\"wp-element-caption\"><strong>AI Agent l\u00e0 g\u00ec?<\/strong><\/figcaption><\/figure>\n<\/div>\n\n\n<p><\/p>\n\n\n\n<h3 id=\"T\u1ed5ng_quan_v\u1ec1_node_AI_Agent_trong_n8n\"><a id=\"post-105120-_xuunzqnodcs\"><\/a><strong>T\u1ed5ng quan v\u1ec1 node AI Agent trong n8n<\/strong><\/h3>\n\n\n\n<p>Node AI Agent trong n8n cho ph\u00e9p b\u1ea1n t\u00edch h\u1ee3p c\u00e1c m\u00f4 h\u00ecnh ng\u00f4n ng\u1eef l\u1edbn (LLMs) nh\u01b0 <a href=\"https:\/\/tino.vn\/blog\/cach-ket-noi-api-open-ai-vao-n8n\/\" target=\"_blank\" data-type=\"post\" data-id=\"105102\" rel=\"noreferrer noopener\">OpenAI<\/a>, Anthropic, Google Gemini&#8230; v\u00e0o workflow m\u1ed9t c\u00e1ch tr\u1ef1c quan. Node n\u00e0y ho\u1ea1t \u0111\u1ed9ng nh\u01b0 m\u1ed9t &#8220;tr\u1ee3 l\u00fd th\u00f4ng minh&#8221;, c\u00f3 kh\u1ea3 n\u0103ng:\u200b<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Hi\u1ec3u v\u00e0 x\u1eed l\u00fd ng\u00f4n ng\u1eef t\u1ef1 nhi\u00ean<\/li>\n\n\n\n<li>S\u1eed d\u1ee5ng c\u00e1c c\u00f4ng c\u1ee5 b\u00ean ngo\u00e0i (nh\u01b0 HTTP Request, Google Sheets&#8230;)<\/li>\n\n\n\n<li>Ra quy\u1ebft \u0111\u1ecbnh v\u00e0 th\u1ef1c hi\u1ec7n h\u00e0nh \u0111\u1ed9ng d\u1ef1a tr\u00ean d\u1eef li\u1ec7u \u0111\u1ea7u v\u00e0o\u200b<\/li>\n<\/ul>\n\n\n\n<h3 id=\"Node_AI_Agent_c\u00f3_kh\u00e1c_g\u00ec_so_v\u1edbi_node_Open_AI_tr\u00ean_n8n?\"><a id=\"post-105120-_68gg6kpgaty4\"><\/a><strong>Node AI Agent c\u00f3 kh\u00e1c g\u00ec so v\u1edbi node Open AI tr\u00ean n8n?<\/strong><\/h3>\n\n\n\n<h4 id=\"M\u1ee5c_\u0111\u00edch_v\u00e0_ch\u1ee9c_n\u0103ng_ch\u00ednh\"><a id=\"post-105120-_8wchptd15jji\"><\/a><strong>M\u1ee5c \u0111\u00edch v\u00e0 ch\u1ee9c n\u0103ng ch\u00ednh<\/strong><\/h4>\n\n\n\n<p><strong>Open AI node:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u0110\u01b0\u1ee3c thi\u1ebft k\u1ebf \u0111\u1ec3 t\u00edch h\u1ee3p tr\u1ef1c ti\u1ebfp v\u1edbi API c\u1ee7a Open AI, cho ph\u00e9p s\u1eed d\u1ee5ng c\u00e1c m\u00f4 h\u00ecnh AI c\u1ee5 th\u1ec3 c\u1ee7a Open AI.<\/li>\n\n\n\n<li>T\u1eadp trung v\u00e0o vi\u1ec7c th\u1ef1c hi\u1ec7n c\u00e1c t\u00e1c v\u1ee5 ri\u00eang l\u1ebb, nh\u01b0 t\u1ea1o v\u0103n b\u1ea3n, sinh h\u00ecnh \u1ea3nh, ph\u00e2n t\u00edch d\u1eef li\u1ec7u, ho\u1eb7c tr\u1ea3 l\u1eddi c\u00e2u h\u1ecfi d\u1ef1a tr\u00ean prompt.<\/li>\n\n\n\n<li>Ho\u1ea1t \u0111\u1ed9ng nh\u01b0 m\u1ed9t node \u0111\u1ed9c l\u1eadp, g\u1eedi y\u00eau c\u1ea7u tr\u1ef1c ti\u1ebfp \u0111\u1ebfn Open AI v\u00e0 nh\u1eadn k\u1ebft qu\u1ea3 tr\u1ea3 v\u1ec1.<\/li>\n<\/ul>\n\n\n\n<p><strong>V\u00ed d\u1ee5:<\/strong> B\u1ea1n c\u00f3 th\u1ec3 d\u00f9ng Open AI node \u0111\u1ec3 t\u1ea1o m\u1ed9t \u0111o\u1ea1n v\u0103n b\u1ea3n v\u1edbi prompt &#8220;Vi\u1ebft m\u1ed9t b\u00e0i tweet v\u1ec1 AI&#8221; ho\u1eb7c sinh h\u00ecnh \u1ea3nh t\u1eeb m\u00f4 t\u1ea3.<\/p>\n\n\n\n<p><strong>AI Agent node:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>L\u00e0 m\u1ed9t node t\u1ed5ng qu\u00e1t h\u01a1n, \u0111\u01b0\u1ee3c thi\u1ebft k\u1ebf \u0111\u1ec3 x\u00e2y d\u1ef1ng c\u00e1c t\u00e1c nh\u00e2n AI (AI agents) c\u00f3 kh\u1ea3 n\u0103ng ra quy\u1ebft \u0111\u1ecbnh v\u00e0 t\u01b0\u01a1ng t\u00e1c v\u1edbi nhi\u1ec1u c\u00f4ng c\u1ee5 ho\u1eb7c d\u1ecbch v\u1ee5 b\u00ean ngo\u00e0i.<\/li>\n\n\n\n<li>Kh\u00f4ng gi\u1edbi h\u1ea1n \u1edf Open AI; n\u00f3 c\u00f3 th\u1ec3 k\u1ebft n\u1ed1i v\u1edbi nhi\u1ec1u m\u00f4 h\u00ecnh ng\u00f4n ng\u1eef l\u1edbn (LLM) kh\u00e1c nhau (nh\u01b0 Open AI, Google Gemini, DeepSeek) th\u00f4ng qua Chat Model sub-nodes.<\/li>\n\n\n\n<li>H\u1ed7 tr\u1ee3 t\u00edch h\u1ee3p c\u00e1c c\u00f4ng c\u1ee5 (tools), b\u1ed9 nh\u1edb (memory), v\u00e0 logic ph\u1ee9c t\u1ea1p \u0111\u1ec3 x\u1eed l\u00fd c\u00e1c t\u00e1c v\u1ee5 theo ng\u1eef c\u1ea3nh, nh\u01b0 chatbot ho\u1eb7c quy tr\u00ecnh t\u1ef1 \u0111\u1ed9ng h\u00f3a th\u00f4ng minh.<\/li>\n<\/ul>\n\n\n\n<p><strong>V\u00ed d\u1ee5:<\/strong> AI Agent node c\u00f3 th\u1ec3 \u0111\u01b0\u1ee3c d\u00f9ng \u0111\u1ec3 t\u1ea1o m\u1ed9t chatbot tr\u1ea3 l\u1eddi c\u00e2u h\u1ecfi, s\u1eed d\u1ee5ng b\u1ed9 nh\u1edb \u0111\u1ec3 l\u01b0u ng\u1eef c\u1ea3nh cu\u1ed9c tr\u00f2 chuy\u1ec7n v\u00e0 g\u1ecdi c\u00f4ng c\u1ee5 nh\u01b0 t\u00ecm ki\u1ebfm web \u0111\u1ec3 tr\u1ea3 l\u1eddi ch\u00ednh x\u00e1c h\u01a1n.<\/p>\n\n\n\n<h4 id=\"Kh\u1ea3_n\u0103ng_t\u00edch_h\u1ee3p_v\u00e0_t\u00ednh_linh_ho\u1ea1t\"><a id=\"post-105120-_ween9tpa6fru\"><\/a><strong>Kh\u1ea3 n\u0103ng t\u00edch h\u1ee3p v\u00e0 t\u00ednh linh ho\u1ea1t<\/strong><\/h4>\n\n\n\n<p><strong>Open AI node:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Ch\u1ec9 ho\u1ea1t \u0111\u1ed9ng v\u1edbi API c\u1ee7a Open AI v\u00e0 y\u00eau c\u1ea7u API Key t\u1eeb t\u00e0i kho\u1ea3n Open AI.<\/li>\n\n\n\n<li>H\u1ed7 tr\u1ee3 c\u00e1c t\u00ednh n\u0103ng c\u1ee5 th\u1ec3 c\u1ee7a Open AI, nh\u01b0 t\u1ea1o v\u0103n b\u1ea3n (completions), sinh h\u00ecnh \u1ea3nh (DALL-E), ho\u1eb7c s\u1eed d\u1ee5ng tr\u1ee3 l\u00fd (assistants).<\/li>\n\n\n\n<li>\u00cdt linh ho\u1ea1t h\u01a1n v\u00ec n\u00f3 b\u1ecb gi\u1edbi h\u1ea1n trong c\u00e1c endpoint v\u00e0 m\u00f4 h\u00ecnh do Open AI cung c\u1ea5p.<\/li>\n\n\n\n<li>N\u1ebfu b\u1ea1n mu\u1ed1n g\u1ecdi m\u1ed9t t\u00ednh n\u0103ng kh\u00f4ng \u0111\u01b0\u1ee3c h\u1ed7 tr\u1ee3 tr\u1ef1c ti\u1ebfp, b\u1ea1n ph\u1ea3i d\u00f9ng HTTP Request node \u0111\u1ec3 g\u1ecdi API Open AI th\u1ee7 c\u00f4ng.<\/li>\n<\/ul>\n\n\n\n<p><strong>AI Agent node:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Linh ho\u1ea1t h\u01a1n, c\u00f3 th\u1ec3 k\u1ebft n\u1ed1i v\u1edbi nhi\u1ec1u nh\u00e0 cung c\u1ea5p LLM (bao g\u1ed3m Open AI) th\u00f4ng qua Chat Model sub-nodes (nh\u01b0 OpenAI Chat Model, Google Gemini, &#8230;).<\/li>\n\n\n\n<li>H\u1ed7 tr\u1ee3 Tools Agent, cho ph\u00e9p t\u00edch h\u1ee3p c\u00e1c c\u00f4ng c\u1ee5 b\u00ean ngo\u00e0i (nh\u01b0 t\u00ecm ki\u1ebfm web, truy v\u1ea5n c\u01a1 s\u1edf d\u1eef li\u1ec7u, ho\u1eb7c API t\u00f9y ch\u1ec9nh) \u0111\u1ec3 m\u1edf r\u1ed9ng kh\u1ea3 n\u0103ng c\u1ee7a AI.<\/li>\n\n\n\n<li>C\u00f3 th\u1ec3 g\u1eafn memory sub-nodes (nh\u01b0 Window Buffer Memory) \u0111\u1ec3 l\u01b0u tr\u1eef ng\u1eef c\u1ea3nh cu\u1ed9c tr\u00f2 chuy\u1ec7n, gi\u00fap x\u1eed l\u00fd c\u00e1c t\u01b0\u01a1ng t\u00e1c li\u00ean t\u1ee5c (v\u00ed d\u1ee5: chatbot nh\u1edb t\u00ean ng\u01b0\u1eddi d\u00f9ng).<\/li>\n\n\n\n<li>H\u1ed7 tr\u1ee3 c\u00e1c lo\u1ea1i agent kh\u00e1c nhau (tr\u01b0\u1edbc phi\u00ean b\u1ea3n 1.82.0, c\u00f3 nhi\u1ec1u lo\u1ea1i agent; hi\u1ec7n t\u1ea1i m\u1eb7c \u0111\u1ecbnh l\u00e0 Tools Agent).<\/li>\n<\/ul>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" width=\"700\" height=\"375\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/cach-su-dung-node-ai-agent-tren-n8n-2.png\" alt=\"Node AI Agent c\u00f3 kh\u00e1c g\u00ec so v\u1edbi node Open AI tr\u00ean n8n?\" class=\"wp-image-105137\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/cach-su-dung-node-ai-agent-tren-n8n-2.png 700w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/cach-su-dung-node-ai-agent-tren-n8n-2-300x161.png 300w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><figcaption class=\"wp-element-caption\"><strong>Node AI Agent c\u00f3 kh\u00e1c g\u00ec so v\u1edbi node Open AI tr\u00ean n8n?<\/strong><\/figcaption><\/figure>\n<\/div>\n\n\n<p><\/p>\n\n\n\n<h4 id=\"Hi\u1ec7u_su\u1ea5t_v\u00e0_chi_ph\u00ed\"><a id=\"post-105120-_tjdxkjj8czsc\"><\/a><strong>Hi\u1ec7u su\u1ea5t v\u00e0 chi ph\u00ed<\/strong><\/h4>\n\n\n\n<p><strong>Open AI node:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>V\u00ec ch\u1ec9 s\u1eed d\u1ee5ng API Open AI, chi ph\u00ed ph\u1ee5 thu\u1ed9c v\u00e0o s\u1ed1 l\u01b0\u1ee3ng token \u0111\u01b0\u1ee3c x\u1eed l\u00fd b\u1edfi m\u00f4 h\u00ecnh Open AI (xem gi\u00e1 t\u1ea1i https:\/\/openai.com\/api\/pricing).<\/li>\n\n\n\n<li>Hi\u1ec7u su\u1ea5t ph\u1ee5 thu\u1ed9c v\u00e0o t\u1ed1c \u0111\u1ed9 ph\u1ea3n h\u1ed3i c\u1ee7a m\u00e1y ch\u1ee7 Open AI v\u00e0 c\u1ea5u h\u00ecnh node (nh\u01b0 m\u00f4 h\u00ecnh, s\u1ed1 token t\u1ed1i \u0111a).<\/li>\n<\/ul>\n\n\n\n<p><strong>AI Agent node:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Chi ph\u00ed ph\u1ee5 thu\u1ed9c v\u00e0o nh\u00e0 cung c\u1ea5p LLM \u0111\u01b0\u1ee3c s\u1eed d\u1ee5ng (v\u00ed d\u1ee5: Open AI, Google Gemini) v\u00e0 c\u00e1c c\u00f4ng c\u1ee5 b\u1ed5 sung (nh\u01b0 API t\u00ecm ki\u1ebfm web).<\/li>\n\n\n\n<li>C\u00f3 th\u1ec3 t\u1ed1n nhi\u1ec1u t\u00e0i nguy\u00ean h\u01a1n do x\u1eed l\u00fd logic ph\u1ee9c t\u1ea1p, t\u00edch h\u1ee3p nhi\u1ec1u sub-nodes v\u00e0 duy tr\u00ec b\u1ed9 nh\u1edb.<\/li>\n<\/ul>\n\n\n\n<p>B\u1ea3ng so s\u00e1nh nhanh:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"959\" height=\"420\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/word-image-105120-4.png\" alt=\"B\u1ea3ng so s\u00e1nh nhanh\" class=\"wp-image-105124\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/word-image-105120-4.png 959w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/word-image-105120-4-300x131.png 300w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/word-image-105120-4-768x336.png 768w\" sizes=\"(max-width: 959px) 100vw, 959px\" \/><figcaption class=\"wp-element-caption\"><strong>B\u1ea3ng so s\u00e1nh nhanh<\/strong><\/figcaption><\/figure>\n<\/div>\n\n\n<p><\/p>\n\n\n\n<h2 id=\"H\u01b0\u1edbng_d\u1eabn_c\u00e1ch_s\u1eed_d\u1ee5ng_node_AI_Agent_tr\u00ean_n8n\"><a id=\"post-105120-_gyso5a3r6g3i\"><\/a><strong>H\u01b0\u1edbng d\u1eabn c\u00e1ch s\u1eed d\u1ee5ng node AI Agent tr\u00ean n8n<\/strong><\/h2>\n\n\n\n<h3 id=\"Gi\u1ea3i_th\u00edch_c\u00e1c_th\u00e0nh_ph\u1ea7n_trong_node_AI_Agent\"><a id=\"post-105120-_lgonnq3rjjz8\"><\/a><strong>Gi\u1ea3i th\u00edch c\u00e1c th\u00e0nh ph\u1ea7n trong node AI Agent<\/strong><\/h3>\n\n\n\n<h4 id=\"User_Message\"><a id=\"post-105120-_jahycioc4s33\"><\/a><strong>User Message<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>M\u00f4 t\u1ea3:<\/strong> L\u00e0 tin nh\u1eafn ho\u1eb7c c\u00e2u h\u1ecfi m\u00e0 ng\u01b0\u1eddi d\u00f9ng g\u1eedi \u0111\u1ebfn AI Agent, \u0111\u00f3ng vai tr\u00f2 l\u00e0 \u0111\u1ea7u v\u00e0o ch\u00ednh \u0111\u1ec3 AI x\u1eed l\u00fd.<\/li>\n\n\n\n<li><strong>Ch\u1ee9c n\u0103ng: <\/strong>Cung c\u1ea5p n\u1ed9i dung c\u1ee5 th\u1ec3 (nh\u01b0 c\u00e2u h\u1ecfi, y\u00eau c\u1ea7u) \u0111\u1ec3 AI t\u1ea1o ra ph\u1ea3n h\u1ed3i.<\/li>\n\n\n\n<li>Th\u01b0\u1eddng \u0111\u01b0\u1ee3c l\u1ea5y t\u1eeb node tr\u01b0\u1edbc (nh\u01b0 Webhook, Chat Message node) ho\u1eb7c nh\u1eadp tr\u1ef1c ti\u1ebfp trong AI Agent node<\/li>\n<\/ul>\n\n\n\n<p>V\u00ed d\u1ee5:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Ng\u01b0\u1eddi d\u00f9ng h\u1ecfi:<\/strong> &#8220;Th\u1eddi ti\u1ebft h\u00f4m nay \u1edf H\u00e0 N\u1ed9i th\u1ebf n\u00e0o?&#8221;.<\/li>\n\n\n\n<li><strong>User Message s\u1ebd l\u00e0: <\/strong>Th\u1eddi ti\u1ebft h\u00f4m nay \u1edf H\u00e0 N\u1ed9i th\u1ebf n\u00e0o?.<\/li>\n<\/ul>\n\n\n\n<h4 id=\"System_Message\"><a id=\"post-105120-_w0axwvjzes0u\"><\/a><strong>System Message<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>M\u00f4 t\u1ea3:<\/strong> L\u00e0 h\u01b0\u1edbng d\u1eabn ho\u1eb7c b\u1ed1i c\u1ea3nh m\u00e0 b\u1ea1n cung c\u1ea5p \u0111\u1ec3 \u0111\u1ecbnh h\u00ecnh c\u00e1ch AI tr\u1ea3 l\u1eddi. N\u00f3 gi\u1ed1ng nh\u01b0 &#8220;vai tr\u00f2&#8221; ho\u1eb7c &#8220;quy t\u1eafc&#8221; m\u00e0 AI ph\u1ea3i tu\u00e2n theo.<\/li>\n\n\n\n<li><strong>Ch\u1ee9c n\u0103ng: <\/strong>Gi\u00fap AI hi\u1ec3u r\u00f5 nhi\u1ec7m v\u1ee5, phong c\u00e1ch tr\u1ea3 l\u1eddi, ho\u1eb7c th\u00f4ng tin n\u1ec1n tr\u01b0\u1edbc khi x\u1eed l\u00fd User Message.<\/li>\n<\/ul>\n\n\n\n<p>V\u00ed d\u1ee5:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>System Message:<\/strong> B\u1ea1n l\u00e0 tr\u1ee3 l\u00fd AI c\u1ee7a m\u1ed9t c\u00f4ng ty du l\u1ecbch. Tr\u1ea3 l\u1eddi ng\u1eafn g\u1ecdn, th\u00e2n thi\u1ec7n v\u00e0 lu\u00f4n \u0111\u1ec1 xu\u1ea5t tour du l\u1ecbch..<\/li>\n\n\n\n<li><strong>Khi ng\u01b0\u1eddi d\u00f9ng h\u1ecfi: <\/strong>&#8220;C\u00f3 g\u00ec th\u00fa v\u1ecb \u1edf \u0110\u00e0 L\u1ea1t?&#8221;, AI s\u1ebd tr\u1ea3 l\u1eddi d\u1ef1a tr\u00ean h\u01b0\u1edbng d\u1eabn n\u00e0y, nh\u01b0: &#8220;\u0110\u00e0 L\u1ea1t c\u00f3 h\u1ed3 Xu\u00e2n H\u01b0\u01a1ng v\u00e0 \u0111\u1ed3i ch\u00e8. B\u1ea1n mu\u1ed1n \u0111\u1eb7t tour kh\u00e1m ph\u00e1 \u0110\u00e0 L\u1ea1t kh\u00f4ng?&#8221;.<\/li>\n<\/ul>\n\n\n\n<h4 id=\"Require_Specific_Output_Format\"><a id=\"post-105120-_3vrdqcjbefe7\"><\/a><strong>Require Specific Output Format<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>M\u00f4 t\u1ea3:<\/strong> Y\u00eau c\u1ea7u AI tr\u1ea3 l\u1eddi theo m\u1ed9t \u0111\u1ecbnh d\u1ea1ng c\u1ee5 th\u1ec3, nh\u01b0 JSON, danh s\u00e1ch ho\u1eb7c v\u0103n b\u1ea3n thu\u1ea7n.<\/li>\n\n\n\n<li><strong>Ch\u1ee9c n\u0103ng: <\/strong>\u0110\u1ea3m b\u1ea3o ph\u1ea3n h\u1ed3i c\u1ee7a AI d\u1ec5 s\u1eed d\u1ee5ng trong c\u00e1c node ti\u1ebfp theo (nh\u01b0 l\u01b0u v\u00e0o Google Sheets ho\u1eb7c g\u1eedi qua email).<\/li>\n\n\n\n<li>Th\u01b0\u1eddng \u0111\u1ec3 m\u1eb7c \u0111\u1ecbnh.<\/li>\n<\/ul>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" width=\"700\" height=\"375\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/cach-su-dung-node-ai-agent-tren-n8n-3.png\" alt=\"C\u00e1c th\u00e0nh ph\u1ea7n trong node AI Agent\" class=\"wp-image-105138\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/cach-su-dung-node-ai-agent-tren-n8n-3.png 700w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/cach-su-dung-node-ai-agent-tren-n8n-3-300x161.png 300w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><figcaption class=\"wp-element-caption\"><strong>C\u00e1c th\u00e0nh ph\u1ea7n trong node AI Agent<\/strong><\/figcaption><\/figure>\n<\/div>\n\n\n<p><\/p>\n\n\n\n<h4 id=\"Chat_Model\"><a id=\"post-105120-_5ui8od55katw\"><\/a><strong>Chat Model<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>M\u00f4 t\u1ea3: <\/strong>L\u00e0 m\u00f4 h\u00ecnh ng\u00f4n ng\u1eef l\u1edbn (LLM) m\u00e0 AI Agent s\u1eed d\u1ee5ng \u0111\u1ec3 x\u1eed l\u00fd v\u00e0 tr\u1ea3 l\u1eddi, nh\u01b0 GPT-3.5-turbo (Open AI), Google Gemini ho\u1eb7c DeepSeek.<\/li>\n\n\n\n<li><strong>Ch\u1ee9c n\u0103ng: <\/strong>\u0110\u01b0\u1ee3c xem l\u00e0 &#8220;b\u1ed9 n\u00e3o&#8221; c\u1ee7a AI Agent, quy\u1ebft \u0111\u1ecbnh ch\u1ea5t l\u01b0\u1ee3ng v\u00e0 phong c\u00e1ch tr\u1ea3 l\u1eddi. B\u1ea1n c\u1ea7n API Key t\u1eeb nh\u00e0 cung c\u1ea5p LLM.<\/li>\n<\/ul>\n\n\n\n<h4 id=\"Memory\"><a id=\"post-105120-_nabqo4e6eser\"><\/a><strong>Memory<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>M\u00f4 t\u1ea3: <\/strong>B\u1ed9 nh\u1edb gi\u00fap AI Agent ghi nh\u1edb ng\u1eef c\u1ea3nh c\u1ee7a c\u00e1c t\u01b0\u01a1ng t\u00e1c tr\u01b0\u1edbc, r\u1ea5t h\u1eefu \u00edch cho c\u00e1c cu\u1ed9c tr\u00f2 chuy\u1ec7n li\u00ean t\u1ee5c (nh\u01b0 chatbot).<\/li>\n\n\n\n<li><strong>Ch\u1ee9c n\u0103ng: <\/strong>L\u01b0u tr\u1eef l\u1ecbch s\u1eed tin nh\u1eafn (User Message v\u00e0 ph\u1ea3n h\u1ed3i) \u0111\u1ec3 AI tr\u1ea3 l\u1eddi nh\u1ea5t qu\u00e1n v\u00e0 ph\u00f9 h\u1ee3p v\u1edbi b\u1ed1i c\u1ea3nh.<\/li>\n<\/ul>\n\n\n\n<p>V\u00ed d\u1ee5:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Ng\u01b0\u1eddi d\u00f9ng h\u1ecfi: &#8220;AI l\u00e0 g\u00ec?&#8221; -&gt; AI tr\u1ea3 l\u1eddi: &#8220;AI l\u00e0 tr\u00ed tu\u1ec7 nh\u00e2n t\u1ea1o.&#8221;<\/li>\n\n\n\n<li>Ng\u01b0\u1eddi d\u00f9ng h\u1ecfi ti\u1ebfp: &#8220;N\u00f3 ho\u1ea1t \u0111\u1ed9ng th\u1ebf n\u00e0o?&#8221; -&gt; V\u1edbi Memory, AI bi\u1ebft c\u00e2u h\u1ecfi li\u00ean quan \u0111\u1ebfn AI v\u00e0 tr\u1ea3 l\u1eddi: &#8220;AI ho\u1ea1t \u0111\u1ed9ng b\u1eb1ng c\u00e1ch h\u1ecdc t\u1eeb d\u1eef li\u1ec7u, s\u1eed d\u1ee5ng c\u00e1c thu\u1eadt to\u00e1n nh\u01b0 m\u1ea1ng n\u01a1-ron.&#8221;<\/li>\n\n\n\n<li>N\u1ebfu kh\u00f4ng c\u00f3 Memory, AI c\u00f3 th\u1ec3 kh\u00f4ng hi\u1ec3u &#8220;n\u00f3&#8221; l\u00e0 g\u00ec.<\/li>\n<\/ul>\n\n\n\n<h4 id=\"Tool\"><a id=\"post-105120-_yc9hwslicmpt\"><\/a><strong>Tool<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>M\u00f4 t\u1ea3:<\/strong> L\u00e0 c\u00f4ng c\u1ee5 b\u1ed5 sung m\u00e0 AI Agent c\u00f3 th\u1ec3 s\u1eed d\u1ee5ng \u0111\u1ec3 l\u1ea5y th\u00f4ng tin ho\u1eb7c th\u1ef1c hi\u1ec7n h\u00e0nh \u0111\u1ed9ng, nh\u01b0 t\u00ecm ki\u1ebfm web, truy v\u1ea5n c\u01a1 s\u1edf d\u1eef li\u1ec7u ho\u1eb7c g\u1ecdi API.<\/li>\n\n\n\n<li><strong>Ch\u1ee9c n\u0103ng: <\/strong>M\u1edf r\u1ed9ng kh\u1ea3 n\u0103ng c\u1ee7a AI, cho ph\u00e9p tr\u1ea3 l\u1eddi c\u00e1c c\u00e2u h\u1ecfi c\u1ea7n d\u1eef li\u1ec7u b\u00ean ngo\u00e0i ho\u1eb7c th\u1ef1c hi\u1ec7n t\u00e1c v\u1ee5 \u0111\u1eb7c bi\u1ec7t.<\/li>\n<\/ul>\n\n\n\n<p>V\u00ed d\u1ee5:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Tool: Brave Search (t\u00ecm ki\u1ebfm web).<\/li>\n\n\n\n<li>Ng\u01b0\u1eddi d\u00f9ng h\u1ecfi: &#8220;Th\u1eddi ti\u1ebft h\u00f4m nay \u1edf H\u00e0 N\u1ed9i?&#8221;.<\/li>\n\n\n\n<li>AI Agent d\u00f9ng Brave Search \u0111\u1ec3 l\u1ea5y d\u1eef li\u1ec7u th\u1eddi gian th\u1ef1c v\u00e0 tr\u1ea3 l\u1eddi: &#8220;H\u00f4m nay \u1edf H\u00e0 N\u1ed9i tr\u1eddi n\u1eafng, nhi\u1ec7t \u0111\u1ed9 28\u00b0C.&#8221;<\/li>\n<\/ul>\n\n\n\n<h3 id=\"C\u00e1ch_s\u1eed_d\u1ee5ng_node_AI_Agent_c\u01a1_b\u1ea3n\"><a id=\"post-105120-_hastfz85wg1n\"><\/a><strong>C\u00e1ch s\u1eed d\u1ee5ng node AI Agent c\u01a1 b\u1ea3n<\/strong><\/h3>\n\n\n\n<p>Trong b\u00e0i vi\u1ebft n\u00e0y, Tino s\u1ebd h\u01b0\u1edbng d\u1eabn b\u1ea1n c\u00e1ch s\u1eed d\u1ee5ng AI Agent trong n8n \u0111\u1ec3 t\u1ea1o m\u1ed9t chatbot tr\u1ea3 l\u1eddi c\u00e2u h\u1ecfi c\u01a1 b\u1ea3n b\u1eb1ng Open AI (GPT-3.5-turbo).<\/p>\n\n\n\n<p><strong>M\u1ee5c ti\u00eau:<\/strong> T\u1ea1o workflow nh\u1eadn c\u00e2u h\u1ecfi t\u1eeb ng\u01b0\u1eddi d\u00f9ng (v\u00ed d\u1ee5: &#8220;AI l\u00e0 g\u00ec?&#8221;) v\u00e0 s\u1eed d\u1ee5ng AI Agent node v\u1edbi Open AI \u0111\u1ec3 tr\u1ea3 l\u1eddi ng\u1eafn g\u1ecdn.<\/p>\n\n\n\n<p><strong>B\u01b0\u1edbc 1:<\/strong> \u0110\u0103ng nh\u1eadp v\u00e0o n8n. B\u1ea5m &#8220;<strong>Create Workflow<\/strong>&#8221; \u0111\u1ec3 t\u1ea1o workflow m\u1edbi.<\/p>\n\n\n\n<p><strong>B\u01b0\u1edbc 2:<\/strong> Nh\u1ea5n <strong>d\u1ea5u +<\/strong> tr\u00ean canvas, t\u00ecm <strong>Manual Trigger<\/strong>. \u0110\u00e2y l\u00e0 trigger \u0111\u1ec3 ch\u1ea1y th\u1eed workflow th\u1ee7 c\u00f4ng.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"1477\" height=\"800\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/word-image-105120-6.png\" alt=\"C\u00e1ch s\u1eed d\u1ee5ng node AI Agent c\u01a1 b\u1ea3n\" class=\"wp-image-105126\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/word-image-105120-6.png 1477w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/word-image-105120-6-300x162.png 300w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/word-image-105120-6-1024x555.png 1024w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/word-image-105120-6-768x416.png 768w\" sizes=\"(max-width: 1477px) 100vw, 1477px\" \/><figcaption class=\"wp-element-caption\"><strong>C\u00e1ch s\u1eed d\u1ee5ng node AI Agent c\u01a1 b\u1ea3n<\/strong><\/figcaption><\/figure>\n<\/div>\n\n\n<p><\/p>\n\n\n\n<p><strong>B\u01b0\u1edbc 3:<\/strong> Th\u00eam node <strong>Set<\/strong> v\u00e0o workflow. \u0110\u00e2y l\u00e0 node gi\u1ea3 l\u1eadp d\u1eef li\u1ec7u \u0111\u1ea7u v\u00e0o cho AI Agent.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"1457\" height=\"805\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/word-image-105120-7.png\" alt=\"C\u00e1ch s\u1eed d\u1ee5ng node AI Agent c\u01a1 b\u1ea3n\" class=\"wp-image-105127\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/word-image-105120-7.png 1457w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/word-image-105120-7-300x166.png 300w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/word-image-105120-7-1024x566.png 1024w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/word-image-105120-7-768x424.png 768w\" sizes=\"(max-width: 1457px) 100vw, 1457px\" \/><figcaption class=\"wp-element-caption\"><strong>C\u00e1ch s\u1eed d\u1ee5ng node AI Agent c\u01a1 b\u1ea3n<\/strong><\/figcaption><\/figure>\n<\/div>\n\n\n<p><\/p>\n\n\n\n<p>Trong c\u1ea5u h\u00ecnh node Set, \u0111\u1eb7t t\u00ean l\u00e0<strong> question<\/strong>.<\/p>\n\n\n\n<p>Nh\u1ea5n <strong>Add Fields<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Type:<\/strong> String.<\/li>\n\n\n\n<li><strong>Nh\u1eadp v\u00e0o \u00f4 Value: <\/strong><em>Tr\u00e1i \u0111\u1ea5t c\u00f3 bao nhi\u00eau l\u1ee5c \u0111\u1ecba?<\/em><\/li>\n<\/ul>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"1546\" height=\"834\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/word-image-105120-8.png\" alt=\"C\u00e1ch s\u1eed d\u1ee5ng node AI Agent c\u01a1 b\u1ea3n\" class=\"wp-image-105128\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/word-image-105120-8.png 1546w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/word-image-105120-8-300x162.png 300w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/word-image-105120-8-1024x552.png 1024w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/word-image-105120-8-768x414.png 768w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/word-image-105120-8-1536x829.png 1536w\" sizes=\"(max-width: 1546px) 100vw, 1546px\" \/><figcaption class=\"wp-element-caption\"><strong>C\u00e1ch s\u1eed d\u1ee5ng node AI Agent c\u01a1 b\u1ea3n<\/strong><\/figcaption><\/figure>\n<\/div>\n\n\n<p><\/p>\n\n\n\n<p><strong>B\u01b0\u1edbc 4: <\/strong>Th\u00eam v\u00e0 c\u1ea5u h\u00ecnh node <strong>AI Agent<\/strong>.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"1632\" height=\"797\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/word-image-105120-9.png\" alt=\"C\u00e1ch s\u1eed d\u1ee5ng node AI Agent c\u01a1 b\u1ea3n\" class=\"wp-image-105129\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/word-image-105120-9.png 1632w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/word-image-105120-9-300x147.png 300w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/word-image-105120-9-1024x500.png 1024w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/word-image-105120-9-768x375.png 768w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/word-image-105120-9-1536x750.png 1536w\" sizes=\"(max-width: 1632px) 100vw, 1632px\" \/><figcaption class=\"wp-element-caption\"><strong>C\u00e1ch s\u1eed d\u1ee5ng node AI Agent c\u01a1 b\u1ea3n<\/strong><\/figcaption><\/figure>\n<\/div>\n\n\n<p><\/p>\n\n\n\n<p>Sau khi \u0111\u00e3 hi\u1ec3u \u0111\u01b0\u1ee3c c\u00e1c th\u00e0nh ph\u1ea7n c\u1ee7a node AI Agent, c\u1ea5u h\u00ecnh node n\u00e0y nh\u01b0 sau:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p><strong>Th\u00e0nh ph\u1ea7n<\/strong><\/p>\n<\/th><th>\n<p><strong>C\u00e1ch thi\u1ebft l\u1eadp<\/strong><\/p>\n<\/th><\/tr><tr><th>\n<p><strong>Source for Prompt<\/strong><\/p>\n<\/th><th>\n<p>Ch\u1ecdn <strong>Define below <\/strong>\u0111\u1ec3 l\u1ea5y c\u00e2u h\u1ecfi t\u1eeb node <strong>Set<\/strong><\/p>\n<\/th><\/tr><tr><th>\n<p><strong>User Message<\/strong><\/p>\n<\/th><th>\n<p>K\u00e9o th\u1ea3 c\u00e2u h\u1ecfi t\u1eeb node Set: {{$json[&#8220;question&#8221;]}}<\/p>\n<\/th><\/tr><tr><th>\n<p><strong>System Message<\/strong><\/p>\n<\/th><th>\n<p>(Kh\u00f4ng b\u1eaft bu\u1ed9c) Nh\u1ea5n <strong>Option<\/strong> -&gt; <strong>System Message<\/strong>, ghi: <em>B\u1ea1n l\u00e0 m\u1ed9t gi\u00e1o vi\u00ean khoa h\u1ecdc, tr\u1ea3 l\u1eddi d\u1ec5 hi\u1ec3u, th\u00e2n thi\u1ec7n<\/em>.<\/p>\n<\/th><\/tr><tr><th>\n<p><strong>Require Specific Output Format<\/strong><\/p>\n<\/th><th>\n<p>T\u1eaft (v\u00ec ch\u1ec9 c\u1ea7n tr\u1ea3 l\u1eddi v\u0103n b\u1ea3n t\u1ef1 nhi\u00ean).<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"1463\" height=\"776\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/word-image-105120-10.png\" alt=\"C\u00e1ch s\u1eed d\u1ee5ng node AI Agent c\u01a1 b\u1ea3n\" class=\"wp-image-105130\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/word-image-105120-10.png 1463w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/word-image-105120-10-300x159.png 300w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/word-image-105120-10-1024x543.png 1024w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/word-image-105120-10-768x407.png 768w\" sizes=\"(max-width: 1463px) 100vw, 1463px\" \/><figcaption class=\"wp-element-caption\"><strong>C\u00e1ch s\u1eed d\u1ee5ng node AI Agent c\u01a1 b\u1ea3n<\/strong><\/figcaption><\/figure>\n<\/div>\n\n\n<p><\/p>\n\n\n\n<p><strong>C\u1ea5u h\u00ecnh Chat model: <\/strong><\/p>\n\n\n\n<p>Nh\u1ea5p v\u00e0o d\u1ea5u + t\u1ea1i <strong>Chat mode<\/strong> -&gt; Ch\u1ecdn model b\u1ea1n \u0111\u00e3 k\u1ebft n\u1ed1i API tr\u01b0\u1edbc \u0111\u00f3, v\u00ed d\u1ee5: OpenAI Chat Model. Tham kh\u1ea3o b\u00e0i vi\u1ebft: <a href=\"https:\/\/tino.vn\/blog\/cach-ket-noi-api-open-ai-vao-n8n\/\" target=\"_blank\" data-type=\"post\" data-id=\"105102\" rel=\"noreferrer noopener\">C\u00e1ch k\u1ebft n\u1ed1i API OpenAI v\u00e0o n8n<\/a> \u0111\u1ec3 bi\u1ebft th\u00eam chi ti\u1ebft.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"1448\" height=\"834\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/word-image-105120-11.png\" alt=\"C\u00e1ch s\u1eed d\u1ee5ng node AI Agent c\u01a1 b\u1ea3n\" class=\"wp-image-105131\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/word-image-105120-11.png 1448w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/word-image-105120-11-300x173.png 300w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/word-image-105120-11-1024x590.png 1024w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/word-image-105120-11-768x442.png 768w\" sizes=\"(max-width: 1448px) 100vw, 1448px\" \/><figcaption class=\"wp-element-caption\"><strong>C\u00e1ch s\u1eed d\u1ee5ng node AI Agent c\u01a1 b\u1ea3n<\/strong><\/figcaption><\/figure>\n<\/div>\n\n\n<p><\/p>\n\n\n\n<p><strong>C\u1ea5u h\u00ecnh Memory (t\u00f9y ch\u1ecdn, nh\u01b0ng n\u00ean th\u00eam \u0111\u1ec3 l\u01b0u ng\u1eef c\u1ea3nh):<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Nh\u1ea5p v\u00e0o <strong>d\u1ea5u +<\/strong> t\u1ea1i Memory, ch\u1ecdn <strong>Simple Memory<\/strong>.<\/li>\n\n\n\n<li>Memory Key: ch\u1ecdn <strong>Define below <\/strong>-&gt; <strong>chat_history<\/strong>.<\/li>\n\n\n\n<li>Window Size: 3 (l\u01b0u 3 t\u01b0\u01a1ng t\u00e1c g\u1ea7n nh\u1ea5t).<\/li>\n<\/ul>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"1441\" height=\"786\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/word-image-105120-12.png\" alt=\"C\u00e1ch s\u1eed d\u1ee5ng node AI Agent c\u01a1 b\u1ea3n\" class=\"wp-image-105132\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/word-image-105120-12.png 1441w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/word-image-105120-12-300x164.png 300w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/word-image-105120-12-1024x559.png 1024w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/word-image-105120-12-768x419.png 768w\" sizes=\"(max-width: 1441px) 100vw, 1441px\" \/><figcaption class=\"wp-element-caption\"><strong>C\u00e1ch s\u1eed d\u1ee5ng node AI Agent c\u01a1 b\u1ea3n<\/strong><\/figcaption><\/figure>\n<\/div>\n\n\n<p><\/p>\n\n\n\n<p><strong>C\u1ea5u h\u00ecnh Tools: <\/strong>C\u00f3 th\u1ec3 b\u1ecf qua v\u00ec v\u00ed d\u1ee5 n\u00e0y kh\u00f4ng c\u1ea7n c\u00f4ng c\u1ee5 nh\u01b0 t\u00ecm ki\u1ebfm web.<\/p>\n\n\n\n<p><strong>B\u01b0\u1edbc 5:<\/strong> Nh\u1ea5n <strong>Test step<\/strong> trong AI Agent node.<\/p>\n\n\n\n<p>K\u1ebft qu\u1ea3 mong \u0111\u1ee3i:<\/p>\n\n\n\n<p>AI Agent tr\u1ea3 l\u1eddi, v\u00ed d\u1ee5: &#8220;C\u00f3 b\u1ea3y l\u1ee5c \u0111\u1ecba tr\u00ean Tr\u00e1i \u0110\u1ea5t: Ch\u00e2u \u00c1, Ch\u00e2u Phi, B\u1eafc M\u1ef9, Nam M\u1ef9, Ch\u00e2u Nam C\u1ef1c, Ch\u00e2u \u00c2u v\u00e0 Ch\u00e2u \u00dac.&#8221;<\/p>\n\n\n\n<p>N\u1ebfu c\u00f3 l\u1ed7i:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>401 Unauthorized:<\/strong> Ki\u1ec3m tra API Key trong credential.<\/li>\n\n\n\n<li><strong>429 Too Many Requests:<\/strong> Ki\u1ec3m tra quota Open AI t\u1ea1i <a href=\"https:\/\/platform.openai.com\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">https:\/\/platform.openai.com<\/a>.<\/li>\n<\/ul>\n\n\n\n<p><strong>B\u01b0\u1edbc 6:<\/strong> Nh\u1ea5n<strong> Save <\/strong>\u0111\u1ec3 l\u01b0u workflow.<\/p>\n\n\n\n<p>(T\u00f9y ch\u1ecdn) Thay Manual Trigger b\u1eb1ng Webhook \u0111\u1ec3 nh\u1eadn c\u00e2u h\u1ecfi t\u1eeb \u1ee9ng d\u1ee5ng nh\u01b0 Slack ho\u1eb7c Telegram v\u00e0 th\u00eam node nh\u01b0 Telegram \u0111\u1ec3 g\u1eedi tr\u1ea3 l\u1eddi.<\/p>\n\n\n\n<h3 id=\"K\u1ebft_lu\u1eadn\"><a id=\"post-105120-_faekvdb9r81\"><\/a><strong>K\u1ebft lu\u1eadn<\/strong><\/h3>\n\n\n\n<p>S\u1eed d\u1ee5ng AI Agent node trong n8n m\u1edf ra kh\u1ea3 n\u0103ng x\u00e2y d\u1ef1ng c\u00e1c quy tr\u00ecnh t\u1ef1 \u0111\u1ed9ng h\u00f3a th\u00f4ng minh, t\u1eeb chatbot, ph\u00e2n t\u00edch d\u1eef li\u1ec7u, \u0111\u1ebfn t\u00edch h\u1ee3p c\u00f4ng c\u1ee5 b\u00ean ngo\u00e0i. V\u1edbi s\u1ef1 linh ho\u1ea1t trong vi\u1ec7c k\u1ebft h\u1ee3p c\u00e1c m\u00f4 h\u00ecnh ng\u00f4n ng\u1eef l\u1edbn (LLM), b\u1ed9 nh\u1edb ng\u1eef c\u1ea3nh v\u00e0 c\u00f4ng c\u1ee5 nh\u01b0 t\u00ecm ki\u1ebfm web, node n\u00e0y gi\u00fap b\u1ea1n t\u1ed1i \u01b0u h\u00f3a hi\u1ec7u su\u1ea5t c\u00f4ng vi\u1ec7c m\u1ed9t c\u00e1ch d\u1ec5 d\u00e0ng.<\/p>\n\n\n\n<h2 id=\"Nh\u1eefng_c\u00e2u_h\u1ecfi_th\u01b0\u1eddng_g\u1eb7p\"><strong>Nh\u1eefng c\u00e2u h\u1ecfi th\u01b0\u1eddng g\u1eb7p<\/strong><\/h2>\n\n\n\t\t<section\t\thelp class=\"sc_fs_faq sc_card    \"\n\t\t\t\t>\n\t\t\t\t<h2 id=\"T\u00f4i_c\u1ea7n_g\u00ec_\u0111\u1ec3_s\u1eed_d\u1ee5ng_AI_Agent_node?\">T\u00f4i c\u1ea7n g\u00ec \u0111\u1ec3 s\u1eed d\u1ee5ng AI Agent node?<\/h2>\t\t\t\t<div>\n\t\t\t\t\t\t<div class=\"sc_fs_faq__content\">\n\t\t\t\t\n\n<p>B\u1ea1n c\u1ea7n t\u00e0i kho\u1ea3n n8n (Cloud ho\u1eb7c t\u1ef1 host), API Key t\u1eeb nh\u00e0 cung c\u1ea5p LLM (nh\u01b0 Open AI) v\u00e0 ki\u1ebfn th\u1ee9c c\u01a1 b\u1ea3n v\u1ec1 workflow trong n8n.<\/p>\n\n\t\t\t<\/div>\n\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section\t\thelp class=\"sc_fs_faq sc_card    \"\n\t\t\t\t>\n\t\t\t\t<h2 id=\"S\u1eed_d\u1ee5ng_AI_Agent_node_c\u00f3_t\u1ed1n_ph\u00ed_kh\u00f4ng?\">S\u1eed d\u1ee5ng AI Agent node c\u00f3 t\u1ed1n ph\u00ed kh\u00f4ng?<\/h2>\t\t\t\t<div>\n\t\t\t\t\t\t<div class=\"sc_fs_faq__content\">\n\t\t\t\t\n\n<p>C\u00f3, n\u1ebfu d\u00f9ng LLM nh\u01b0 Open AI, b\u1ea1n s\u1ebd b\u1ecb t\u00ednh ph\u00ed d\u1ef1a tr\u00ean token x\u1eed l\u00fd (xem gi\u00e1 t\u1ea1i https:\/\/openai.com\/api\/pricing). C\u00f4ng c\u1ee5 nh\u01b0 Brave Search c\u0169ng c\u00f3 th\u1ec3 y\u00eau c\u1ea7u API Key tr\u1ea3 ph\u00ed.<\/p>\n\n\t\t\t<\/div>\n\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section\t\thelp class=\"sc_fs_faq sc_card    \"\n\t\t\t\t>\n\t\t\t\t<h2 id=\"T\u00f4i_c\u00f3_th\u1ec3_d\u00f9ng_AI_Agent_node_m\u00e0_kh\u00f4ng_c\u1ea7n_Tool_kh\u00f4ng?\">T\u00f4i c\u00f3 th\u1ec3 d\u00f9ng AI Agent node m\u00e0 kh\u00f4ng c\u1ea7n Tool kh\u00f4ng?<\/h2>\t\t\t\t<div>\n\t\t\t\t\t\t<div class=\"sc_fs_faq__content\">\n\t\t\t\t\n\n<p>C\u00f3, b\u1ea1n c\u00f3 th\u1ec3 b\u1ecf qua Tool n\u1ebfu ch\u1ec9 c\u1ea7n AI tr\u1ea3 l\u1eddi d\u1ef1a tr\u00ean th\u00f4ng tin trong Prompt ho\u1eb7c Chat Message. Tool ch\u1ec9 c\u1ea7n thi\u1ebft khi y\u00eau c\u1ea7u d\u1eef li\u1ec7u b\u00ean ngo\u00e0i (nh\u01b0 t\u00ecm ki\u1ebfm web).<\/p>\n\n\t\t\t<\/div>\n\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section\t\thelp class=\"sc_fs_faq sc_card    \"\n\t\t\t\t>\n\t\t\t\t<h2 id=\"AI_Agent_c\u00f3_gi\u1edbi_h\u1ea1n_\u0111\u1ed9_d\u00e0i_ph\u1ea3n_h\u1ed3i_kh\u00f4ng?\">AI Agent c\u00f3 gi\u1edbi h\u1ea1n \u0111\u1ed9 d\u00e0i ph\u1ea3n h\u1ed3i kh\u00f4ng?<\/h2>\t\t\t\t<div>\n\t\t\t\t\t\t<div class=\"sc_fs_faq__content\">\n\t\t\t\t\n\n<p>C\u00f3. T\u00f9y theo model m\u00e0 b\u1ea1n d\u00f9ng (GPT-3.5, GPT-4,&#8230;), ph\u1ea3n h\u1ed3i s\u1ebd b\u1ecb gi\u1edbi h\u1ea1n b\u1edfi s\u1ed1 tokens. B\u1ea1n c\u00f3 th\u1ec3 \u0111i\u1ec1u ch\u1ec9nh \u0111\u1ed9 d\u00e0i mong mu\u1ed1n b\u1eb1ng c\u00e1ch ki\u1ec3m so\u00e1t prompt v\u00e0 c\u00e0i \u0111\u1eb7t h\u1ec7 th\u1ed1ng.<\/p>\n\n\t\t\t<\/div>\n\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section\t\thelp class=\"sc_fs_faq sc_card    \"\n\t\t\t\t>\n\t\t\t\t<h2 id=\"T\u00f4i_c\u00f3_th\u1ec3_d\u00f9ng_nhi\u1ec1u_node_AI_Agent_trong_m\u1ed9t_workflow_kh\u00f4ng?\">T\u00f4i c\u00f3 th\u1ec3 d\u00f9ng nhi\u1ec1u node AI Agent trong m\u1ed9t workflow kh\u00f4ng?<\/h2>\t\t\t\t<div>\n\t\t\t\t\t\t<div class=\"sc_fs_faq__content\">\n\t\t\t\t\n\n<p>Ho\u00e0n to\u00e0n \u0111\u01b0\u1ee3c. B\u1ea1n c\u00f3 th\u1ec3 d\u00f9ng nhi\u1ec1u node AI Agent \u0111\u1ec3 th\u1ef1c hi\u1ec7n nhi\u1ec1u t\u00e1c v\u1ee5 kh\u00e1c nhau trong c\u00f9ng m\u1ed9t workflow nh\u01b0: t\u1ea1o n\u1ed9i dung, ph\u00e2n t\u00edch c\u1ea3m x\u00fac, d\u1ecbch thu\u1eadt,\u2026<\/p>\n\n\t\t\t<\/div>\n\t\t<\/div>\n\t\t<\/section>\n\t\t\n<script type=\"application\/ld+json\">\n\t{\n\t\t\"@context\": \"https:\/\/schema.org\",\n\t\t\"@type\": \"FAQPage\",\n\t\t\"mainEntity\": [\n\t\t\t\t\t{\n\t\t\t\t\"@type\": \"Question\",\n\t\t\t\t\"name\": \"T\u00f4i c\u1ea7n g\u00ec \u0111\u1ec3 s\u1eed d\u1ee5ng AI Agent node?\",\n\t\t\t\t\"acceptedAnswer\": {\n\t\t\t\t\t\"@type\": \"Answer\",\n\t\t\t\t\t\"text\": \"<p>B\u1ea1n c\u1ea7n t\u00e0i kho\u1ea3n n8n (Cloud ho\u1eb7c t\u1ef1 host), API Key t\u1eeb nh\u00e0 cung c\u1ea5p LLM (nh\u01b0 Open AI) v\u00e0 ki\u1ebfn th\u1ee9c c\u01a1 b\u1ea3n v\u1ec1 workflow trong n8n.<\/p>\"\n\t\t\t\t\t\t\t\t\t}\n\t\t\t}\n\t\t\t,\t\t\t\t{\n\t\t\t\t\"@type\": \"Question\",\n\t\t\t\t\"name\": \"S\u1eed d\u1ee5ng AI Agent node c\u00f3 t\u1ed1n ph\u00ed kh\u00f4ng?\",\n\t\t\t\t\"acceptedAnswer\": {\n\t\t\t\t\t\"@type\": \"Answer\",\n\t\t\t\t\t\"text\": \"<p>C\u00f3, n\u1ebfu d\u00f9ng LLM nh\u01b0 Open AI, b\u1ea1n s\u1ebd b\u1ecb t\u00ednh ph\u00ed d\u1ef1a tr\u00ean token x\u1eed l\u00fd (xem gi\u00e1 t\u1ea1i https:\/\/openai.com\/api\/pricing). C\u00f4ng c\u1ee5 nh\u01b0 Brave Search c\u0169ng c\u00f3 th\u1ec3 y\u00eau c\u1ea7u API Key tr\u1ea3 ph\u00ed.<\/p>\"\n\t\t\t\t\t\t\t\t\t}\n\t\t\t}\n\t\t\t,\t\t\t\t{\n\t\t\t\t\"@type\": \"Question\",\n\t\t\t\t\"name\": \"T\u00f4i c\u00f3 th\u1ec3 d\u00f9ng AI Agent node m\u00e0 kh\u00f4ng c\u1ea7n Tool kh\u00f4ng?\",\n\t\t\t\t\"acceptedAnswer\": {\n\t\t\t\t\t\"@type\": \"Answer\",\n\t\t\t\t\t\"text\": \"<p>C\u00f3, b\u1ea1n c\u00f3 th\u1ec3 b\u1ecf qua Tool n\u1ebfu ch\u1ec9 c\u1ea7n AI tr\u1ea3 l\u1eddi d\u1ef1a tr\u00ean th\u00f4ng tin trong Prompt ho\u1eb7c Chat Message. Tool ch\u1ec9 c\u1ea7n thi\u1ebft khi y\u00eau c\u1ea7u d\u1eef li\u1ec7u b\u00ean ngo\u00e0i (nh\u01b0 t\u00ecm ki\u1ebfm web).<\/p>\"\n\t\t\t\t\t\t\t\t\t}\n\t\t\t}\n\t\t\t,\t\t\t\t{\n\t\t\t\t\"@type\": \"Question\",\n\t\t\t\t\"name\": \"AI Agent c\u00f3 gi\u1edbi h\u1ea1n \u0111\u1ed9 d\u00e0i ph\u1ea3n h\u1ed3i kh\u00f4ng?\",\n\t\t\t\t\"acceptedAnswer\": {\n\t\t\t\t\t\"@type\": \"Answer\",\n\t\t\t\t\t\"text\": \"<p>C\u00f3. T\u00f9y theo model m\u00e0 b\u1ea1n d\u00f9ng (GPT-3.5, GPT-4,...), ph\u1ea3n h\u1ed3i s\u1ebd b\u1ecb gi\u1edbi h\u1ea1n b\u1edfi s\u1ed1 tokens. B\u1ea1n c\u00f3 th\u1ec3 \u0111i\u1ec1u ch\u1ec9nh \u0111\u1ed9 d\u00e0i mong mu\u1ed1n b\u1eb1ng c\u00e1ch ki\u1ec3m so\u00e1t prompt v\u00e0 c\u00e0i \u0111\u1eb7t h\u1ec7 th\u1ed1ng.<\/p>\"\n\t\t\t\t\t\t\t\t\t}\n\t\t\t}\n\t\t\t,\t\t\t\t{\n\t\t\t\t\"@type\": \"Question\",\n\t\t\t\t\"name\": \"T\u00f4i c\u00f3 th\u1ec3 d\u00f9ng nhi\u1ec1u node AI Agent trong m\u1ed9t workflow kh\u00f4ng?\",\n\t\t\t\t\"acceptedAnswer\": {\n\t\t\t\t\t\"@type\": \"Answer\",\n\t\t\t\t\t\"text\": \"<p>Ho\u00e0n to\u00e0n \u0111\u01b0\u1ee3c. B\u1ea1n c\u00f3 th\u1ec3 d\u00f9ng nhi\u1ec1u node AI Agent \u0111\u1ec3 th\u1ef1c hi\u1ec7n nhi\u1ec1u t\u00e1c v\u1ee5 kh\u00e1c nhau trong c\u00f9ng m\u1ed9t workflow nh\u01b0: t\u1ea1o n\u1ed9i dung, ph\u00e2n t\u00edch c\u1ea3m x\u00fac, d\u1ecbch thu\u1eadt,\u2026<\/p>\"\n\t\t\t\t\t\t\t\t\t}\n\t\t\t}\n\t\t\t\t\t\t]\n\t}\n<\/script>\n","protected":false},"excerpt":{"rendered":"<p>Trong th\u1eddi \u0111\u1ea1i t\u1ef1 \u0111\u1ed9ng h\u00f3a v\u00e0 tr\u00ed tu\u1ec7 nh\u00e2n t\u1ea1o b\u00f9ng n\u1ed5, AI Agent ng\u00e0y c\u00e0ng tr\u1edf th\u00e0nh c\u00f4ng c\u1ee5 h\u1ed7 tr\u1ee3 \u0111\u1eafc l\u1ef1c cho doanh nghi\u1ec7p v\u00e0 c\u00e1 nh\u00e2n t\u1ed1i \u01b0u quy tr\u00ecnh l\u00e0m vi\u1ec7c. Nh\u01b0ng b\u1ea1n \u0111\u00e3 th\u1ef1c s\u1ef1 hi\u1ec3u AI Agent l\u00e0 g\u00ec? C\u00e1ch s\u1eed d\u1ee5ng node AI Agent tr\u00ean n8n [&hellip;]<\/p>\n","protected":false},"author":23,"featured_media":105121,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7397],"tags":[7343],"class_list":["post-105120","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-n8n","tag-n8n"],"_links":{"self":[{"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/posts\/105120","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/users\/23"}],"replies":[{"embeddable":true,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/comments?post=105120"}],"version-history":[{"count":6,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/posts\/105120\/revisions"}],"predecessor-version":[{"id":117320,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/posts\/105120\/revisions\/117320"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/media\/105121"}],"wp:attachment":[{"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/media?parent=105120"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/categories?post=105120"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/tags?post=105120"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}