new-project
What it does
This skill guides the creation of a new AI agent project that is connected to Olakai from the start. It is for builders who want analytics and governance in place before launch.
When to use it
- βWhen you start a new AI agent and want monitoring from day one.
- βWhen you want a guided setup for the Olakai SDK and CLI.
- βWhen you need to define KPIs that show how well an agent performs.
Skill link
https://github.com/andrewyng/context-hub/blob/main/content/olakai/skills/new-project/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βI want to start a new AI agent project with Olakai monitoring and define its KPIs.β
5 new skills a week. 1 minute to read.
How it works
The agent sets up the project, adds the Olakai SDK, creates a key for the agent, defines KPIs, and tests the result. It follows the steps in the skill in a fixed order.
Technical content (original SKILL.md)
Original text by the author, straight from 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,
FAQ
Do I need the CLI before starting?
Yes. The skill expects the Olakai CLI to be installed and you to be logged in.
What is a KPI in this skill?
A KPI is a business measure, such as items processed, success rate, or retry rate, that shows agent performance.
Can I reuse the same KPIs for another agent?
No. KPIs belong to one agent, so each new agent needs its own set.
Details
Original description by the author
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
Popularity
- GitHub stars
- 14k
- Ranking position
- #11274
- License
- MIT
- Updated
- 5/31/2026
Comments
- β¦
More skills from this repository
get-api-docs
14kHelps your agent fetch current documentation for third-party APIs and libraries before writing code, instead of relying on old memory.
bloc-cubit
14kTeaches your agent how to manage app state in Flutter with Bloc or Cubit, including when to pick each one and safe defaults for testing.
riverpod
14kTeaches your agent how to manage Flutter app state with Riverpod, covering providers, async data, and testing, with sensible defaults for each case.
document-extraction
14kHelps your agent read PDFs, images, and spreadsheets, turn them into clean text, and pull out fields like invoice totals using LandingAI's ADE service.
Similar skills
add-model-provider
394kLets your agent connect a new AI model provider to OpenClaw using safe setup commands, keep API keys out of plain text, and run a live test.
acp-router
394kHelps your agent send a task to a coding assistant such as Claude Code or Cursor through OpenClaw, so the work runs in that tool.
browser-automation
394kTeaches your agent to control web pages step by step, including logins, tabs, and recovery when a page stops responding.