skills/olakai-new-project/SKILL.md
Build a new AI agent project from scratch — design metrics, configure the platform, write SDK code, and validate end-to-end. AUTO-INVOKE when user wants to: build a new AI agent, create an AI workflow, set up a new chatbot or copilot, implement an autonomous agent, design an AI-powered feature, start a new project with AI observability, or add KPI tracking and governance to a new AI system. TRIGGER KEYWORDS: olakai, create agent, new agent, build agent, AI agent, AI workflow, chatbot, copilot, autonomous agent, agent architecture, agentic AI, assistive AI, observability setup, KPI tracking, governance, new AI project, AI monitoring setup, agent from scratch. DO NOT load for: adding monitoring to existing code (use olakai-integrate), troubleshooting existing agents (use olakai-troubleshoot), or generating reports (use olakai-reports).
npx skillsauth add olakai-ai/olakai-skills olakai-new-projectInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill guides you through creating a new AI agent that is fully integrated with Olakai for monitoring, analytics, and governance.
Before starting, ensure:
npm install -g olakai-cliolakai loginOlakai's core value is tracking business-specific KPIs for your AI agents. Without KPIs, you're just logging events - not gaining actionable insights.
What you can measure with KPIs:
Without KPIs configured:
⚠️ 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.
Before diving into implementation, understand how data flows through Olakai:
SDK customData → CustomDataConfig (Schema) → Context Variable → KPI Formula → kpiData
SuccessRate * 100)| 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, even with identical formulas |
| 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 |
Agentic AI (Multi-step autonomous workflows):
Assistive AI (Interactive chatbots/copilots):
Design your metrics BEFORE writing any SDK code. This ensures only meaningful data is sent and tracked.
What do stakeholders need to know about this agent?
| 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 |
| Workflow ID | ExecutionId | STRING | (for filtering only) | - |
// ONLY include fields you'll register as CustomDataConfigs
customData: {
// Business metrics (will become KPIs)
ItemsProcessed: number, // Count of items handled
SuccessRate: number, // 0-1 success ratio
// Performance metrics (will become KPIs)
StepCount: number, // Number of workflow steps
// Identification (for filtering, not KPIs)
ExecutionId: string, // Correlation ID
}
⚠️ IMPORTANT: Only include fields you will register as CustomDataConfigs. Unregistered fields are stored but cannot be used in KPIs - they're effectively wasted data.
The Olakai platform automatically tracks these fields - do NOT duplicate them in customData:
| Already Tracked | Where | Don't Send As customData |
|-----------------|-------|--------------------------|
| Session ID | Main payload | ❌ sessionId |
| Agent ID | API key association | ❌ agentId |
| User email | userEmail parameter | ❌ email, userEmail |
| Timestamp | Event metadata | ❌ timestamp, createdAt |
| Request time | requestTime parameter | ❌ duration, latency |
| Token count | tokens parameter / auto-extracted | ❌ tokenCount, totalTokens |
| Model name | Auto-extracted from LLM response (modelName) | ❌ model, modelName |
| Execution cost | Auto-calculated via model-based pricing | ❌ cost, executionCost |
| Provider | Wrapped client config | ❌ provider |
customData is ONLY for:
ItemsProcessed, SuccessRate)Department, ProjectId)❌ BAD: Sending redundant data
customData: {
sessionId: session.id, // ❌ Already tracked
agentId: agentConfig.id, // ❌ Already tracked
userEmail: user.email, // ❌ Pass via userEmail param instead
timestamp: Date.now(), // ❌ Already tracked
ItemsProcessed: 10, // ✅ Needed for KPI
}
✅ GOOD: Only KPI-relevant data
customData: {
ItemsProcessed: 10, // ✅ Used in KPI formula
SuccessRate: 1.0, // ✅ Used in KPI formula
ExecutionId: uuid, // ✅ For correlation/filtering
}
⚠️ Every agent MUST belong to a workflow, even if it's the only agent in that workflow.
Why workflows are required:
# Create the workflow first
olakai workflows create --name "Your Workflow Name" --json
# Save the workflow ID for agent association
# Output: { "id": "wfl_xxx...", "name": "Your Workflow Name" }
# Create the agent associated with the workflow
olakai agents create \
--name "Your Agent Name" \
--description "What this agent does" \
--workflow WORKFLOW_ID \
--with-api-key \
--json
# Returns agent details including apiKey for SDK use:
# {
# "id": "cmkbteqn501kyjy4yu6p6xrrx",
# "name": "Your Agent Name",
# "workflowId": "wfl_xxx...",
# "apiKey": "sk_agent_xxxxx..." <-- Use this in your SDK
# }
# To retrieve an existing agent's API key:
olakai agents get AGENT_ID --json | jq '.apiKey'
Workflow → Agent Hierarchy:
Workflow: "Customer Support Pipeline"
├── Agent: "Ticket Classifier"
├── Agent: "Response Generator"
└── Agent: "Quality Checker"
Workflow: "Document Processing"
└── Agent: "Document Summarizer" ← Even single agents need a workflow
⚠️ This step MUST be completed before Step 3 (SDK Integration). Only fields registered here can be used in KPI formulas. Design the schema first, then code to it.
⚠️ ONLY create configs for data you'll use in KPIs or for filtering. Don't create configs for data already tracked (sessionId, timestamps, tokens) or "nice to have" fields. Each config should answer: "Will I use this in a KPI formula?" or "Will I filter/group by this?"
For each custom metric from Step 1.2, create a CustomDataConfig:
# Replace YOUR_AGENT_ID with the actual agent ID from step 2.1
# For numeric metrics (can be used in KPI calculations)
olakai custom-data create --agent-id YOUR_AGENT_ID --name "ItemsProcessed" --type NUMBER --description "Count of items processed per run"
olakai custom-data create --agent-id YOUR_AGENT_ID --name "SuccessRate" --type NUMBER --description "Success ratio 0-1"
olakai custom-data create --agent-id YOUR_AGENT_ID --name "StepCount" --type NUMBER --description "Number of workflow steps executed"
# For string metrics (for filtering/grouping, not calculations)
olakai custom-data create --agent-id YOUR_AGENT_ID --name "ExecutionId" --type STRING --description "Correlation ID for the execution"
# Verify all configs are created for this agent
olakai custom-data list --agent-id YOUR_AGENT_ID
What this enables:
customData with these names are processedcustomData field NOT listed here is ignored for KPI purposes⚠️ Both CustomDataConfigs and KPIs are created for THIS agent only. Each config is bound to one agent. If multiple agents need the same fields, create the CustomDataConfig and KPI separately for each agent.
Instead of writing KPI formulas from scratch, you can use predefined classifier templates via the CLI or the dashboard UI.
List available templates:
olakai kpis templates
Create a classifier KPI from a template:
# Create a classifier KPI using a pre-built template
olakai kpis create --name "User Satisfaction" \
--calculator-id classifier --template-id sentiment_scorer \
--scope CHAT --agent-id $AGENT_ID
# Create a time-saved estimator
olakai kpis create --name "Time Saved" \
--calculator-id classifier --template-id time_saved_estimator \
--scope CHAT --agent-id $AGENT_ID
Or via the dashboard UI:
Templates are a great starting point. You can always add custom formula-based KPIs alongside them.
Execution Cost is now automatically calculated using model-based pricing. The SDK sends
modelNameas a top-level field (auto-extracted from LLM responses), and the platform resolves the cost per token based on the model used (e.g., GPT-4o, Claude Sonnet). If the model is not recognized, a fallback rate of $5/1M tokens is applied. You do not need to manually configure cost-per-token for recognized models.
New agents automatically get metric slot KPIs that provide standardized measurements out of the box. Each slot has a default formula and an enforced output contract (unit).
Auto-provisioned slots per agent:
| Slot KPI | Output Unit | Default Formula | Configurable Via |
|----------|-------------|-----------------|------------------|
| Execution Cost | USD | Token-based cost estimate | Assumptions panel (token rate) |
| Time Saved | minutes | time_saved_estimator classifier (CHAT scope) | Assumptions panel (hourly rate) |
| Value Created | USD | Time Saved * hourly rate | Assumptions panel (hourly rate) |
| Governance Compliance | % | Policy pass rate | N/A (automatic) |
Composite KPI (derived from slots):
Verify the auto-provisioned slot KPIs exist:
olakai kpis list --agent-id YOUR_AGENT_ID
# Look for slot KPIs: Execution Cost, Time Saved, Value Created, Governance Compliance
If the Time Saved classifier is missing (e.g., agent created via CLI), add it manually:
olakai kpis create --name "Time Saved" \
--calculator-id classifier --template-id time_saved_estimator \
--scope CHAT --agent-id YOUR_AGENT_ID
Configuring Assumptions for meaningful metrics:
Overriding slot formulas: Slot KPIs use sensible defaults, but you can override the formula while keeping the enforced output unit. For example, override Execution Cost to use your actual billing data instead of the token-based estimate.
Define KPIs that use your custom data:
# Simple variable KPIs
olakai kpis create \
--name "Items Processed" \
--agent-id YOUR_AGENT_ID \
--calculator-id formula \
--formula "ItemsProcessed" \
--unit "items" \
--aggregation SUM
# Calculated KPIs
olakai kpis create \
--name "Success Rate" \
--agent-id YOUR_AGENT_ID \
--calculator-id formula \
--formula "SuccessRate * 100" \
--unit "%" \
--aggregation AVERAGE
# Conditional KPIs
olakai kpis create \
--name "Error Count" \
--agent-id YOUR_AGENT_ID \
--calculator-id formula \
--formula "IF(SuccessRate < 1, 1, 0)" \
--unit "errors" \
--aggregation SUM
# Validate formulas before creating
olakai kpis validate --formula "ItemsProcessed" --agent-id YOUR_AGENT_ID
Install dependencies:
npm install @olakai/sdk openai
Basic wrapped client setup:
import { OlakaiSDK } from "@olakai/sdk";
import OpenAI from "openai";
// Initialize Olakai
const olakai = new OlakaiSDK({
apiKey: process.env.OLAKAI_API_KEY!,
debug: process.env.NODE_ENV === "development",
});
await olakai.init();
// Wrap your LLM client
const openai = olakai.wrap(
new OpenAI({ apiKey: process.env.OPENAI_API_KEY }),
{
provider: "openai",
defaultContext: {
task: "Your Task Category", // e.g., "Data Processing & Analysis"
},
}
);
// Use wrapped client - monitoring happens automatically
const response = await openai.chat.completions.create({
model: "gpt-4o",
messages: [{ role: "user", content: userPrompt }],
});
Agentic workflow with manual event tracking:
taskExecutionId— Cross-Agent Task CorrelationGenerate ONE
taskExecutionIdper task and share it across all agents in a multi-agent workflow. This is how Olakai links work done by different agents into a single logical task for analytics. Without it, each agent's events are isolated by session and you lose visibility into the full end-to-end task. The orchestrator should generate the ID and pass it to every agent it invokes.
async function runAgent(input: string): Promise<string> {
const startTime = Date.now();
const executionId = crypto.randomUUID();
const taskExecutionId = crypto.randomUUID(); // Share across all agents in a multi-agent workflow
let totalTokens = 0;
let stepCount = 0;
let itemsProcessed = 0;
try {
// Step 1: Planning
stepCount++;
const plan = await openai.chat.completions.create({
model: "gpt-4o",
messages: [{ role: "user", content: `Plan: ${input}` }],
});
totalTokens += plan.usage?.total_tokens ?? 0;
// Step 2: Execution (example: process multiple items)
const items = parseItems(plan.choices[0].message.content);
for (const item of items) {
stepCount++;
const result = await openai.chat.completions.create({
model: "gpt-4o",
messages: [{ role: "user", content: `Process: ${item}` }],
});
totalTokens += result.usage?.total_tokens ?? 0;
itemsProcessed++;
}
// Step 3: Summarize
stepCount++;
const summary = await openai.chat.completions.create({
model: "gpt-4o",
messages: [{ role: "user", content: "Summarize results" }],
});
totalTokens += summary.usage?.total_tokens ?? 0;
const finalResponse = summary.choices[0].message.content ?? "";
// Track the complete workflow as a single event
// ⚠️ IMPORTANT: Only send fields that have CustomDataConfigs (from Step 2.2)
olakai.event({
prompt: input,
response: finalResponse,
tokens: totalTokens,
requestTime: Date.now() - startTime,
taskExecutionId, // Links events across agents in the same task
task: "Data Processing & Analysis",
customData: {
// Only include fields registered in Step 2.2
ExecutionId: executionId,
StepCount: stepCount,
ItemsProcessed: itemsProcessed,
SuccessRate: 1.0,
// ❌ DON'T add unregistered fields - they can't be used in KPIs
},
});
return finalResponse;
} catch (error) {
// Track failed execution - same fields, different values
olakai.event({
prompt: input,
response: `Error: ${error instanceof Error ? error.message : "Unknown"}`,
tokens: totalTokens,
requestTime: Date.now() - startTime,
taskExecutionId,
task: "Data Processing & Analysis",
customData: {
ExecutionId: executionId,
StepCount: stepCount,
ItemsProcessed: itemsProcessed,
SuccessRate: 0, // 0 indicates failure
},
});
throw error;
}
}
Install dependencies:
pip install olakai-sdk openai
Auto-instrumentation setup:
import os
from olakaisdk import olakai_config, instrument_openai, olakai_context, olakai_event, OlakaiEventParams
from openai import OpenAI
# Initialize Olakai
olakai_config(os.getenv("OLAKAI_API_KEY"))
instrument_openai()
# Create OpenAI client (automatically instrumented)
client = OpenAI(api_key=os.getenv("OPENAI_API_KEY"))
# For assistive AI - use context manager
with olakai_context(userEmail="[email protected]", task="Customer Support"):
response = client.chat.completions.create(
model="gpt-4",
messages=[{"role": "user", "content": user_message}]
)
Manual event tracking for agentic workflows:
import time
import uuid
def run_agent(input_text: str) -> str:
start_time = time.time()
execution_id = str(uuid.uuid4())
task_execution_id = str(uuid.uuid4()) # Share across all agents in a multi-agent workflow
total_tokens = 0
step_count = 0
items_processed = 0
try:
# Your workflow steps here...
step_count += 1
response = client.chat.completions.create(
model="gpt-4",
messages=[{"role": "user", "content": input_text}]
)
total_tokens += response.usage.total_tokens
final_response = response.choices[0].message.content
# Track successful execution
# ⚠️ Only send fields registered as CustomDataConfigs
olakai_event(OlakaiEventParams(
prompt=input_text,
response=final_response,
tokens=total_tokens,
requestTime=int((time.time() - start_time) * 1000),
taskExecutionId=task_execution_id,
task="Data Processing & Analysis",
customData={
"ExecutionId": execution_id,
"StepCount": step_count,
"ItemsProcessed": items_processed,
"SuccessRate": 1.0,
}
))
return final_response
except Exception as e:
# Track failed execution - same fields, different values
olakai_event(OlakaiEventParams(
prompt=input_text,
response=f"Error: {str(e)}",
tokens=total_tokens,
requestTime=int((time.time() - start_time) * 1000),
taskExecutionId=task_execution_id,
task="Data Processing & Analysis",
customData={
"ExecutionId": execution_id,
"StepCount": step_count,
"ItemsProcessed": items_processed,
"SuccessRate": 0, # 0 indicates failure
}
))
raise
For other languages or custom integrations:
# ⚠️ customData fields must match registered CustomDataConfigs exactly
curl -X POST "https://app.olakai.ai/api/monitoring/prompt" \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{
"prompt": "User input here",
"response": "Agent response here",
"app": "your-agent-name",
"task": "Data Processing & Analysis",
"tokens": 1500,
"requestTime": 5000,
"customData": {
"ExecutionId": "abc-123",
"StepCount": 5,
"ItemsProcessed": 10,
"SuccessRate": 1.0
}
}'
CRITICAL: Always validate your implementation by running a test and inspecting the actual event data. Do not assume configuration is correct - verify it.
Execute your agent with test data to generate at least one monitoring event:
// Run your agent
const result = await runAgent("Test input for validation");
console.log("Agent completed, checking Olakai...");
# List recent activity for your agent
olakai activity list --agent-id YOUR_AGENT_ID --limit 1 --json
# Get the full event details including customData and kpiData
olakai activity get EVENT_ID --json
Check customData is present and correct:
olakai activity get EVENT_ID --json | jq '.customData'
Expected output:
{
"ExecutionId": "abc-123",
"StepCount": 5,
"ItemsProcessed": 10,
"SuccessRate": 1.0
}
If fields are missing: SDK isn't sending them. Check your customData object in the event call.
Check KPIs are numeric (not strings):
olakai activity get EVENT_ID --json | jq '.kpiData'
CORRECT - numeric values:
{
"Items Processed": 10,
"Success Rate": 100
}
WRONG - string values (indicates broken formula):
{
"Items Processed": "itemsProcessed",
"Success Rate": "SuccessRate"
}
If KPIs show strings: The formula is stored incorrectly. Fix with:
olakai kpis update KPI_ID --formula "YourVariable"
Check KPIs show values (not null):
If KPIs show null:
jq '.customData.YourField'olakai custom-data listRepeat the cycle until all validations pass:
┌─────────────────────────────────────────────────────────┐
│ 1. Run agent (generate event) │
│ ↓ │
│ 2. Fetch event: olakai activity get ID --json │
│ ↓ │
│ 3. Check customData present? │
│ NO → Fix SDK code, goto 1 │
│ ↓ │
│ 4. Check kpiData numeric (not strings)? │
│ NO → Fix formula: olakai kpis update ID --formula │
│ goto 1 │
│ ↓ │
│ 5. Check kpiData not null? │
│ NO → Create CustomDataConfig or fix field name │
│ goto 1 │
│ ↓ │
│ ✅ All validations pass - implementation complete │
└─────────────────────────────────────────────────────────┘
# 1. Run your agent (generates event)
$ node my-agent.js "Test task"
Agent completed successfully
# 2. Get the latest event
$ olakai activity list --agent-id cmkxxx --limit 1 --json | jq '.prompts[0].id'
"cmkeyyy"
# 3. Inspect the event
$ olakai activity get cmkeyyy --json | jq '{customData, kpiData}'
{
"customData": {
"StepCount": 3,
"ItemsProcessed": 5,
"SuccessRate": 1
},
"kpiData": {
"Steps Executed": 3, # ✅ Numeric
"Items Processed": 5, # ✅ Numeric
"Success Rate": 100 # ✅ Numeric (formula: SuccessRate * 100)
}
}
# ✅ All good! Implementation is correct.
Before deploying to production:
| Category | Operators |
|----------|-----------|
| Arithmetic | +, -, *, / |
| Comparison | <, <=, =, <>, >=, > |
| Logical | AND, OR, NOT |
| Conditional | IF(condition, true_val, false_val), MAP(value, match1, out1, default) |
| Math | ABS, MAX, MIN, AVERAGE, TRUNC |
| Null handling | ISNA(value), ISDEFINED(value), NA() |
# Simple variable passthrough
--formula "ItemsProcessed"
# Percentage conversion (0-1 to 0-100)
--formula "SuccessRate * 100"
# Conditional counting (count failures)
--formula "IF(SuccessRate < 1, 1, 0)"
# Boolean to number conversion
--formula "IF(PII detected, 1, 0)"
# Null-safe with default value
--formula "IF(ISDEFINED(MyField), MyField, 0)"
# Compound conditions
--formula "IF(AND(StepCount > 5, SuccessRate < 0.9), 1, 0)"
| Aggregation | Use For | Example |
|-------------|---------|---------|
| SUM | Totals, counts | Total items processed across all runs |
| AVERAGE | Rates, percentages | Average success rate |
Use these predefined task categories for the task field:
| Category | Example Subtasks | |----------|------------------| | Research & Intelligence | competitive intelligence, market research, legal research | | Data Processing & Analysis | data extraction, statistical analysis, trend identification | | Content Development | blog writing, technical documentation, proposal writing | | Content Refinement | editing, proofreading, grammar correction | | Customer Experience | complaint resolution, ticket triage, FAQ development | | Software Development | code generation, code review, debugging | | Strategic Planning | roadmap development, scenario planning |
# CLI Commands
olakai login # Authenticate
olakai agents create --name "Name" # Create agent
olakai custom-data create --agent-id ID --name X --type NUMBER # Create custom field
olakai kpis create --formula "X" --agent-id ID # Create KPI
olakai activity list --agent-id ID # View events
# SDK Initialization (TypeScript)
const olakai = new OlakaiSDK({ apiKey: process.env.OLAKAI_API_KEY });
await olakai.init();
const openai = olakai.wrap(new OpenAI({ apiKey }), { provider: "openai" });
# SDK Initialization (Python)
olakai_config(os.getenv("OLAKAI_API_KEY"))
instrument_openai()
development
Show your Olakai developer Coding IQ status — monitoring health, personal spend, and budget. AUTO-INVOKE when user asks about: their Olakai monitoring health, personal AI spend, budget status, Coding IQ digest, whether their workspace is monitored, how much they've spent on AI this month, whether they're approaching their budget limit, or wants a quick overview of their Olakai coding status. TRIGGER KEYWORDS: olakai status, my spend, my budget, coding iq status, am I monitored, monitoring health, personal spend, budget limit, how much have I spent, olakai digest, coding status, my olakai, workspace monitored, check my olakai. DO NOT load for: setting up monitoring (use olakai-monitor-local-coding-agent), troubleshooting events or KPIs (use olakai-troubleshoot), generating analytics reports (use olakai-reports), or creating new agents (use olakai-new-project).
tools
Set up and self-heal Olakai monitoring for the coding tool you are using — Claude Code, OpenAI Codex CLI, Cursor, Google Gemini CLI, or Antigravity CLI. Installs hooks, creates the agent record, and explains how to enrich events with KPIs. This is the skill for "monitor my coding tool itself" (not for instrumenting your own agent's source code with the SDK — that is olakai-integrate). AUTO-INVOKE when user wants to: monitor Claude Code / Codex / Cursor / Gemini CLI / Antigravity CLI sessions, monitor THIS coding tool, add observability to a local coding agent, track my own coding-assistant usage, set up olakai monitoring in this workspace, see what is being monitored on this machine, check if monitoring is working, or enable / repair hooks-based monitoring for any local coding agent. TRIGGER KEYWORDS: olakai monitor, monitor my coding tool, monitor this tool, monitor claude code, monitor codex, monitor cursor, monitor gemini cli, monitor antigravity, codex cli, cursor hooks, gemini cli, gemini-cli hooks, antigravity cli, antigravity, agy, local coding agent, local agent monitoring, olakai hooks, olakai monitor init, olakai monitor list, olakai monitor doctor, olakai monitor repair, monitor workspace, track sessions, is my monitoring working, monitoring not working, no events from claude code, claude code monitoring, codex monitoring, cursor monitoring, agents mine, where am i monitoring. DO NOT load for: instrumenting your own agent's SDK code (use olakai-integrate), creating agents from scratch with custom code (use olakai-new-project), generic SDK / KPI / event troubleshooting unrelated to a coding tool (use olakai-troubleshoot).
tools
Diagnose and repair Olakai monitoring for a local coding tool you already set up — Claude Code, OpenAI Codex CLI, or Cursor. Drives `olakai monitor list`, `olakai monitor doctor [--fix]`, and `olakai monitor repair` to self-heal hooks-based monitoring (no events, missing KPIs, broken/deleted agent, drifted config). For first-time setup use olakai-monitor-local-coding-agent instead. AUTO-INVOKE when user says: my coding-tool monitoring isn't working, no events from Claude Code / Codex / Cursor, is monitoring on / working, check my olakai monitoring, what's monitored on this machine, monitor doctor, monitor repair, monitor list, fix my monitoring, my monitored agent disappeared / 404, hooks stopped firing, re-link my monitoring key. TRIGGER KEYWORDS: olakai monitor doctor, olakai monitor repair, olakai monitor list, monitor not working, no events claude code, no events codex, no events cursor, fix monitoring, repair monitoring, agent 404, agent missing, hooks stopped firing, drift, registry, agents mine, where am i monitoring, is my monitoring working, self-heal monitoring. DO NOT load for: first-time setup of a coding tool (use olakai-monitor-local-coding-agent), instrumenting your own agent's SDK code (use olakai-integrate), generic SDK / KPI / event troubleshooting unrelated to a coding tool (use olakai-troubleshoot).
tools
Diagnose and fix issues with events, KPIs, custom data, or SDK integration. AUTO-INVOKE when user mentions: events not appearing, KPIs showing wrong values, KPIs showing strings instead of numbers, custom data missing, null KPIs, authentication errors, CLI not working, events not associated with agent, monitoring broken, SDK errors, or any Olakai-related problem. TRIGGER KEYWORDS: olakai, troubleshoot, debug, not working, events missing, KPI wrong, KPI null, KPI string, customData missing, authentication failed, CLI error, no events, events not appearing, diagnose, fix olakai, broken, SDK error, monitoring issue, API key invalid, events not tracked. DO NOT load for: initial setup (use olakai-new-project or olakai-integrate), or generating reports (use olakai-reports).