New Project
Build a new AI agent with Olakai monitoring from scratch, project setup, SDK...
Install
npx skills add andrewyng/context-hub --skill new-project -g -a claude-code -y- Repository
- andrewyng/context-hub14k
- Category
- AI and agents
- Updated
- 5mo ago
- License
- MIT
- Context cost
- Mediumabout 3,000 tokens
- Runs scripts
- No, instructions only
What it does
Build a new AI agent with Olakai monitoring from scratch, project setup, SDK integration, KPI configuration, and end-to-end validation
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

