Service Integrations
Service Integrations
eKuiper Manager enables advanced edge processing workflows by integrating with external computational services. These integrations provide AI-driven rule generation, real-time log analysis, and management of external eKuiper instances through a secure proxy layer.
AI Assistant Integration (OpenRouter)
The platform integrates with OpenRouter to provide various AI-powered features. By leveraging Large Language Models (LLMs) such as Gemini 1.5 Flash and Llama 3, the manager assists users in creating, analyzing, and troubleshooting stream processing logic.
Key Capabilities
- Rule & Stream Generation: Describe your requirements in plain English to generate valid eKuiper SQL and sink configurations.
- Rule Topology Analysis: Maps complex SQL logic to visual topology nodes with human-readable explanations.
- Log & Metric Analysis: Analyzes live trace data to identify bottlenecks or explain data field values (e.g., interpreting telemetry from stringified JSON payloads).
- Execution Plan Explanation: Provides a developer-friendly breakdown of the eKuiper Query Plan (Explain) to identify performance issues.
AI API Endpoints
The following internal API endpoints handle service requests. If you are extending the UI, you can interact with these services:
| Endpoint | Method | Description |
| :--- | :--- | :--- |
| /api/ai/rule-gen | POST | Generates SQL and Action configurations based on stream metadata. |
| /api/ai/analyze | POST | Maps Rule SQL to Topology Node IDs for guided debugging. |
| /api/ai/explain-plan | POST | Provides a markdown analysis of an eKuiper execution plan. |
| /api/ai/master-chat | POST | A global assistant with context of the entire system state (rules, streams, metrics). |
Example: Generating a Stream via AI
To generate a stream definition, the service accepts a natural language prompt and returns a structured JSON object.
// POST /api/ai/stream-gen
// Input
{
"prompt": "Create a stream for a temperature sensor via MQTT on topic 'factory/sensor1'",
"modelName": "google/gemini-flash-1.5"
}
// Output
{
"name": "temp_sensor_stream",
"sourceType": "mqtt",
"datasource": "factory/sensor1",
"format": "json",
"fields": [
{ "name": "temperature", "type": "float" },
{ "name": "humidity", "type": "float" }
],
"description": "Inbound telemetry for factory sensor 1"
}
eKuiper Instance Connections
eKuiper Manager acts as a centralized control plane. It integrates with remote eKuiper instances through a dedicated connection proxy, allowing the management of multiple edge nodes from a single interface.
Configuration Proxy
The manager proxies requests to external eKuiper servers to bypass CORS limitations and manage authentication headers centrally.
Endpoint Structure:
GET/POST /api/connections/[connection_id]/ekuiper/[...path]
connection_id: The unique identifier for the saved eKuiper server configuration.path: The native eKuiper REST API path (e.g.,rules,streams,nodes).
Connection Verification
The system provides a verification script to ensure the integration with a target eKuiper instance is fully functional.
# Verify base API compatibility with an external instance
npx ts-node scripts/verify-api.ts
External Plugins & UDFs
The service integration layer also manages the lifecycle of User Defined Functions (UDFs) and Plugins, which allow eKuiper to execute custom computational logic (Go or Python).
Managing Extensions
Users can view and verify installed extensions through the Client interface:
import { EKuiperClient } from "@/lib/ekuiper/client";
const client = new EKuiperClient("https://your-ekuiper-url");
// List all installed function plugins
const plugins = await client.listPlugins("functions");
// List all registered UDFs (User Defined Functions)
const udfs = await client.listUDFs();
Supported AI Models
The following models are optimized for industrial automation and SQL generation within the eKuiper Manager:
google/gemini-2.0-flash-exp(Recommended for speed/analysis)meta-llama/llama-3.3-70b-instructqwen/qwen-2.5-vl-7b-instructmistralai/mistral-small-3.1-24b-instruct