home / skills / openclaw / skills / kallyai

kallyai skill

/skills/sltelitsyn/kallyai

This skill helps you place calls to businesses using the KallyAI API to make reservations, appointments, or inquiries.

npx playbooks add skill openclaw/skills --skill kallyai

Review the files below or copy the command above to add this skill to your agents.

Files (2)
SKILL.md
5.2 KB
---
name: kallyai
description: Make phone calls via KallyAI API - an AI phone assistant that calls businesses on your behalf. Use when users want to make restaurant reservations, schedule appointments, or inquire at businesses by phone.
metadata: {"clawdbot":{"emoji":"📞","requires":{"bins":["kallyai"]},"install":[{"id":"pip","kind":"pip","package":"kallyai-cli","bins":["kallyai"],"label":"Install via pip"}]}}
---

# KallyAI API Integration

KallyAI is an AI phone assistant that makes calls to businesses on behalf of users.

## Complete Workflow

When a user asks to make a call:

### Step 1: Gather Call Details

Collect from user:
- **Phone number** to call (required)
- **What to accomplish** - the task description (required)
- **Category**: restaurant, clinic, hotel, or general (required)
- For reservations: name, date, time, party size

### Step 2: Authenticate User

Use the CLI OAuth flow:
```
https://api.kallyai.com/v1/auth/cli?redirect_uri=http://localhost:8976/callback
```

This opens a login page. After authentication, the user is redirected to the localhost callback with tokens:
```
http://localhost:8976/callback?access_token=<token>&refresh_token=<refresh>&expires_in=3600
```

Start a local HTTP server to capture the callback and extract the tokens.

### Step 3: Make the Call

Once authenticated, call the API:

```
POST https://api.kallyai.com/v1/calls
Authorization: Bearer <access_token>
Content-Type: application/json

{
  "submission": {
    "task_category": "general",
    "task_description": "Ask about store hours and availability",
    "respondent_phone": "+15551234567",
    "language": "en",
    "call_language": "en"
  },
  "timezone": "America/New_York"
}
```

### Step 4: Report Results

Response contains:
```json
{
  "call_id": "uuid",
  "status": "success",
  "highlights": "They have iPhone 15 for €800, good condition",
  "next_steps": "Call back to arrange pickup"
}
```

**Status values:** `success`, `no_answer`, `busy`, `failed`, `voicemail`, `cancelled`

---

## CLI Commands Reference

### Making Calls

```bash
kallyai -p "+15551234567" -t "Reserve a table for 4 at 8pm" \
  --category restaurant \
  --name "John Smith" \
  --party-size 4 \
  --date "2026-01-28" \
  --time "20:00"
```

| Option | Short | Description |
|--------|-------|-------------|
| `--phone` | `-p` | Phone number (E.164 format) |
| `--task` | `-t` | What the AI should accomplish |
| `--category` | `-c` | restaurant, clinic, hotel, general |
| `--language` | `-l` | en or es |
| `--name` | | Your name (for reservations) |
| `--business` | | Business name |
| `--party-size` | | Party size (restaurants) |
| `--date` | | YYYY-MM-DD |
| `--time` | | HH:MM (24-hour) |

### Account & Usage

```bash
kallyai --usage        # Show minutes/calls remaining
kallyai --subscription # Show subscription status
kallyai --billing      # Open Stripe billing portal
```

### Call History

```bash
kallyai --history              # List recent calls
kallyai --call-info <ID>       # Get call details
kallyai --transcript <ID>      # Get conversation transcript
```

### Authentication

```bash
kallyai --login      # Force re-authentication
kallyai --logout     # Clear saved credentials
kallyai --auth-status # Check if logged in
```

---

## Quick Reference

**Base URL:** `https://api.kallyai.com`

**CLI OAuth URL:** `https://api.kallyai.com/v1/auth/cli?redirect_uri=http://localhost:8976/callback`

**Required fields for calls:**
| Field | Description |
|-------|-------------|
| `task_category` | `restaurant`, `clinic`, `hotel`, `general` |
| `task_description` | What AI should accomplish |
| `respondent_phone` | Phone number in E.164 format (+1234567890) |

**Optional fields:**
| Field | Description |
|-------|-------------|
| `business_name` | Name of business |
| `user_name` | Name for reservation |
| `appointment_date` | YYYY-MM-DD |
| `appointment_time` | HH:MM (24-hour) |
| `party_size` | Number of people (1-50) |
| `language` | `en` or `es` |
| `call_language` | `en` or `es` |

## Example Requests

**Restaurant reservation:**
```json
{
  "submission": {
    "task_category": "restaurant",
    "task_description": "Reserve table for 4 at 8pm",
    "respondent_phone": "+14155551234",
    "business_name": "Italian Bistro",
    "user_name": "John Smith",
    "party_size": 4,
    "appointment_date": "2026-01-28",
    "appointment_time": "20:00"
  },
  "timezone": "America/New_York"
}
```

**Medical appointment:**
```json
{
  "submission": {
    "task_category": "clinic",
    "task_description": "Schedule dental checkup",
    "respondent_phone": "+14155551234",
    "user_name": "Jane Doe",
    "time_preference_text": "morning before 11am"
  },
  "timezone": "America/New_York"
}
```

## Common Errors

| Code | HTTP | Action |
|------|------|--------|
| `quota_exceeded` | 402 | User needs to upgrade at kallyai.com/pricing |
| `missing_phone_number` | 422 | Ask user for phone number |
| `emergency_number` | 422 | Cannot call 911/emergency services |
| `country_restriction` | 403 | Country not supported |

## Security

- **Token storage**: `~/.kallyai_token.json` with 0600 permissions
- **CSRF protection**: State parameter validation
- **Localhost only**: OAuth redirects only to localhost/127.0.0.1
- **Auto-refresh**: Tokens refresh automatically when expired

Overview

This skill makes phone calls through the KallyAI API using an AI phone assistant that calls businesses on your behalf. It handles reservations, appointment scheduling, and business inquiries with a CLI-driven OAuth flow and simple JSON-based call submissions. Use it to automate routine phone tasks and get structured results and transcripts.

How this skill works

Collect required call details (phone number, task description, and category) from the user, then run a CLI OAuth flow that opens a login page and captures tokens via a localhost callback. Submit a call request to the /v1/calls endpoint with the submission payload (task_category, task_description, respondent_phone, optional reservation/appointment fields, and timezone). The API returns call status, highlights, next steps, and a call_id for fetching transcripts and details.

When to use it

  • Reserve a restaurant table or modify an existing booking
  • Schedule or reschedule medical or service appointments
  • Call businesses to ask about hours, availability, pricing, or product details
  • Delegate phone follow-ups, callbacks, or pickup arrangements
  • When you need a transcript or structured highlights from a business call

Best practices

  • Always collect E.164 formatted phone numbers (+1234567890) to avoid errors
  • Specify task_category (restaurant, clinic, hotel, general) and clear task_description
  • For reservations include user_name, party_size, date, and time to improve success
  • Use the CLI OAuth flow on a machine where a localhost callback server can run
  • Check call status and transcripts with call_id to confirm results and next steps

Example use cases

  • Reserve a table for 4 at 8pm at a named restaurant and get confirmation highlights
  • Call a dental clinic to schedule a checkup, preferring mornings before 11am
  • Ask a store about stock and price of a specific product and receive a pickup suggestion
  • Check subscription usage, billing status, or view recent call history via CLI flags
  • Run a callback to retrieve a transcript and extract action items after a busy line

FAQ

How does authentication work?

The CLI OAuth flow opens a browser to login and redirects to a localhost callback where tokens are captured and stored securely (0600 permissions).

What status values can a call return?

Status can be success, no_answer, busy, failed, voicemail, or cancelled; use call_id to fetch details and transcripts.

What should I do if the API returns quota_exceeded?

quota_exceeded maps to a billing issue; upgrade or check subscription at the provider's pricing portal.