{"_id":"@bergetai/n8n-nodes-berget-ai-agent","_rev":"7-08e3a731f2d4e2cb3d1111104b17ea2a","name":"@bergetai/n8n-nodes-berget-ai-agent","dist-tags":{"latest":"1.1.0"},"versions":{"1.0.3":{"name":"@bergetai/n8n-nodes-berget-ai-agent","version":"1.0.3","keywords":["n8n-community-node-package","n8n","berget-ai","ai","agent","llm","tools"],"author":{"name":"Berget AI","email":"hello@berget.ai"},"license":"MIT","_id":"@bergetai/n8n-nodes-berget-ai-agent@1.0.3","maintainers":[{"name":"bergetai","email":"christian@berget.ai"}],"homepage":"https://github.com/bergetai/n8n-plugins","bugs":{"url":"https://github.com/bergetai/n8n-plugins/issues"},"n8n":{"nodes":["dist/nodes/BergetAiAgent/BergetAiAgent.node.js"],"credentials":["dist/credentials/BergetAiApi.credentials.js"],"n8nNodesApiVersion":1},"dist":{"shasum":"991a7be781362da20fdc517ab361da61f69dd765","tarball":"https://registry.npmjs.org/@bergetai/n8n-nodes-berget-ai-agent/-/n8n-nodes-berget-ai-agent-1.0.3.tgz","fileCount":8,"integrity":"sha512-ruiVV6Vrv4VonO4T8gcP6Ca8HZ+OKWmb9lXARlyem849CUNn095RiwVHMYTBANAsl5yiuYtfFLXTQcS65Sp6xw==","signatures":[{"sig":"MEQCICaQTC5HB8uaf/bxpUgH/CqZAuJMpOKnY6LgMdNaE43SAiBtLtRNksRvpcAfq3T8ED6FcQmHplpC9ynbYqEnG2BMXg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":28301},"main":"index.js","gitHead":"44f04661b42aeb3ef501fe082720b9a7e21e52bd","scripts":{"dev":"tsc --watch","lint":"eslint nodes package.json","test":"npm run build && node test/test-node.js","build":"tsc","format":"prettier nodes --write","lintfix":"eslint nodes package.json --fix","test:local":"npm run build && npm link && echo 'Plugin linked! Start n8n with: n8n start'","prepublishOnly":"npm run build"},"_npmUser":{"name":"bergetai","email":"christian@berget.ai"},"repository":{"url":"git+https://github.com/bergetai/n8n-plugins.git","type":"git"},"_npmVersion":"10.8.2","description":"n8n node for Berget AI agent with tool calling","directories":{},"_nodeVersion":"18.20.8","dependencies":{"axios":"^1.12.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^8.57.0","prettier":"^2.8.8","typescript":"^4.9.5","n8n-workflow":"^1.17.0","@typescript-eslint/parser":"^5.62.0","eslint-plugin-n8n-nodes-base":"^1.16.0"},"_npmOperationalInternal":{"tmp":"tmp/n8n-nodes-berget-ai-agent_1.0.3_1760175882756_0.9259004015870966","host":"s3://npm-registry-packages-npm-production"}},"1.0.4":{"name":"@bergetai/n8n-nodes-berget-ai-agent","version":"1.0.4","keywords":["n8n-community-node-package","n8n","berget-ai","ai","agent","llm","tools"],"author":{"name":"Berget AI","email":"hello@berget.ai"},"license":"MIT","_id":"@bergetai/n8n-nodes-berget-ai-agent@1.0.4","maintainers":[{"name":"bergetai","email":"christian@berget.ai"}],"homepage":"https://github.com/bergetai/n8n-plugins","bugs":{"url":"https://github.com/bergetai/n8n-plugins/issues"},"n8n":{"nodes":["dist/nodes/BergetAiAgent/BergetAiAgent.node.js"],"credentials":["dist/credentials/BergetAiApi.credentials.js"],"n8nNodesApiVersion":1},"dist":{"shasum":"06afd56321610842ea7d1f96cefa2fac7527e935","tarball":"https://registry.npmjs.org/@bergetai/n8n-nodes-berget-ai-agent/-/n8n-nodes-berget-ai-agent-1.0.4.tgz","fileCount":8,"integrity":"sha512-ym7IXisfLJuYpSn9M6n10gDDa/Q2utXhLWnOPSBr406oYhypXueRQ9cxGlKHnvLRLpcQ8vYP/jHWTMi8+FOblg==","signatures":[{"sig":"MEQCICZHM8wPUDZsOrEMAnxOVMcMLFOgiScHKy9Nazr6K0E8AiAZaWLd/V0AhtTy4aLfkRcmbLqwlYKJlS2oK6XrmBSBEA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":28301},"main":"index.js","gitHead":"7f2e36738aabaf592adb993ee28a773b6791ec6c","scripts":{"dev":"tsc --watch","lint":"eslint nodes package.json","test":"npm run build && node test/test-node.js","build":"tsc","format":"prettier nodes --write","lintfix":"eslint nodes package.json --fix","test:local":"npm run build && npm link && echo 'Plugin linked! Start n8n with: n8n start'","prepublishOnly":"npm run build"},"_npmUser":{"name":"bergetai","email":"christian@berget.ai"},"repository":{"url":"git+https://github.com/bergetai/n8n-plugins.git","type":"git"},"_npmVersion":"10.8.2","description":"n8n node for Berget AI agent with tool calling","directories":{},"_nodeVersion":"18.20.8","dependencies":{"axios":"^1.12.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^8.57.0","prettier":"^2.8.8","typescript":"^4.9.5","n8n-workflow":"^1.17.0","@typescript-eslint/parser":"^5.62.0","eslint-plugin-n8n-nodes-base":"^1.16.0"},"_npmOperationalInternal":{"tmp":"tmp/n8n-nodes-berget-ai-agent_1.0.4_1760182982913_0.05692067492057107","host":"s3://npm-registry-packages-npm-production"}},"1.0.0":{"name":"@bergetai/n8n-nodes-berget-ai-agent","version":"1.0.0","keywords":["n8n-community-node-package","n8n","berget-ai","ai","agent","llm","tools"],"author":{"name":"Berget AI","email":"hello@berget.ai"},"license":"MIT","_id":"@bergetai/n8n-nodes-berget-ai-agent@1.0.0","maintainers":[{"name":"bergetai","email":"christian@berget.ai"}],"homepage":"https://github.com/bergetai/n8n-plugins","bugs":{"url":"https://github.com/bergetai/n8n-plugins/issues"},"n8n":{"nodes":["dist/nodes/BergetAiAgent/BergetAiAgent.node.js"],"credentials":["dist/credentials/BergetAiApi.credentials.js"],"n8nNodesApiVersion":1},"dist":{"shasum":"468027a1d53ccf7dac2a1bf1f88fe5ac97f3901b","tarball":"https://registry.npmjs.org/@bergetai/n8n-nodes-berget-ai-agent/-/n8n-nodes-berget-ai-agent-1.0.0.tgz","fileCount":8,"integrity":"sha512-GDMJIpw91F/x/IWcoTQYPmpkeKagpzSDmr4zAvrEmfp4o6eONulHQ1ODQvhGY9IdIgsU+wlc8CQ5kAJh1OFodA==","signatures":[{"sig":"MEUCIQDecAVaEQXaZ0JbTBRWoyR8ANh8NeaOnBiQiLOiSsDirwIgHxGd5QMCQPPG309IqpjuZMOroMIgjMMqqxNTCDw9hEQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":27930},"main":"index.js","gitHead":"14afa9d95e7e0af132ade283c0c2b46099f556e6","scripts":{"dev":"tsc --watch","lint":"eslint nodes package.json","test":"npm run build && node test/test-node.js","build":"tsc","format":"prettier nodes --write","lintfix":"eslint nodes package.json --fix","test:local":"npm run build && npm link && echo 'Plugin linked! Start n8n with: n8n start'","prepublishOnly":"npm run test"},"_npmUser":{"name":"bergetai","email":"christian@berget.ai"},"repository":{"url":"git+https://github.com/bergetai/n8n-plugins.git","type":"git"},"_npmVersion":"10.9.2","description":"n8n node for Berget AI agent with tool calling","directories":{},"_nodeVersion":"22.14.0","dependencies":{"axios":"^1.12.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^8.57.0","prettier":"^2.8.8","typescript":"^4.9.5","n8n-workflow":"^1.17.0","@typescript-eslint/parser":"^5.62.0","eslint-plugin-n8n-nodes-base":"^1.16.0"},"_npmOperationalInternal":{"tmp":"tmp/n8n-nodes-berget-ai-agent_1.0.0_1766964650471_0.7596121714800894","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@bergetai/n8n-nodes-berget-ai-agent","version":"1.1.0","keywords":["n8n-community-node-package","n8n","berget-ai","ai","agent","llm","tools"],"author":{"name":"Berget AI","email":"hello@berget.ai"},"license":"MIT","_id":"@bergetai/n8n-nodes-berget-ai-agent@1.1.0","maintainers":[{"name":"bergetai","email":"christian@berget.ai"}],"homepage":"https://github.com/bergetai/n8n-plugins","bugs":{"url":"https://github.com/bergetai/n8n-plugins/issues"},"n8n":{"nodes":["dist/nodes/BergetAiAgent/BergetAiAgent.node.js"],"credentials":["dist/credentials/BergetAiApi.credentials.js"],"n8nNodesApiVersion":1},"dist":{"shasum":"7d70f03914a2d50bcfa35a095230801b0b868c82","tarball":"https://registry.npmjs.org/@bergetai/n8n-nodes-berget-ai-agent/-/n8n-nodes-berget-ai-agent-1.1.0.tgz","fileCount":8,"integrity":"sha512-5oXm/tzF8q4hmf/2y082uWca+AwNhpM2xdpqn9x/Q5DkclqjH03pgNURj2b9Az26n26wrI99uNlWZEoyH/5qEA==","signatures":[{"sig":"MEQCIBvynMH2okYLc5jNf9D1HtYXKsXwQh3FzPNsgjLmCplLAiApsn6KoIVAvZMpQXYO9omI2Hh2Yn2WZUzX5SpO/ej6FQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":27930},"main":"index.js","gitHead":"14afa9d95e7e0af132ade283c0c2b46099f556e6","scripts":{"dev":"tsc --watch","lint":"eslint nodes package.json","test":"npm run build && node test/test-node.js","build":"tsc","format":"prettier nodes --write","lintfix":"eslint nodes package.json --fix","test:local":"npm run build && npm link && echo 'Plugin linked! Start n8n with: n8n start'","prepublishOnly":"npm run test"},"_npmUser":{"name":"bergetai","email":"christian@berget.ai"},"repository":{"url":"git+https://github.com/bergetai/n8n-plugins.git","type":"git"},"_npmVersion":"10.9.2","description":"n8n node for Berget AI agent with tool calling","directories":{},"_nodeVersion":"22.14.0","dependencies":{"axios":"^1.12.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^8.57.0","prettier":"^2.8.8","typescript":"^4.9.5","n8n-workflow":"^1.17.0","@typescript-eslint/parser":"^5.62.0","eslint-plugin-n8n-nodes-base":"^1.16.0"},"_npmOperationalInternal":{"tmp":"tmp/n8n-nodes-berget-ai-agent_1.1.0_1766964758836_0.5565577689615737","host":"s3://npm-registry-packages-npm-production"}}},"time":{"created":"2025-10-11T09:44:42.668Z","modified":"2026-07-05T21:15:05.276Z","1.0.3":"2025-10-11T09:44:42.929Z","1.0.4":"2025-10-11T11:43:03.108Z","1.0.0":"2025-12-28T23:30:50.623Z","1.1.0":"2025-12-28T23:32:38.998Z"},"bugs":{"url":"https://github.com/bergetai/n8n-plugins/issues"},"author":{"name":"Berget AI","email":"hello@berget.ai"},"license":"MIT","homepage":"https://github.com/bergetai/n8n-plugins","keywords":["n8n-community-node-package","n8n","berget-ai","ai","agent","llm","tools"],"repository":{"url":"git+https://github.com/bergetai/n8n-plugins.git","type":"git"},"description":"n8n node for Berget AI agent with tool calling","maintainers":[{"email":"npm.pension488@passmail.net","name":"marcusolsson"},{"email":"hugo@berget.ai","name":"bergetbjork"},{"email":"cl@iteam.se","name":"irony"},{"email":"christian@berget.ai","name":"bergetchristian"}],"readme":"# n8n-nodes-berget-ai-agent\n\nn8n node for Berget AI Agent with tool calling capabilities - similar to OpenAI Agent node.\n\n## Installation\n\n### Community Nodes (Recommended)\n\n1. Open n8n\n2. Go to **Settings** > **Community Nodes**\n3. Click **Install a community node**\n4. Enter: `@bergetai/n8n-nodes-berget-ai-agent`\n5. Click **Install**\n\n### Manual Installation\n\n```bash\n# In your n8n project\nnpm install @bergetai/n8n-nodes-berget-ai-agent\n```\n\n### Local Development\n\n```bash\n# Clone this repo\ngit clone <repo-url>\ncd n8n-nodes-berget-ai-agent\n\n# Install dependencies\nnpm install\n\n# Build project\nnpm run build\n\n# Link locally for development\nnpm link\ncd /path/to/your/n8n/project\nnpm link @bergetai/n8n-nodes-berget-ai-agent\n```\n\n## Configuration\n\n1. Add the node to your workflow\n2. Configure API settings:\n   - **API Key**: Your Berget AI API key\n   - **Base URL**: `https://api.berget.ai/v1` (default)\n   - **Model**: Choose from available models\n   - **System Prompt**: Define the agent's behavior\n   - **User Message**: The task or question for the agent\n   - **Tools**: Define tools the agent can use\n\n## Available Models\n\n- Llama 3.1 8B Instruct\n- Llama 3.3 70B Instruct (recommended for agents)\n- GLM-4.6\n- DeepSeek-OCR (vision model for image analysis)\n- Mistral Small 3.1 24B Instruct 2503\n- Qwen3 32B\n- GPT-OSS-120B\n\n## Features\n\n- ✅ **Tool Calling**: Define custom tools with JSON Schema\n- ✅ **Multi-turn Conversations**: Agent can make multiple tool calls\n- ✅ **Flexible Tool Choice**: Auto, required, or none\n- ✅ **Iteration Control**: Set maximum number of agent iterations\n- ✅ **System Prompts**: Customize agent behavior\n- ✅ **Temperature Control**: Adjust response randomness\n- ✅ **Token Limits**: Control response length\n\n## How It Works\n\nThe agent node follows this workflow:\n\n1. **Initial Request**: User provides a task/question and available tools\n2. **Agent Processing**: Model analyzes the task and decides if tools are needed\n3. **Tool Detection**: If needed, the agent identifies required tool calls with parameters\n4. **Output**: The node outputs tool calls for external execution (does not execute tools itself)\n5. **Integration**: Connect to other n8n nodes to execute tools and feed results back\n\n**Important**: This node does NOT execute tools automatically. It only detects when tools should be called and outputs the tool call information. You must implement tool execution in your n8n workflow using other nodes.\n\n## Tool Definition\n\nTools are defined using JSON Schema format:\n\n```json\n{\n  \"type\": \"object\",\n  \"properties\": {\n    \"location\": {\n      \"type\": \"string\",\n      \"description\": \"The city and country\"\n    },\n    \"units\": {\n      \"type\": \"string\",\n      \"enum\": [\"celsius\", \"fahrenheit\"],\n      \"description\": \"Temperature units\"\n    }\n  },\n  \"required\": [\"location\"]\n}\n```\n\n## Examples\n\n### Basic Agent with Weather Tool\n\n```javascript\n{\n  \"operation\": \"agent\",\n  \"model\": \"meta-llama/Llama-3.3-70B-Instruct\",\n  \"systemPrompt\": \"You are a helpful assistant with access to weather data.\",\n  \"userMessage\": \"What's the weather in Stockholm?\",\n  \"tools\": [\n    {\n      \"name\": \"get_weather\",\n      \"description\": \"Get current weather for a location\",\n      \"parameters\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"location\": {\n            \"type\": \"string\",\n            \"description\": \"City and country\"\n          }\n        },\n        \"required\": [\"location\"]\n      }\n    }\n  ],\n  \"options\": {\n    \"temperature\": 0.7,\n    \"max_iterations\": 5,\n    \"tool_choice\": \"auto\"\n  }\n}\n```\n\n### Agent with Multiple Tools\n\n```javascript\n{\n  \"operation\": \"agent\",\n  \"model\": \"meta-llama/Llama-3.3-70B-Instruct\",\n  \"systemPrompt\": \"You are a research assistant.\",\n  \"userMessage\": \"Find information about AI and save it.\",\n  \"tools\": [\n    {\n      \"name\": \"search_web\",\n      \"description\": \"Search the web for information\",\n      \"parameters\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"query\": { \"type\": \"string\" }\n        },\n        \"required\": [\"query\"]\n      }\n    },\n    {\n      \"name\": \"save_document\",\n      \"description\": \"Save text to a document\",\n      \"parameters\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"content\": { \"type\": \"string\" },\n          \"filename\": { \"type\": \"string\" }\n        },\n        \"required\": [\"content\", \"filename\"]\n      }\n    }\n  ]\n}\n```\n\n## Output Format\n\nThe agent node returns:\n\n```json\n{\n  \"response\": \"Final agent response text or null if tools were requested\",\n  \"tool_calls\": [\n    {\n      \"id\": \"call_abc123\",\n      \"name\": \"get_weather\",\n      \"arguments\": \"{\\\"location\\\": \\\"Stockholm, Sweden\\\"}\",\n      \"iteration\": 1\n    }\n  ],\n  \"iterations\": 2,\n  \"messages\": [...],\n  \"model\": \"meta-llama/Llama-3.3-70B-Instruct\"\n}\n```\n\n**Note**: If the AI requests tool calls, the node will throw an error with details about the requested tools. This is intentional - you must handle tool execution in your workflow and then continue the conversation.\n\n## Testing\n\n### Quick Test\n```bash\n# Test node structure\nnpm test\n\n# Test with real API\nBERGET_API_KEY=your-key npm test\n\n# Link locally for n8n testing\nnpm run test:local\n```\n\n## Comparison with OpenAI Agent\n\nThis node provides similar functionality to OpenAI's Agent node:\n\n| Feature | Berget AI Agent | OpenAI Agent |\n|---------|----------------|--------------|\n| Tool Calling | ✅ | ✅ |\n| Multi-turn | ✅ | ✅ |\n| Custom Tools | ✅ | ✅ |\n| System Prompts | ✅ | ✅ |\n| Open Models | ✅ | ❌ |\n| EU Hosting | ✅ | ❌ |\n\n## Pricing\n\nSee current pricing at [berget.ai/models](https://berget.ai/models)\n\nAll prices are in EUR per million tokens.\n\n## Support\n\n- 📧 Support: [kontakt@berget.ai](mailto:kontakt@berget.ai)\n- 📖 API Documentation: [api.berget.ai/docs](https://api.berget.ai/docs)\n- 🐛 Issues: Report issues in the repository\n\n## License\n\nMIT License - See LICENSE file for details.\n","readmeFilename":"README.md"}