new-project
ما الذي تفعله
ترشد هذه المهارة إلى إنشاء مشروع وكيل ذكاء اصطناعي جديد متصل بـOlakai من البداية. وهي مخصصة للمطورين الذين يريدون التحليلات والحوكمة جاهزة قبل الإطلاق.
متى تستخدمها
- ✓عندما تبدأ وكيل ذكاء اصطناعي جديدًا وتريد المراقبة منذ اليوم الأول.
- ✓عندما تريد إعدادًا موجهًا لـOlakai SDK وCLI.
- ✓عندما تحتاج إلى تحديد مؤشرات أداء توضح مدى جودة عمل الوكيل.
رابط المهارة
https://github.com/andrewyng/context-hub/blob/main/content/olakai/skills/new-project/SKILL.mdانسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.
طريقة الاستخدام
أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.
رسالة جاهزة للصق
لـ Claude Code أو Codex أو Cursor: شغّله داخل مجلد مشروعك وستُثبَّت المهارة.
نزّل ملف SKILL.md وضعه في مجلد مهارات وكيلك.
مثال على ما تطلبه من الذكاء الاصطناعي
“أريد بدء مشروع وكيل ذكاء اصطناعي جديد مع مراقبة Olakai، وتحديد مؤشرات أدائه.”
5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.
كيف تعمل
يُعد الوكيل المشروع، ويضيف Olakai SDK، وينشئ مفتاحًا للوكيل، ويحدد مؤشرات الأداء، ويختبر النتيجة. ويتبع خطوات المهارة بترتيب ثابت.
المحتوى التقني (ملف SKILL.md الأصلي)
النص الأصلي من المؤلف، مباشرة من GitHub.
Build a New AI Agent Project with Olakai
This skill guides you through creating a new AI agent that is fully integrated with Olakai for analytics, KPI tracking, and governance.
Prerequisites
Before starting, ensure:
- Olakai CLI installed:
npm install -g olakai-cli - CLI authenticated:
olakai login - API key for SDK (generated per-agent via CLI — see Step 2.2)
Why Custom KPIs Are Essential
Olakai's core value is tracking business-specific KPIs for your AI agents. Without KPIs, you're tracking events without gaining actionable insights.
What you can measure with KPIs:
- Business outcomes (items processed, success rates, revenue impact)
- Operational data (step counts, retry rates, execution time)
- Quality indicators (error rates, user satisfaction signals)
Without KPIs configured:
- No dashboard KPIs beyond basic token counts
- No aggregated performance views
- No alerting thresholds
- No ROI calculations
Every agent should have 2-4 KPIs that answer: "How do I know this agent is performing well?"
KPIs created here belong to this specific agent only. If you later create additional agents, each one needs its own KPI definitions — KPIs cannot be shared or reused across agents.
Understanding the customData to KPI Pipeline
Before diving into implementation, understand how data flows through Olakai:
SDK customData → CustomDataConfig (Schema) → Context Variable → KPI Formula → kpiData
How It Works
- customData (SDK): Raw JSON you send with each event
- CustomDataConfig (Platform): Schema defining which fields are processed
- Context Variables: CustomDataConfig fields become available for formulas
- KPI Formula: Expression that computes a value (e.g.,
SuccessRate * 100) - kpiData (Response): Computed KPI values returned with each event
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) |
| KPIs are unique per agent | Each KPI belongs to exactly one agent — create separately for each |
Built-in Context Variables (Always Available)
| Variable | Type | Description |
|---|---|---|
Prompt |
string | The prompt text sent to the LLM |
Response |
string | The LLM response text |
Documents count |
number | Number of attached documents |
PII detected |
boolean | Whether PII was detected |
PHI detected |
boolean | Whether PHI was detected |
CODE detected |
boolean | Whether code was detected |
SECRET detected |
boolean | Whether secrets were detected |
Step 1: Design the Agent Architecture
1.1 Determine Agent Type
Agentic AI (Multi-step autonomous workflows):
- Research agents, document processors, data pipelines
- Track as SINGLE events aggregating all internal LLM calls
- Focus on workflow-level KPIs (total tokens, total time, success/failure)
Assistive AI (Interactive chatbots/copilots):
- Customer support agents, coding assistants, Q&A systems
- Track EACH interaction as separate events
- Focus on conversation-level KPIs (per-message tokens, response quality)
1.2 Design Your KPI Schema (CRITICAL)
Design your KPIs BEFORE writing any SDK code. This ensures only meaningful data is sent and tracked.
Step A: Identify Business Questions
What do stakeholders need to know about this agent?
- "How many items does it process per run?"
- "What's the success/failure rate?"
- "How efficient is each execution?"
Step B: Map Questions to Data Fields
| Business Question | Field Name | Type | KPI Formula | Aggregation |
|---|---|---|---|---|
| Throughput | ItemsProcessed | NUMBER | ItemsProcessed |
SUM |
| Reliability | SuccessRate | NUMBER | SuccessRate * 100 |
AVERAGE |
| Error count | SuccessRate | NUMBER | IF(SuccessRate < 1, 1, 0) |
SUM |
| Correlation | ExecutionId | STRING | (for filtering only) | - |
Step C: Plan Your customData Structure
// ONLY include fields you'll register as CustomDataConfigs
customData: {
// Business KPIs
ItemsProcessed: number, // Count of items handled
SuccessRate: number, // 0-1 success ratio
// Performance KPIs
StepCount: number,
الأسئلة الشائعة
هل أحتاج إلى CLI قبل البدء؟
نعم. تتوقع المهارة أن يكون Olakai CLI مثبتًا وأنك مسجّل الدخول.
ما المقصود بمؤشر الأداء هنا؟
هو مقياس للأعمال، مثل العناصر المعالجة أو نسبة النجاح أو نسبة إعادة المحاولة، يوضح أداء الوكيل.
هل أستطيع إعادة استخدام مؤشرات الأداء نفسها لوكيل آخر؟
لا. مؤشرات الأداء تخص وكيلًا واحدًا، فيحتاج كل وكيل جديد إلى مجموعته الخاصة.
التفاصيل
الوصف الأصلي من المؤلف
Build a new AI agent with Olakai monitoring from scratch — project setup, SDK integration, KPI configuration, and end-to-end validation
repo: andrewyng/context-hub
الشعبية
- نجوم GitHub
- 14k
- الترتيب
- #11274
- الترخيص
- MIT
- آخر تحديث
- 31/5/2026
التعليقات
- …
المزيد من المهارات من هذا المستودع
get-api-docs
14kيساعد وكيلك على جلب وثائق محدثة لواجهات برمجة وأطر خارجية قبل كتابة الشيفرة، بدلًا من الاعتماد على الذاكرة القديمة.
bloc-cubit
14kيعلّم وكيلك إدارة حالة التطبيق في Flutter باستخدام Bloc أو Cubit، ومتى تختار كلًا منهما، والإعدادات الآمنة للاختبار.
riverpod
14kيعلّم وكيلك إدارة حالة تطبيق Flutter باستخدام Riverpod، ويشمل المزودات والبيانات غير المتزامنة والاختبار، بإعدادات افتراضية مناسبة لكل حالة.
document-extraction
14kيساعد وكيلك على قراءة ملفات PDF والصور والجداول، وتحويلها إلى نص نظيف، واستخراج حقول مثل إجماليات الفواتير باستخدام خدمة ADE من LandingAI.
مهارات مشابهة
add-model-provider
394kتتيح لوكيلك ربط مزوّد نموذج ذكاء اصطناعي جديد بـ OpenClaw باستخدام أوامر إعداد آمنة، وإبقاء مفاتيح API خارج النص العادي، وإجراء اختبار حي.
acp-router
394kيساعد وكيلك على إرسال مهمة إلى مساعد برمجة مثل Claude Code أو Cursor عبر OpenClaw، فيعمل العمل داخل تلك الأداة.
browser-automation
394kتعلّم وكيلك التحكم في صفحات الويب خطوة بخطوة، بما في ذلك تسجيل الدخول والتبويبات والتعافي عندما تتوقف الصفحة عن الاستجابة.