integrate
하는 일
이 스킬은 이미 작동하는 AI 에이전트나 LLM 앱에 Olakai 모니터링을 추가합니다. AI 기능의 사용량과 비즈니스 결과를 추적하려는 개발자를 위한 스킬입니다.
사용하는 경우
- ✓이미 작동하는 AI 앱이 있고, 성능을 추적하고 싶을 때.
- ✓처리한 항목 수나 성공률 같은 맞춤 KPI를 설정하고 싶을 때.
- ✓모니터링이 처음부터 끝까지 작동하는지 확인해야 할 때.
스킬 링크
https://github.com/andrewyng/context-hub/blob/main/content/olakai/skills/integrate/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“기존 OpenAI 챗봇에 Olakai 모니터링을 추가하고 KPI 두 개를 설정해 주세요.”
매주 새 스킬 5개. 읽는 데 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 키, 그리고 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
- 업데이트
- 2026. 5. 31.
댓글
- …
이 저장소의 다른 스킬
get-api-docs
14k에이전트가 코드를 쓰기 전에, 오래된 기억 대신 서드파티 API와 라이브러리의 최신 문서를 가져오도록 돕습니다.
bloc-cubit
14k에이전트에게 Flutter 앱의 상태를 Bloc이나 Cubit으로 관리하는 방법을 가르칩니다. 각 도구를 고르는 기준과 테스트용 기본값을 포함합니다.
riverpod
14k에이전트가 Riverpod으로 Flutter 앱의 상태를 관리하도록 가르칩니다. 프로바이더, 비동기 데이터, 테스트를 다룹니다.
document-extraction
14k에이전트가 PDF, 이미지, 스프레드시트를 읽어 깨끗한 텍스트로 바꾸고, LandingAI ADE 서비스로 송장 합계 같은 항목을 뽑아내도록 돕습니다.
비슷한 스킬
add-model-provider
394k에이전트가 안전한 설정 명령으로 새 AI 모델 제공자를 OpenClaw에 연결하고, API 키를 평문으로 두지 않으며, 실시간 테스트를 실행하도록 돕습니다.
acp-router
394k에이전트가 OpenClaw를 통해 Claude Code나 Cursor 같은 코딩 도우미에 작업을 전달해, 작업이 그 도구에서 실행되도록 돕습니다.
browser-automation
394k에이전트가 로그인, 탭, 페이지 응답이 멈췄을 때의 복구를 포함해 웹 페이지를 단계별로 조작하도록 가르칩니다.