npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

n8n-nodes-kimi-ai

v0.1.2

Published

Kimi AI (Moonshot AI) n8n custom node for chat completions, multi-turn conversations, streaming, and memory management.

Downloads

391

Readme

Kimi AI n8n Node

This is a custom n8n node for interacting with the Kimi AI (Moonshot AI) API, designed to provide a seamless and powerful integration for conversational AI workflows. It supports chat completions, multi-turn conversations with robust memory management, streaming responses, and advanced AI features.

Features

  • Chat Completions: Engage in dynamic conversations with the Kimi AI model.
  • Multi-turn Conversations: Maintain context across multiple interactions with internal memory management.
  • Persistent Memory Handling: Supports session-based memory to keep track of conversation history.
  • Streaming Responses: Receive responses in real-time for a more interactive user experience.
  • System Prompts: Guide the AI's behavior with customizable system prompts.
  • JSON Mode: Obtain structured JSON responses for easier parsing and integration.
  • Tool/Function Calling Preparation: Designed with future tool/function calling capabilities in mind.
  • Long Context Optimization: Handles longer conversations efficiently.
  • Workflow-friendly AI Automation: Built for integration into various n8n workflows, including chatbots and autonomous agents.
  • Model Listing: Easily retrieve a list of available Kimi AI models.

Installation

To install this custom node, you will need to have n8n installed and running. Follow these steps:

  1. Clone the repository (or download the source code):

    git clone https://github.com/manus-ai/n8n-nodes-kimi-ai.git
    cd n8n-nodes-kimi-ai
  2. Install dependencies:

    npm install
  3. Build the node:

    npm run build
  4. Link the node to your n8n instance:

    npm link
    # Then, in your n8n installation directory:
    npm link n8n-nodes-kimi-ai
  5. Restart n8n to load the new node.

Credentials

This node uses API Key authentication.

  1. In n8n, go to Credentials.
  2. Add a new credential of type Kimi AI API.
  3. Enter your API Key obtained from the Kimi Open Platform.
    • The API Key will be used in the Authorization: Bearer {{API_KEY}} header.

Usage

Chat Completion

  1. Drag and drop the Kimi AI node onto your workflow.
  2. Select Resource: Chat.
  3. Select Operation: Chat Completion.
  4. Provide a User Message.
  5. (Optional) Configure System Prompt to guide the AI.
  6. (Optional) Choose a Memory Mode:
    • No Memory: Each request is independent.
    • Session Memory: Maintains conversation history based on a Session ID.
  7. (Optional) Adjust Options such as Temperature, Max Tokens, JSON Mode, and Stream.

Model Listing

  1. Drag and drop the Kimi AI node onto your workflow.
  2. Select Resource: Model.
  3. Select Operation: List.
  4. Execute the node to get a list of available Kimi AI models.

Memory Management

The Kimi API is stateless. This node implements internal conversation memory management to support multi-turn conversations. When Session Memory is enabled, the node will:

  • Automatically manage the messages array, including user and assistant history.
  • Implement a rolling context window to keep the conversation within the model's token limits.
  • Ensure system prompts persist across turns.

Streaming Support

When the Stream option is enabled for chat completions, the node will:

  • Handle SSE (Server-Sent Events) streaming.
  • Process partial token streaming and aggregate chunks for progressive output.

Error Handling

The node includes robust error handling for common API issues such as:

  • Invalid API keys
  • Rate limits
  • Token overflow
  • Malformed messages
  • Streaming interruptions
  • Timeout errors

User-friendly n8n errors will be returned for easier debugging.

Advanced AI Features

  • JSON Mode: Request responses in a structured JSON format.
  • AI Agent Compatibility: Designed to work seamlessly within AI agent workflows.
  • Function/Tool Calling Preparation: Architectural support for future integration of tool calling.
  • Context Optimization: Strategies to manage and optimize conversation context.

Deliverables

This project provides the following files:

  • packages/nodes/KimiAI/KimiAI.node.ts: The main n8n node definition.
  • packages/credentials/KimiApiCredentials.ts: API key credential definition.
  • packages/memoryManager/MemoryManager.ts: Logic for managing conversation history.
  • packages/streamingParser/StreamingParser.ts: Handles parsing of streaming responses.
  • packages/utils/Transport.ts: Reusable transport layer for API requests.
  • packages/resources/ChatResource.ts: Defines chat-related operations and fields.
  • packages/resources/ModelResource.ts: Defines model-related operations and fields.
  • packages/nodes/KimiAI/kimi.svg: Node icon.
  • package.json: Project dependencies and scripts.
  • tsconfig.json: TypeScript configuration.
  • README.md: This documentation file.

Future Enhancements

Potential future features include:

  • Conversation export/import.
  • Automatic summarization of old context.
  • Embedding-ready architecture and Vector DB compatibility.
  • Full AI Agent mode and Tool calling abstraction layer.
  • Prompt templates.
  • Binary and file support (PDF context, text files, RAG ingestion, file summarization).

Author: Manus AI Homepage: https://www.manus.im Repository: https://github.com/manus-ai/n8n-nodes-kimi-ai