Zum Inhalt springen
Skillpedia
Agenten14k · #11273

integrate

Was er macht

Dieser Skill ergänzt eine bereits funktionierende KI-App oder einen LLM-Agenten um Olakai-Monitoring. Er richtet sich an Entwickelnde, die Nutzung und Geschäftsergebnisse ihrer KI-Funktionen verfolgen wollen.

Wann du ihn nutzt

  • ✓Wenn du eine funktionierende KI-App hast und ihre Leistung verfolgen willst.
  • ✓Wenn du eigene KPIs einrichten willst, etwa verarbeitete Elemente oder Erfolgsquoten.
  • ✓Wenn du prüfen musst, dass das Monitoring von Anfang bis Ende funktioniert.

Link zum Skill

https://github.com/andrewyng/context-hub/blob/main/content/olakai/skills/integrate/SKILL.md

Kopiere ihn und füge ihn in deine KI ein (Claude, ChatGPT oder Cursor) mit der Bitte, den Anweisungen zu folgen.

So nutzt du ihn

Am einfachsten: Kopiere die Nachricht und füge sie in deine KI ein. Sie liest den Skill und folgt den Anweisungen.

Fertige Nachricht zum Einfügen

Nutze diesen Skill, um mir zu helfen: https://github.com/andrewyng/context-hub/blob/main/content/olakai/skills/integrate/SKILL.md Lies die SKILL.md unter diesem Link und folge ihren Anweisungen für meine Aufgabe.
Soll deine KI Skills wie diesen selbst finden?Installiere den kostenlosen Skillpedia-MCP: eine Zeile, und sie durchsucht vor jeder Aufgabe 15.000+ Skills.In 1 Minute installieren →

Beispielanfrage an deine KI

“Ich möchte Olakai-Monitoring in meinen bestehenden OpenAI-Chatbot einbauen und zwei KPIs einrichten.”

5 neue Skills pro Woche. 1 Minute Lesezeit.

So funktioniert es

Der Agent umschließt den LLM-Client mit dem Olakai-SDK, richtet einige KPIs für diesen einen Agenten ein und führt eine Prüfung aus, ob Daten ankommen. Für die Einrichtung nutzt er die Olakai-CLI.

Technischer Inhalt (originale SKILL.md)

Originaltext des Autors, auf Englisch, direkt von GitHub.

Integrate Olakai into Existing AI Code

This skill guides you through adding Olakai monitoring to an existing AI agent or LLM-powered application with minimal code changes.

For full SDK documentation, see: https://app.olakai.ai/llms.txt

Prerequisites

  • Existing working AI agent/application using OpenAI, Anthropic, or other LLM
  • Olakai CLI installed and authenticated (npm install -g olakai-cli && olakai login)
  • Olakai API key for your agent (get via CLI: olakai agents get AGENT_ID --json | jq '.apiKey')
  • Node.js 18+ (for TypeScript) or Python 3.7+ (for Python)

Note: Each agent can have its own API key. Create one with olakai agents create --name "Name" --with-api-key

Why Custom KPIs Are Essential

Adding monitoring is only the first step. The real value of Olakai comes from tracking custom KPIs specific to your agent's business purpose.

Without KPIs configured:

  • Only basic token counts and request data
  • No aggregated business KPIs on dashboard
  • No alerting capabilities
  • No ROI tracking

With KPIs configured:

  • Custom KPIs (items processed, success rates, quality scores)
  • Trend analysis and performance dashboards
  • Threshold-based alerting
  • Business value calculations

Plan to configure at least 2-4 KPIs that answer: "How do I know this agent is performing well?"

KPIs are unique per agent. If adding monitoring to an agent that needs the same KPIs as another already-configured agent, you must still create new KPI definitions for this agent. KPIs cannot be shared or reused across agents.

Understanding the customData to KPI Pipeline

Before adding monitoring, understand how custom data flows through Olakai:

SDK customData → CustomDataConfig (Schema) → Context Variable → KPI Formula → kpiData

Critical Rules

Rule Consequence
Only CustomDataConfig fields become variables Unregistered customData fields are NOT usable in KPIs
Formula evaluation is case-insensitive stepCount, STEPCOUNT, StepCount all work in formulas
NUMBER configs need numeric values Don't send "5" (string), send 5 (number)

IMPORTANT: The SDK accepts any JSON in customData, but only fields registered as CustomDataConfigs are processed. Unregistered fields are stored but cannot be used in KPIs.

Quick Start (5-Minute Integration)

For TypeScript/JavaScript

1. Install the SDK:

npm install @olakai/sdk

2. Add tracking after your LLM call:

Before:

import OpenAI from "openai";
const openai = new OpenAI({ apiKey: process.env.OPENAI_API_KEY });

const response = await openai.chat.completions.create({
  model: "gpt-4o",
  messages: [{ role: "user", content: userMessage }],
});

After:

import OpenAI from "openai";
import { olakaiConfig, olakai } from "@olakai/sdk";

olakaiConfig({ apiKey: process.env.OLAKAI_API_KEY });

const openai = new OpenAI({ apiKey: process.env.OPENAI_API_KEY });

const response = await openai.chat.completions.create({
  model: "gpt-4o",
  messages: [{ role: "user", content: userMessage }],
});

// Track the interaction (fire-and-forget)
olakai("event", "ai_activity", {
  prompt: userMessage,
  response: response.choices[0].message.content,
  tokens: response.usage?.total_tokens,
  userEmail: user.email,
  task: "Customer Experience",
});

For Python

1. Install the SDK:

pip install olakai-sdk

2. Add tracking after your LLM call:

Before:

from openai import OpenAI
client = OpenAI(api_key=os.getenv("OPENAI_API_KEY"))

response = client.chat.completions.create(
    model="gpt-4o",
    messages=[{"role": "user", "content": user_message}],
)

After:

from openai import OpenAI
from olakaisdk import olakai_config, olakai, OlakaiEventParams

olakai_config(os.getenv("OLAKAI_API_KEY"))
client = OpenAI(api_key=os.getenv("OPENAI_API_KEY"))

response = client.chat.completions.create(
    model="gpt-4o",
    messages=[{"role": "user", "content": user_message}],
)

# Track the interaction
olakai("event", "ai_activity", OlakaiEventParams(
    prompt=user_message,
    response=response.choices[0].message.content,
    tokens=response.usage.total_tokens,
    userEmail=user.email,
    task="Customer Experience",
))

Detailed Integration Guide

Step 1: Identify Your Integration Pattern

Pattern A: Single LLM Client You have one OpenAI/Anthropic client used throughout your app. Use the fire

Häufige Fragen

Wie viele KPIs soll ich einrichten?

Der Skill empfiehlt, für jeden Agenten mindestens zwei bis vier KPIs zu planen.

Können KPIs zwischen Agenten geteilt werden?

Nein. Laut Skill braucht jeder Agent seine eigenen KPI-Definitionen.

Was brauche ich vor dem Start?

Eine Anmeldung in der Olakai-CLI, einen API-Schlüssel für den Agenten sowie Node.js 18 oder Python 3.7 oder neuer.

Details

Originalbeschreibung des Autors

Add Olakai monitoring to existing AI code — wrap your LLM client, configure custom KPIs, and validate the integration end-to-end

repo: andrewyng/context-hub

Beliebtheit

GitHub-Sterne
14k
Platz im Ranking
#11273
Lizenz
MIT
Aktualisiert
31.5.2026

Ist dieser Skill nützlich?

0

Anmelden um abzustimmen.

Kommentare

  • …

Weitere Skills aus diesem Repository

Ähnliche Skills