Skip to content

Instantly share code, notes, and snippets.

@miolamio
Created March 23, 2025 06:42
Show Gist options
  • Select an option

  • Save miolamio/1f734c1c21e4891fffaa21172f2786ba to your computer and use it in GitHub Desktop.

Select an option

Save miolamio/1f734c1c21e4891fffaa21172f2786ba to your computer and use it in GitHub Desktop.
{
"name": "Brave Agent + MCP",
"nodes": [
{
"parameters": {
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.chatTrigger",
"typeVersion": 1.1,
"position": [
0,
0
],
"id": "d7531162-d193-436f-8e84-7ac6a2bc7c71",
"name": "When chat message received",
"webhookId": "9e06d4c3-c3bd-4101-9313-3cd25d977c2b"
},
{
"parameters": {
"model": "pixtral-large-latest",
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.lmChatMistralCloud",
"typeVersion": 1,
"position": [
140,
200
],
"id": "f0d6004f-a958-41b7-947c-8ee7c0137bcb",
"name": "Mistral Cloud Chat Model",
"credentials": {
"mistralCloudApi": {
"id": "ASY1Vrp1K8dfRyFv",
"name": "Mistral Cloud account"
}
}
},
{
"parameters": {
"contextWindowLength": 10
},
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"typeVersion": 1.3,
"position": [
260,
280
],
"id": "e0445ff5-0a5b-46a1-83b4-bb8b81a8cd5f",
"name": "Simple Memory"
},
{
"parameters": {},
"type": "n8n-nodes-mcp.mcpClientTool",
"typeVersion": 1,
"position": [
400,
260
],
"id": "03574f25-77a3-4cda-8447-16782de9b82e",
"name": "Brave List Tools",
"credentials": {
"mcpClientApi": {
"id": "wsYV6lRUVE2AHlP0",
"name": "Brave MCP Client (STDIO)"
}
}
},
{
"parameters": {
"operation": "executeTool",
"toolName": "={{ $fromAI(\"tool\", \"the selected tool to use\") }}",
"toolParameters": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Tool_Parameters', ``, 'json') }}"
},
"type": "n8n-nodes-mcp.mcpClientTool",
"typeVersion": 1,
"position": [
540,
200
],
"id": "ac100a34-e290-48a5-b372-4563d42ca405",
"name": "Brave Execute Tools",
"credentials": {
"mcpClientApi": {
"id": "wsYV6lRUVE2AHlP0",
"name": "Brave MCP Client (STDIO)"
}
}
},
{
"parameters": {
"options": {
"systemMessage": "<AgentInstructions>\n <Role>\n <Name>Helpful Assistant</Name>\n <Description>\n You are a helpful assistant who has access to a bunch of tools to assist with user queries.\n </Description>\n </Role>\n <Goal>\n <Primary>\n To leverage available tools to effectively respond to user requests.\n </Primary>\n </Goal>\n <Instructions>\n <Instruction>\n 1. Before you try to execute any tool, you need to call the tool to list available tools for the capability you want to leverage.\n </Instruction>\n <Instruction>\n 2. When you list tools available, you'll get a list back of items that look like:\n name:[tool_name]\n description:[tool description to tell you when and how to use the tool]\n schema\n 0:[param 1]\n 1:[param 2]\n ...\n n-1:[param n]\n </Instruction>\n <Instruction>\n 3. When you call a tool, you need to give the tool name exactly as given to you, and the tool parameters need to be a json object like:\n {\n \"param 1\": \"param 1 value\",\n ...\n \"param n\": \"param n value\"\n }\n </Instruction>\n <Instruction>\n 4. If there are no parameters for the tool, just pass in an empty object.\n </Instruction>\n <Instruction>\n 5. For the file system, you have access to the /files directory and that is it.\n </Instruction>\n </Instructions>\n</AgentInstructions>"
}
},
"type": "@n8n/n8n-nodes-langchain.agent",
"typeVersion": 1.8,
"position": [
220,
0
],
"id": "02d9af79-deaa-4798-b30d-e481e1862d0c",
"name": "Brave AI Agent"
}
],
"pinData": {},
"connections": {
"When chat message received": {
"main": [
[
{
"node": "Brave AI Agent",
"type": "main",
"index": 0
}
]
]
},
"Mistral Cloud Chat Model": {
"ai_languageModel": [
[
{
"node": "Brave AI Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Simple Memory": {
"ai_memory": [
[
{
"node": "Brave AI Agent",
"type": "ai_memory",
"index": 0
}
]
]
},
"Brave List Tools": {
"ai_tool": [
[
{
"node": "Brave AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Brave Execute Tools": {
"ai_tool": [
[
{
"node": "Brave AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
}
},
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "47f0bcfa-d995-42bf-ae2c-73f063e6d6dd",
"meta": {
"templateCredsSetupCompleted": true,
"instanceId": "934a9e7dd20e2fad5089c3fe1108650835bafed455e0c7044c6446a941e37c96"
},
"id": "pLiO5862pSw9vQSA",
"tags": []
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment