This package provides n8n nodes for integrating with the Kaia LLM platform, including:
- Kaia Node: For making API requests to the admin instance and headless widget API
- Kaia Trigger: For creating system webhooks and receiving webhook events
Follow the installation instructions for the n8n community nodes. After installation, the nodes will appear in the n8n editor.
- Make API requests to the Kaia admin instance
- Interact with the headless widget API
- Support for authentication via Admin Tokens
- Handle various HTTP methods (GET, POST, PUT, DELETE)
- Resources: Widgets (CRUD), Assistants (CRUD + models), Statistics, Chat Histories, User Accounts (incl. credits), Function Calls, Answer Ratings/Reportings, Summary Config, User Files, API Configs, Documents (CRUD + shards), Document Imports, Admin Tokens, Vector DBs (CRUD + extras), Document Shards, Crawls (websites), Feeds, Contents, Link Packages, Shop (redeem codes)
- File upload support for relevant endpoints
- Create system webhooks in the Kaia platform
- Receive webhook events from various models
- Automatic authentication and token management
- Support for multiple webhook configurations
- Event filtering by model and type
The integration uses Admin Tokens for authentication. You'll need to:
- Create an Admin Token in your Kaia admin interface
- Configure the token in the node credentials
- The token will be automatically used for API requests
Use the Kaia node to interact with various endpoints:
- GET /assistants - List all assistants
- POST /chat_histories - Create chat history
- GET /api_configs - List API configurations
- POST /system_webhooks - Create system webhooks
- POST /widget_configs.json - Create widget config
- POST /redeem_codes.json - Create redeem code
Use the Kaia Trigger to create webhooks that listen for events:
- Model Events: Listen for changes to specific models
- Event Types: Create, update, delete events
- Payload Processing: Handle webhook payloads in your workflows
Set the base URL for your Kaia admin instance (e.g., https://your-instance.kaia.team
)
Provide your Admin Token for authentication. The token should have the necessary permissions for the operations you want to perform.
The system webhooks can listen for events on various models:
- UserAccount: User account changes
- Assistant: Assistant configuration changes
- ChatHistory: Chat history updates
- ApiConfig: API configuration changes
- SystemWebhook: Webhook management events
- Document: Document changes
- VecDb: Vector database changes
- DocumentShards: Document shard events
- Crawl: Website crawl events
- Feed: Feed management events
- Content: Content changes
- LinkPackage: Link package events
- Shop: Shop redeem events
The nodes include comprehensive error handling:
- Authentication errors
- Network connectivity issues
- API rate limiting
- Invalid request parameters
To contribute to this package:
- Fork the repository
- Install dependencies:
npm install
- Build the package:
npm run build
- Test your changes
- Submit a pull request
MIT License - see LICENSE file for details.