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 पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
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
कमेंट
- …
इस 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
add-model-provider
394kयह आपके एजेंट को सुरक्षित कमांड से OpenClaw में नया AI मॉडल प्रोवाइडर जोड़ने, API कीज़ को सादे टेक्स्ट से बचाने और लाइव टेस्ट चलाने देती है।
acp-router
394kयह आपके एजेंट को OpenClaw के ज़रिए Claude Code या Cursor जैसे कोडिंग असिस्टेंट को काम भेजने देती है, ताकि काम उसी टूल में चले।
browser-automation
394kयह आपके एजेंट को लॉगिन, टैब और अटकी वेब पेज से उबरने समेत, वेबसाइट पर चरण-दर-चरण काम करना सिखाती है।