Skip to content

13 Integrations integrations

LAP-CHRIS\chris edited this page May 19, 2026 · 1 revision

Integrations

Krnl-AI integrates with popular AI frameworks and tools.

LangChain

from krnlai.integrations.langchain import KrnlAITool

tool = KrnlAITool(safety_level="strict")
# Use with LangChain agents and chains

CrewAI

from krnlai.integrations.crewai import KrnlAIAgent

agent = KrnlAIAgent(safety_level="strict")
# Use in CrewAI crews and tasks

AutoGen

from krnlai.integrations.autogen import KrnlAIAssistantAgent

agent = KrnlAIAssistantAgent(name="krnlai", safety_level="strict")
# Use in AutoGen multi-agent conversations

FastAPI

from fastapi import FastAPI
from krnlai.integrations.fastapi import KrnlAIMiddleware

app = FastAPI()
app.add_middleware(KrnlAIMiddleware)
# All requests now pass through Krnl-AI safety checks

Enterprise Mode

Connect the Python SDK to the C# enterprise backend for persistence and scale:

from krnlai import CognitiveAgent

agent = CognitiveAgent(
    mode="enterprise",
    endpoint="http://kernel-api:5001",
    api_key="sk-...",
)

Auto-Detect

# Automatically detects C# backend, falls back to standalone
agent = CognitiveAgent(mode="auto")

Enterprise Components

Component Description
EnterpriseClient HTTP/gRPC client for C# backend
StreamingClient SSE streaming via async generator
QdrantStore Vector store for semantic memory
MySQLStore Persistent storage for cycles and audit trails

Clone this wiki locally