Get started with Olakai - install, authenticate, and set up your first agent. AUTO-INVOKE when: CLI is not installed, user is not authenticated, user asks about getting started with Olakai, user wants to try Olakai, user mentions they don’t have an account yet, or when other skills fail due to missi
npx playbooks add skill olakai-ai/olakai-skills --skill olakai-get-started
This skill helps you get set up with Olakai from scratch - from creating an account to generating your first monitored event.
> IMPORTANT: For account creation, prefer the in-terminal API flow (Step 1) which calls POST /api/auth/signup directly.
> If the user prefers a browser-based flow, use the full developer signup URL with PLG parameters:
> https://app.olakai.ai/signup?flow=developer&source=claude-code
> NEVER shorten this to https://app.olakai.ai/signup — the query parameters are required for the developer onboarding flow.
> Two ways to connect an assistant to Olakai. This skill sets up the CLI (install, authenticate, first monitored event) — the path for scripting, SDK integration, and machine-local coding-tool monitoring. If instead you just want an AI assistant (Claude Desktop, claude.ai, Claude Code, ChatGPT, Codex, Cursor) to read and analyze your account in natural language, connect the Olakai MCP connector instead — no CLI install required: https://app.olakai.ai/docs/olakai/olakai-mcp-connect. The two are complementary; machine-local monitoring (olakai monitor …) is always CLI-only.
Before proceeding, let's check your current setup status.
Run these diagnostic commands to determine where to start:
# Check 1: Is CLI installed?
which olakai || echo "CLI_NOT_INSTALLED"
# Check 2: Is user authenticated?
olakai whoami 2>/dev/null || echo "NOT_AUTHENTICATED"
# Check 3: Are there any agents?
olakai agents list --json 2>/dev/null | head -5 || echo "NO_AGENTS_OR_NOT_AUTH"
Based on results, jump to the appropriate section:
| Result | Jump To |
|--------|---------|
| CLI_NOT_INSTALLED | [Step 1: Create Account](#step-1-create-an-olakai-account) |
| NOT_AUTHENTICATED | [Step 2: Install CLI](#step-2-install-the-cli) if CLI missing, else [Step 3: Authenticate](#step-3-authenticate) |
| Empty agents list | [Step 4: Register Your Agent](#step-4-register-your-agent-in-olakai). Use "register" language (not "create your first agent") when presenting next steps. |
| Agents exist | You're all set! Use /olakai-new-project or /olakai-integrate instead |
---
If you don't have an Olakai account yet, create one directly from the terminal.
Ask the user for:
Use the Bash tool to call the signup endpoint. Replace the placeholder values with what the user provided:
curl -s -X POST https://app.olakai.ai/api/auth/signup \
-H "Content-Type: application/json" \
-d '{
"email": "USER_EMAIL",
"companyName": "USER_COMPANY",
"firstName": "USER_FIRST_NAME",
"lastName": "USER_LAST_NAME",
"source": "claude-code",
"medium": "skill"
}'
Expected response:
{ "success": true, "message": "Check your email to verify your account.", "requiresVerification": true }
Tell the user:
If the API call fails (network issues, corporate firewall, etc.), direct the user to the browser-based signup:
https://app.olakai.ai/signup?flow=developer&source=claude-code
> IMPORTANT: Always include the ?flow=developer&source=claude-code query parameters — they activate the developer onboarding flow.
After verifying your email, you'll have access to the dashboard where you can see your agents and events.
---
The Olakai CLI is the primary tool for configuring agents, KPIs, and custom data.
There are two ways to install it:
| Option | Version | Needs Node.js | Status |
|--------|---------|---------------|--------|
| npm (default) | 0.15.1 | Yes, Node.js 20+ | Stable |
| Standalone binary | 1.0.0-beta.4 | No | Beta |
Use npm when Node.js 20+ is available. Offer the standalone beta only when Node.js is not available, or when the user says they cannot install it.
Each check prints the Node.js major version (for example 20), or NODE_NOT_INSTALLED.
macOS / Linux (bash, zsh, sh):
node -p "process.versions.node.split('.')[0]" 2>/dev/null || echo "NODE_NOT_INSTALLED"
Windows (PowerShell):
if (Get-Command node -ErrorAction SilentlyContinue) { node -p "process.versions.node.split('.')[0]" } else { "NODE_NOT_INSTALLED" }
| Result | Next step |
|--------|-----------|
| 20 or higher | [2.2 Install via npm](#22-install-via-npm-default-stable) |
| Lower than 20 | Ask the user to upgrade Node.js. If they cannot, offer [2.3 Standalone binary (beta)](#23-standalone-binary-beta-no-nodejs-required) |
| NODE_NOT_INSTALLED | Ask the user if they can install Node.js 20+. If they cannot, offer [2.3 Standalone binary (beta)](#23-standalone-binary-beta-no-nodejs-required) |
Ask the user before you run it. Run it only after they say yes.
npm install -g olakai-cli
This installs olakai-cli 0.15.1, the stable CLI. It requires Node.js 20+.
> This is a beta. Ask the user to confirm they want the beta before you install it. Do not run the install script or any package manager command until they say yes. Do not call it stable or production-ready. Version 1.0.0-beta.4 is a single native binary. It is the same olakai command, with every command and flag of the npm CLI and the same config files. A compatibility suite of 142 recorded cases from the TypeScript CLI runs in CI against the beta binary, and all pass. It adds monitor install-hooks and olakai update, and its admin monitor bulk-provision writes home-folder key files instead of the npm per-repo bundle. See /olakai-monitor-local-coding-agent.
Ask the user which method they want: the install script, Homebrew, or Scoop. Show only the methods for their OS. Do not choose one for them.
macOS or Linux, install script (beta):
curl -fsSL https://get.olakai.ai/cli | sh -s -- --beta
--beta flag is required. Without it, the script stops with "no stable olakai release yet".~/.local/bin/olakai. Add --global to install to /usr/local/bin (asks for sudo).--global from an agent session; it prompts for sudo. Let the user run it.~/.local/bin to PATH. Ask before you edit their shell profile. Never edit it silently.macOS or Linux, Homebrew (beta):
brew install olakai-ai/tap/olakai-beta
Windows, Scoop (beta):
scoop bucket add olakai https://github.com/olakai-ai/scoop-bucket
scoop install olakai/olakai-beta
npm @next (beta, needs Node.js 20+): npm publishes the same beta as olakai-cli@next. The same beta-confirm rule applies. Offer it only when the user asks for the beta through npm.
npm install -g olakai-cli@next
Supported targets for the beta: macOS (Apple silicon and Intel), Linux (x86_64 and arm64), and Windows (x86_64).
Updating the beta: ask the user before you run any update. On 1.0.0-beta.3 and later, olakai update finds how the binary was installed. For an install-script binary it downloads the new version and replaces itself. For Homebrew (and npm @next) it asks, then runs the package manager command. On Windows (Scoop, winget, npm) it only prints the command, because a running olakai.exe cannot be replaced. Older betas only print the command. The npm CLI (0.x) has no update command. npm users update with npm install -g olakai-cli. The manual update commands are:
curl -fsSL https://get.olakai.ai/cli | sh -s -- --beta
brew upgrade olakai-betascoop update olakai-beta@next: npm install -g olakai-cli@nextThe "update available" notice compares against the latest stable version. It does not tell beta users about a newer beta.
Do not keep two copies. If the npm CLI is also installed, ask the user to remove the npm copy with npm uninstall -g olakai-cli after the standalone beta is installed. Run it only after they confirm. Otherwise there are two olakai on PATH, and agent hooks may run either one. You do not need to log in again or re-run olakai monitor init, because both copies use the same config files and hook entries.
Going back to stable: ask the user to confirm first. Then run npm install -g olakai-cli (stable 0.15.1), and remove the standalone beta copy with brew uninstall olakai-beta, scoop uninstall olakai-beta, or delete the binary the install script placed (~/.local/bin/olakai, or /usr/local/bin/olakai if installed with --global).
olakai --version
# Prints a version number. Any output means the CLI is installed.
These fixes install software or change the user's npm config and shell profile. Show them to the user and ask before you run any of them.
Permission errors on macOS/Linux:
# Option 1: Use sudo (not recommended)
sudo npm install -g olakai-cli
# Option 2: Fix npm permissions (recommended)
mkdir -p ~/.npm-global
npm config set prefix '~/.npm-global'
echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc
source ~/.bashrc
npm install -g olakai-cli
Windows:
# Run PowerShell as Administrator
npm install -g olakai-cli
---
Connect the CLI to your Olakai account.
olakai login
This opens your browser for secure authentication. After logging in:
olakai whoami
Expected output:
Logged in as: your.email@example.com
Account: Your Organization
"Not authenticated" errors:
# Clear cached credentials and re-login
olakai logout
olakai login
Browser doesn't open:
# The CLI will display a URL - copy and paste it manually
olakai login
# Look for: "Open this URL in your browser: https://app.olakai.ai/..."
Corporate proxy/firewall issues:
app.olakai.ai is accessible---
This step registers your AI agent (or any AI-powered feature) in Olakai so it can be monitored. This doesn't build any code — it creates a tracking record where Olakai collects analytics, KPIs, and governance data.
# Create agent with an API key for SDK integration
olakai agents create \
--name "My First Agent" \
--description "Testing Olakai integration" \
--with-api-key \
--json
Save the output! apiKey.key is the key you need for SDK integration. The CLI shows it only once. Add | jq -r '.apiKey.key' to print only the key.
{
"id": "cmkbteqn501kyjy4yu6p6xrrx",
"name": "My First Agent",
"apiKey": {
"id": "...",
"key": "3f9c1e2a-7b4d-4c8e-9a1f-2d6b8e0c4a57",
"keyMasked": "...",
"isActive": true
}
}
# Add to your shell profile (.bashrc, .zshrc, etc.)
export OLAKAI_API_KEY="3f9c1e2a-7b4d-4c8e-9a1f-2d6b8e0c4a57"
Or add to your project's .env file:
OLAKAI_API_KEY=3f9c1e2a-7b4d-4c8e-9a1f-2d6b8e0c4a57
The CLI cannot show the full key again. olakai agents get AGENT_ID --json returns only apiKey.keyMasked. Copy the key from the agent's card under Global Settings > Configuration & Controls > Agents in the web UI (admin access; otherwise ask an admin) (click Generate if it has none), then update OLAKAI_API_KEY.
---
Choose based on your project's language.
npm install @olakai/sdk
Quick Integration:
import { OlakaiSDK } from "@olakai/sdk";
import OpenAI from "openai";
// Initialize Olakai
const olakai = new OlakaiSDK({
apiKey: process.env.OLAKAI_API_KEY!
});
await olakai.init();
// Wrap your OpenAI client
const openai = olakai.wrap(
new OpenAI({ apiKey: process.env.OPENAI_API_KEY }),
{ provider: "openai" }
);
// Use as normal - events are automatically tracked
const response = await openai.chat.completions.create({
model: "gpt-4",
messages: [{ role: "user", content: "Hello!" }]
});
pip install olakai-sdk
Quick Integration:
import os
from openai import OpenAI
from olakaisdk import olakai_config, instrument_openai
# Initialize Olakai
olakai_config(os.getenv("OLAKAI_API_KEY"))
instrument_openai()
# Use OpenAI as normal - events are automatically tracked
client = OpenAI()
response = client.chat.completions.create(
model="gpt-4",
messages=[{"role": "user", "content": "Hello!"}]
)
---
Let's verify everything is working.
Execute the code from Step 5. This should:
# List recent events (replace with your agent ID)
olakai activity list --limit 1 --json
# Get full event details
olakai activity get EVENT_ID --json | jq '{prompt, response, tokens, model}'
Expected output:
{
"prompt": "Hello!",
"response": "Hello! How can I assist you today?",
"tokens": 25,
"model": "gpt-4"
}
Open https://app.olakai.ai and navigate to your agent's activity view. You should see the event appear within seconds.
---
You're now set up! Here's what to explore next:
Track business-specific metrics:
// TypeScript
const response = await openai.chat.completions.create(
{ model: "gpt-4", messages },
{
customData: {
feature: "customer-support",
ticketId: "TICKET-123",
priority: 1
}
}
);
# Python
from olakaisdk import olakai_context
with olakai_context(customData={"feature": "customer-support", "ticketId": "TICKET-123"}):
response = client.chat.completions.create(...)
Define metrics that aggregate your custom data:
# First, create the custom data config for your agent
olakai custom-data create --agent-id YOUR_AGENT_ID --name "Priority" --type NUMBER
# Then create a KPI
olakai kpis create \
--name "High Priority Events" \
--agent-id YOUR_AGENT_ID \
--calculator-id formula \
--formula "IF(Priority == 1, 1, 0)" \
--scope PROMPT_REQUEST \
--aggregation SUM
> Note: Both KPIs and CustomDataConfigs are created per-agent (custom-data create requires --agent-id). If you later create additional agents, you'll need to create the custom data configs and the KPIs again for each one. Neither can be shared across agents. Config names are unique per account today, so a second agent needs a different field name (for example ItemsProcessed_B), and its KPI formulas must use that name.
/olakai-new-project - Detailed guide for building agents with full observability/olakai-integrate - Add monitoring to existing AI code/olakai-troubleshoot - Debug issues with events or KPIs---
| Problem | Solution |
|---------|----------|
| command not found: olakai | Ask the user, then reinstall the CLI: npm install -g olakai-cli. No Node.js 20+? Offer the [standalone beta](#23-standalone-binary-beta-no-nodejs-required) |
| Two olakai on PATH (which -a olakai or where.exe olakai lists copies in different directories; the standalone beta's olakai monitor doctor also warns) | Ask the user which copy to keep. Remove the other copy only after they confirm: npm uninstall -g olakai-cli, or remove the standalone beta copy. See [2.3](#23-standalone-binary-beta-no-nodejs-required) |
| Not authenticated | Run olakai login |
| Network error | Check internet connection, try again |
| Problem | Solution |
|---------|----------|
| Invalid API key | Verify OLAKAI_API_KEY env var is set correctly |
| Events not appearing | Check API key matches agent, verify network access |
| Import errors | Ensure SDK is installed: npm install @olakai/sdk or pip install olakai-sdk |
| Problem | Solution |
|---------|----------|
| Browser doesn't open | Copy URL from terminal manually |
| Login succeeds but CLI says not authenticated | Try olakai logout then olakai login again |
| Corporate SSO issues | Contact your IT admin about OAuth access |
---
# Check status
which olakai # CLI installed?
olakai whoami # Authenticated?
olakai agents list # Agents exist?
# Setup commands (ask the user before you run any install command)
npm install -g olakai-cli # Install CLI (stable, needs Node.js 20+)
# No Node.js? Standalone binary (beta), see Step 2.3
olakai login # Authenticate
olakai agents create --name "Name" --with-api-key --json # Register agent
# SDK installation
npm install @olakai/sdk # TypeScript
pip install olakai-sdk # Python
# Verify events
olakai activity list --limit 1 --json
olakai activity get EVENT_ID --json
---
npm install -g olakai-cli, or the standalone beta from Step 2.3)olakai login)OLAKAI_API_KEY environment variable set@olakai/sdk or olakai-sdk)Once all boxes are checked, you're ready to build production AI agents with full observability!
Weekly roundup of top Claude Code skills, MCP servers, and AI coding tips.