npm package: @imocat/n8n-nodes-volcengine-ark
Description: n8n node for VolcEngine ARK (Doubao) integration
Author: imocat
Latest version: 0.3.4

# @imocat/n8n-nodes-volcengine-ark

This is an n8n community node that provides two ways to use VolcEngine ARK (Doubao) in your n8n workflows:

1. **VolcEngine ARK** - Regular node for direct API calls
2. **VolcEngine ARK Chat Model** - LangChain-compatible chat model for AI Agents

[VolcEngine ARK](https://www.volcengine.com/product/doubao/) provides powerful large language models (LLM) through the ARK platform.

[n8n](https://n8n.io/) is a fair-code licensed workflow automation platform.

## Installation

Follow the [installation guide](https://docs.n8n.io/integrations/community-nodes/installation/) in the n8n community nodes documentation.

### Community Nodes (Recommended)

1. Go to **Settings > Community Nodes**
2. Select **Install**
3. Enter `@imocat/n8n-nodes-volcengine-ark` in **Enter npm package name**
4. Agree to the risks and select **Install**

### Manual Installation

To get started install the package in your n8n root directory:

```bash
npm install @imocat/n8n-nodes-volcengine-ark
```

For Docker-based deployments add the following line before the font installation command in your [n8n Dockerfile](https://github.com/n8n-io/n8n/blob/master/docker/images/n8n/Dockerfile):

```bash
RUN cd /usr/local/lib/node_modules/n8n && npm install @imocat/n8n-nodes-volcengine-ark
```

## Credentials

To use this node, you need to create credentials in n8n:

1. **API Key**: Get your API key from the [VolcEngine ARK console](https://console.volcengine.com/ark)
2. **Base URL**: Default is `https://ark.cn-beijing.volces.com/api/v3` (usually no need to change)

## Nodes

### VolcEngine ARK (Regular Node)

Direct API integration for chat completions and model listing.

#### Operations

##### Chat
Generate a chat completion with Doubao models.

**Parameters:**
- **Resource**: Chat
- **Operation**: Complete
- **Model**: Select from predefined models or enter custom model ID
- **Messages**: Array of messages with role (system/user/assistant) and content
- **Options** (optional):
  - Temperature: Controls randomness (0-2)
  - Top P: Nucleus sampling parameter (0-1)
  - Max Tokens: Maximum tokens to generate
  - Stream: Enable streaming responses
  - Frequency Penalty: Reduce repetition (-2 to 2)
  - Presence Penalty: Encourage new topics (-2 to 2)
  - Stop Sequences: Stop generation at specific sequences

##### List Models
List all available models in your VolcEngine ARK account.

### VolcEngine ARK Chat Model (AI Agent Compatible)

LangChain-compatible chat model node designed for use with n8n AI Agents, AI Tools, and AI Memory nodes.

#### Features
- Seamless integration with n8n AI Agents
- Support for multi-turn conversations
- Full LangChain compatibility
- Reasoning model support (DeepSeek R1, Doubao Thinking Pro)

#### Parameters
- **Model**: Choose from all available VolcEngine ARK models
- **Options**:
  - Temperature: Controls randomness (0-2, default: 0.7)
  - Maximum Tokens: Max tokens to generate (default: 4096)
  - Top P: Nucleus sampling (0-1)
  - Frequency Penalty: Reduce repetition (-2 to 2)
  - Presence Penalty: Encourage new topics (-2 to 2)
  - Stop Sequences: Up to multiple stop sequences
  - Timeout: Request timeout in milliseconds (default: 60000)
  - Max Retries: Number of retry attempts (default: 2)

## Usage Examples

### Using the Regular Node

1. Add the **VolcEngine ARK** node to your workflow
2. Connect it to your trigger
3. Configure credentials
4. Select **Chat** resource and **Complete** operation
5. Choose your model from the list or enter a custom model ID
6. Add messages (e.g., system prompt and user question)
7. Execute the workflow

### Using the Chat Model with AI Agent

1. Add an **AI Agent** node to your workflow
2. In the AI Agent settings, select **VolcEngine ARK Chat Model** as the language model
3. Configure the model selection and parameters
4. Connect AI Tools and AI Memory nodes as needed
5. The Chat Model will automatically handle conversation context and tool calling

## Supported Models

- **Doubao Seed 1.6 Series**: Flagship models with ultimate speed
- **Doubao 1.5 Series**: Pro and Lite versions with 32k/256k context
- **Doubao Thinking Pro**: Deep reasoning model
- **DeepSeek Series**: V3 and R1 models with distilled variants

## Compatibility

- Tested with n8n version 1.0.0+
- Compatible with VolcEngine ARK API v3
- LangChain integration via @langchain/openai
- Works with n8n AI Agent, AI Tool, and AI Memory nodes

## Resources

- [n8n community nodes documentation](https://docs.n8n.io/integrations/community-nodes/)
- [VolcEngine ARK documentation](https://www.volcengine.com/docs/82379/1099455)

## License

MIT