Semantic Kernel Integration

April 13, 2026 ยท View on GitHub

Qualixar OS does not yet ship a dedicated Semantic Kernel adapter. However, the Qualixar OS REST API works with any HTTP-capable framework. This page shows how to integrate Qualixar OS into a Semantic Kernel application using the HTTP API directly.

Architecture

Semantic Kernel Plugin
    |
    HTTP POST /api/tasks
    |
    v
Qualixar OS Server
    |
    v
JSON Response { task_id, status, output, cost_usd, duration_ms }

Semantic Kernel's plugin system supports HTTP-based tools natively. You create a plugin that wraps the Qualixar OS /api/tasks endpoint.

Python: Using Semantic Kernel with httpx

import httpx
from semantic_kernel import Kernel
from semantic_kernel.functions import kernel_function

class QualixarOSPlugin:
    """Semantic Kernel plugin that delegates tasks to Qualixar OS."""

    def __init__(self, base_url: str = "http://localhost:3000"):
        self._base_url = base_url

    @kernel_function(
        name="run_task",
        description="Submit a task to Qualixar OS for multi-agent execution",
    )
    def run_task(
        self,
        prompt: str,
        task_type: str = "custom",
        budget_usd: float = 5.0,
    ) -> str:
        with httpx.Client(base_url=self._base_url, timeout=120.0) as client:
            resp = client.post("/api/tasks", json={
                "prompt": prompt,
                "type": task_type,
                "mode": "companion",
                "budget_usd": budget_usd,
            })
            resp.raise_for_status()
            return resp.json().get("output", "")


# Register the plugin
kernel = Kernel()
kernel.add_plugin(QualixarOSPlugin("http://localhost:3000"), plugin_name="qualixar")

C#: Using Semantic Kernel with HttpClient

using Microsoft.SemanticKernel;
using System.Net.Http.Json;

public class QualixarOSPlugin
{
    private readonly HttpClient _http;

    public QualixarOSPlugin(string baseUrl = "http://localhost:3000")
    {
        _http = new HttpClient { BaseAddress = new Uri(baseUrl) };
    }

    [KernelFunction("run_task")]
    [Description("Submit a task to Qualixar OS for multi-agent execution")]
    public async Task<string> RunTaskAsync(
        string prompt,
        string taskType = "custom",
        double budgetUsd = 5.0)
    {
        var payload = new { prompt, type = taskType, mode = "companion", budget_usd = budgetUsd };
        var resp = await _http.PostAsJsonAsync("/api/tasks", payload);
        resp.EnsureSuccessStatusCode();
        var result = await resp.Content.ReadFromJsonAsync<JsonElement>();
        return result.GetProperty("output").GetString() ?? "";
    }
}

REST API Endpoints Used

MethodEndpointPurpose
POST/api/tasksSubmit a task for execution
GET/api/tasks/:idCheck task status and get output
GET/api/costRetrieve cumulative cost data
GET/api/healthHealth check

See API Endpoints Reference for the full endpoint list.

Request Format

{
  "prompt": "Analyze the codebase for performance bottlenecks",
  "type": "analysis",
  "mode": "companion",
  "budget_usd": 3.0,
  "topology": "pipeline"
}

Response Format

{
  "task_id": "tsk_abc123",
  "status": "completed",
  "output": "Found 3 performance bottlenecks...",
  "cost_usd": 0.0234,
  "duration_ms": 8500,
  "metadata": {}
}

What is Next