मुख्य सामग्री पर जाएँ
Skillpedia
एजेंट14k · #11273

integrate

यह क्या करती है

यह स्किल पहले से काम कर रहे AI एजेंट या LLM ऐप में Olakai मॉनिटरिंग जोड़ती है। यह उन डेवलपर्स के लिए है जो अपने AI फ़ीचर के इस्तेमाल और व्यावसायिक नतीजे ट्रैक करना चाहते हैं।

कब इस्तेमाल करें

  • ✓जब आपके पास काम करने वाला AI ऐप है और आप देखना चाहते हैं कि वह कैसा चल रहा है।
  • ✓जब आप कस्टम KPI सेट करना चाहते हैं, जैसे प्रोसेस किए गए आइटम या सफलता दर।
  • ✓जब आपको शुरू से अंत तक जाँचना है कि मॉनिटरिंग काम करती है।

Skill का लिंक

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

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/andrewyng/context-hub/blob/main/content/olakai/skills/integrate/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“मैं अपने मौजूदा OpenAI चैटबॉट में Olakai मॉनिटरिंग जोड़ना और दो KPI सेट करना चाहता हूँ।”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

एजेंट LLM क्लाइंट को Olakai SDK से लपेटता है, इस एक एजेंट के लिए कुछ KPI सेट करता है, और यह पुष्टि करने के लिए जाँच चलाता है कि डेटा पहुँचता है। सेटअप के लिए वह Olakai CLI इस्तेमाल करता है।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे 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

अक्सर पूछे जाने वाले सवाल

मुझे कितने KPI सेट करने चाहिए?

स्किल हर एजेंट के लिए कम से कम दो से चार KPI की योजना सुझाती है।

क्या KPI एजेंटों के बीच साझा हो सकते हैं?

नहीं। स्किल के अनुसार हर एजेंट की अपनी KPI परिभाषाएँ चाहिए।

शुरू करने से पहले मुझे क्या चाहिए?

Olakai CLI लॉगिन, एजेंट API key, और Node.js 18 या Python 3.7 या नए संस्करण।

जानकारी

लेखक का मूल विवरण

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

लोकप्रियता

GitHub स्टार
14k
रैंकिंग में स्थान
#11273
लाइसेंस
MIT
अपडेट की गई
31/5/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

get-api-docs

14k

यह आपके एजेंट को कोड लिखने से पहले तीसरे पक्ष के API और लाइब्रेरी का ताज़ा दस्तावेज़ लाने में मदद करती है, पुरानी याददाश्त पर भरोसा करने के बजाय।

कोडिंगसामान्य कोडिंग

bloc-cubit

14k

यह आपके एजेंट को Bloc या Cubit से Flutter ऐप की स्थिति संभालना सिखाती है, कब कौन-सा चुनें और टेस्टिंग के लिए सुरक्षित डिफ़ॉल्ट क्या हों।

कोडिंगमोबाइल ऐप

riverpod

14k

यह आपके एजेंट को Riverpod से Flutter ऐप की स्थिति संभालना सिखाती है, providers, async डेटा और टेस्टिंग सहित, हर स्थिति के लिए ठीक डिफ़ॉल्ट के साथ।

कोडिंगमोबाइल ऐप

document-extraction

14k

यह आपके एजेंट को PDF, इमेज और स्प्रेडशीट पढ़ने, उन्हें साफ़ टेक्स्ट में बदलने, और LandingAI की ADE सेवा से इनवॉइस कुल जैसे फ़ील्ड निकालने में मदद करती है।

डेटाएनालिसिस और स्प्रेडशीट

मिलती-जुलती skills