Skip to main content
Helicone OSS LLM Observability

Semantic Kernel Integration

Integrate Helicone AI Gateway with Microsoft Semantic Kernel to access 100+ LLM providers with unified observability.
2 min read

Introduction#

Semantic Kernel is Microsoft's open-source SDK for building AI agents and orchestrating LLM workflows across multiple languages (.NET, Python, Java). By integrating Helicone AI Gateway with Semantic Kernel, you can:

  • Route to different models & providers with automatic failover through a single endpoint
  • Unified billing with pass-through billing or bring your own keys
  • Monitor all requests with automatic cost tracking in one dashboard
Note

This integration requires only one line change to your existing Semantic Kernel code - adding the AI Gateway endpoint.

Integration Steps#

Create an account + Generate an API Key

Sign up at helicone.ai and generate an API key.

Note

You'll also need to configure your provider API keys (OpenAI, Anthropic, etc.) at Helicone Providers for BYOK (Bring Your Own Keys).

Set environment variables

Create a .env file in your project:

Add the AI Gateway endpoint to your Semantic Kernel configuration

Info

The only change from a standard Semantic Kernel setup is adding the endpoint parameter. Everything else stays the same!

Use the chat service normally

Your existing Semantic Kernel code continues to work without any changes:

View requests in the Helicone dashboard

All your Semantic Kernel requests are now visible in your Helicone dashboard:

  • Request/response bodies
  • Latency metrics
  • Token usage and costs
  • Model performance analytics
  • Error tracking
Tip

While you're here, why not give us a star on GitHub? It helps us a lot!

Migration Example#

Here's what migrating an existing Semantic Kernel application looks like:

Before (Direct OpenAI)#

After (Helicone AI Gateway)#

That's it! Just one additional parameter and you're routing through Helicone's AI Gateway.

Complete Working Example#

Here's a full example that tests multiple models:

Info

Looking for a framework or tool not listed here? Request it here!