Agent de gestion pour débutants avec des outils de sous-agents
Ceci est unEngineering, Multimodal AIworkflow d'automatisation du domainecontenant 13 nœuds.Utilise principalement des nœuds comme Agent, AgentTool, LmChatOpenAi, MemoryBufferWindow. Agent de gestion pour débutants avec des sous-agents outils
- •Clé API OpenAI
Nœuds utilisés (13)
Catégorie
{
"meta": {
"instanceId": "ad0113c344ee237399e44e9f11798b05baeb83a6196d514a9ae9d2ad71c3b5c9",
"templateCredsSetupCompleted": true
},
"nodes": [
{
"id": "e816ff5f-d3d4-4416-96d9-961a078fb188",
"name": "Modèle de chat OpenAI",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
-32,
736
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4o-mini",
"cachedResultName": "gpt-4o-mini"
},
"options": {}
},
"credentials": {
"openAiApi": {
"id": "4l6TDfLZVFS24g3X",
"name": "OpenAi account 4"
}
},
"typeVersion": 1.2
},
{
"id": "9b121aea-be80-46a0-879d-5732b7d4d4f3",
"name": "Simple Mémoire",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"position": [
784,
720
],
"parameters": {},
"typeVersion": 1.3
},
{
"id": "2f8104f9-c975-4ed0-b5a9-c5c592878e8c",
"name": "Simple Mémoire1",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"position": [
1312,
688
],
"parameters": {},
"typeVersion": 1.3
},
{
"id": "c07ce435-64a0-4939-918b-9954e7e663e3",
"name": "Modèle de chat OpenAI1",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
640,
672
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4o-mini",
"cachedResultName": "gpt-4o-mini"
},
"options": {}
},
"credentials": {
"openAiApi": {
"id": "4l6TDfLZVFS24g3X",
"name": "OpenAi account 4"
}
},
"typeVersion": 1.2
},
{
"id": "20c108c9-221d-4dde-92ff-028ab4b12c2b",
"name": "Modèle de chat OpenAI2",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
1184,
672
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4o-mini",
"cachedResultName": "gpt-4o-mini"
},
"options": {}
},
"credentials": {
"openAiApi": {
"id": "4l6TDfLZVFS24g3X",
"name": "OpenAi account 4"
}
},
"typeVersion": 1.2
},
{
"id": "263bd596-d242-4a3e-8555-d23e172b23ef",
"name": "DataAgent (Insight Generator)",
"type": "@n8n/n8n-nodes-langchain.agentTool",
"position": [
1184,
480
],
"parameters": {
"text": "{{json.query}}",
"options": {},
"toolDescription": "Role: Responds to instructions requiring metrics, summaries, or data analysis explanations."
},
"typeVersion": 2.2
},
{
"id": "2efc2325-6fee-4fce-a4ba-8b9b72701a8d",
"name": "Simple Mémoire2",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"position": [
176,
720
],
"parameters": {},
"typeVersion": 1.3
},
{
"id": "8c0e14bd-e64f-473f-9f31-0b0d2c800669",
"name": "ManagerAgent (Routing + Instruction Generator)",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
32,
512
],
"parameters": {
"options": {
"systemMessage": "You are an AI Manager that delegates tasks to specialized agents. Your job is to analyze the user's message and decide whether it requires:\n\nAn EmailAgent for writing outreach, follow-up, or templated emails, or\n\nA DataAgent for tasks involving data summaries, metrics, or analysis.\n\nsend the instructions to the sub agents. \n\n"
}
},
"typeVersion": 2.2
},
{
"id": "ee67ff1c-5651-43bb-a836-f48cf0f4c2bd",
"name": "E-mailAgent (Communication Specialist)",
"type": "@n8n/n8n-nodes-langchain.agentTool",
"position": [
656,
512
],
"parameters": {
"text": "={{ $fromAI('Prompt__User_Message_', ``, 'string') }}",
"options": {
"systemMessage": "You are a professional Email Writing Assistant. You write polished, effective emails for tasks such as outreach, follow-ups, and client communication. Follow the instruction provided exactly and return only the email content. Use a warm, business-appropriate tone."
},
"toolDescription": "Role: Writes professional, friendly, or action-oriented emails based on instructions."
},
"typeVersion": 2.2
},
{
"id": "0f5fe30c-3d39-472e-ae83-985adfdab40a",
"name": "Note adhésive16",
"type": "n8n-nodes-base.stickyNote",
"position": [
-144,
-192
],
"parameters": {
"width": 1680,
"content": "## 📬 Need Help or Want to Customize This?\n📧 [robert@ynteractive.com](mailto:robert@ynteractive.com) \n🔗 [LinkedIn](https://www.linkedin.com/in/robert-breen-29429625/)"
},
"typeVersion": 1
},
{
"id": "2b2938bf-6d85-487a-8a3a-af4e7258162b",
"name": "Note adhésive",
"type": "n8n-nodes-base.stickyNote",
"position": [
-144,
-16
],
"parameters": {
"color": 5,
"width": 600,
"height": 860,
"content": "## 🔧 Step 1: Set Up the Manager Agent\n\nStart by dragging in an **Agent** node and name it something like `ManagerAgent`. This agent will act as the “brain” of your system, analyzing the user's input and determining whether it should be handled by the email-writing sub-agent or the data-summary sub-agent.\n\nOpen the node’s settings and paste the following into the **System Message**:\n\nYou are an AI Manager that delegates tasks to specialized agents. Your job is to analyze the user's message and decide whether it requires:\n\nAn EmailAgent for writing outreach, follow-up, or templated emails, or\n\nA DataAgent for tasks involving data summaries, metrics, or analysis.\n\nSend the instructions to the sub agents.\n\n\nThis instruction gives the Manager Agent clarity on what roles exist and what types of tasks belong to each one.\n\n"
},
"typeVersion": 1
},
{
"id": "31c629b0-c8a3-47ad-9d1b-110690f5c5c2",
"name": "Note adhésive2",
"type": "n8n-nodes-base.stickyNote",
"position": [
1040,
-16
],
"parameters": {
"color": 4,
"width": 496,
"height": 860,
"content": "## 📊 Step 3: Create the Data Agent Tool\n\nRepeat the same steps, but this time for data summaries and analysis.\n\nAdd another **Agent Tool** node and name it `DataAgent`. In the **Tool Description**, write something like:\n\nResponds to instructions requiring metrics, summaries, or data analysis explanations.\n\nFor its input text field, you can use:\n\n{{json.query}}\n\nIf desired, provide a system message that gives the agent more detailed instruction on how to behave:\n\nNow the Manager Agent has two tools it can delegate to: one for communication and one for insights.\n\n"
},
"typeVersion": 1
},
{
"id": "3e609caf-b457-4b4f-8f1d-579b5c6cf3ee",
"name": "Note adhésive1",
"type": "n8n-nodes-base.stickyNote",
"position": [
480,
-16
],
"parameters": {
"color": 6,
"width": 536,
"height": 860,
"content": "\n## ✉️ Step 4: Create the Email Agent Tool\n\nNow you’ll create a specialized sub-agent that only writes emails.\n\nAdd an **Agent Tool** node and call it `EmailAgent`. In the tool’s settings, describe its job clearly. For example:\n\n```\nWrites professional, friendly, or action-oriented emails based on instructions.\n```\n\nThen scroll down to the **System Message** section and enter the message\n\nFor the text input field, use the expression:\n\n{{ $fromAI('Prompt__User_Message_', ``, 'string') }}\n\nThis allows the Email Agent to receive exactly what the Manager Agent wants it to handle.\n\n\nFinally, connect this entire EmailAgent setup back to the `ManagerAgent` by attaching it to its `ai_tool` input.\n\n"
},
"typeVersion": 1
}
],
"pinData": {},
"connections": {
"Simple Memory": {
"ai_memory": [
[
{
"node": "EmailAgent (Communication Specialist)",
"type": "ai_memory",
"index": 0
}
]
]
},
"Simple Memory1": {
"ai_memory": [
[
{
"node": "263bd596-d242-4a3e-8555-d23e172b23ef",
"type": "ai_memory",
"index": 0
}
]
]
},
"Simple Memory2": {
"ai_memory": [
[
{
"node": "8c0e14bd-e64f-473f-9f31-0b0d2c800669",
"type": "ai_memory",
"index": 0
}
]
]
},
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "8c0e14bd-e64f-473f-9f31-0b0d2c800669",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"OpenAI Chat Model1": {
"ai_languageModel": [
[
{
"node": "EmailAgent (Communication Specialist)",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"OpenAI Chat Model2": {
"ai_languageModel": [
[
{
"node": "263bd596-d242-4a3e-8555-d23e172b23ef",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"263bd596-d242-4a3e-8555-d23e172b23ef": {
"ai_tool": [
[
{
"node": "8c0e14bd-e64f-473f-9f31-0b0d2c800669",
"type": "ai_tool",
"index": 0
}
]
]
},
"EmailAgent (Communication Specialist)": {
"ai_tool": [
[
{
"node": "8c0e14bd-e64f-473f-9f31-0b0d2c800669",
"type": "ai_tool",
"index": 0
}
]
]
}
}
}Comment utiliser ce workflow ?
Copiez le code de configuration JSON ci-dessus, créez un nouveau workflow dans votre instance n8n et sélectionnez "Importer depuis le JSON", collez la configuration et modifiez les paramètres d'authentification selon vos besoins.
Dans quelles scénarios ce workflow est-il adapté ?
Intermédiaire - Ingénierie, IA Multimodale
Est-ce payant ?
Ce workflow est entièrement gratuit et peut être utilisé directement. Veuillez noter que les services tiers utilisés dans le workflow (comme l'API OpenAI) peuvent nécessiter un paiement de votre part.
Workflows recommandés
Robert Breen
@rbreenProfessional services consultant with over 10 years of experience solving complex business problems across industries. I specialize in n8n and process automation—designing custom workflows that integrate tools like Google Calendar, Airtable, GPT, and internal systems. Whether you need to automate scheduling, sync data, or streamline operations, I build solutions that save time and drive results.
Partager ce workflow