Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 

Repository files navigation

OpenClaw + Linq: AI Agent on Your iPhone via iMessage

Turn your iPhone into an AI-powered assistant. Text it questions, send voice notes, trade on prediction markets — all through iMessage with real blue bubbles.

What you get: A personal AI agent that lives in your iMessage contacts. Ask it anything, send voice memos for transcription, or trade on Kalshi prediction markets — all from your phone.

https://github.com/user-attachments/assets/placeholder-loom-video


Prerequisites

Optional (for specific features):

  • Kalshi API credentials — for prediction market trading (kalshi.com)
  • OpenAI API key — for voice note transcription via Whisper (platform.openai.com)

Quick Start

1. Install OpenClaw

npm install -g openclaw

2. Initialize

openclaw init

This creates ~/.openclaw/ with a default config.

3. Set Up Environment Variables

Create ~/.openclaw/.env:

# Required
ANTHROPIC_API_KEY=sk-ant-api03-your-key-here

# Optional: Voice note transcription
OPENAI_API_KEY=sk-proj-your-key-here

# Optional: Kalshi prediction market trading
KALSHI_API_KEY_ID=your-kalshi-api-key-uuid
KALSHI_PRIVATE_KEY_PATH=/Users/yourname/.openclaw/kalshi_private_key.pem

4. Install the Linq Plugin

openclaw plugins install github:linq-team/openclaw-linq-plugin

5. Add Linq Channel (Interactive Wizard)

openclaw channels add --channel linq

The wizard will walk you through:

  • Entering your Linq API token (or using the LINQ_API_TOKEN env var)
  • Setting your Linq phone number
  • Configuring the webhook endpoint

Tip: You can also set LINQ_API_TOKEN in your .env file and the wizard will detect it automatically.

6. Install Kalshi Skill (Optional)

npx clawhub install kalshi-trading

7. Start

openclaw gateway run

You should see:

Gateway listening on http://localhost:3100
Health: OK, Linq: ok

8. Text Your Agent

Open iMessage on your iPhone and text the Linq phone number. You'll see real blue bubbles — it's native iMessage, not SMS.

Try:

  • "What's the weather in NYC?"
  • "Summarize the latest news about AI"
  • Send a voice memo: "What are the trending markets on Kalshi?"

Optional: Kalshi Prediction Market Trading

Trade on Kalshi directly through iMessage.

Setup

  1. Get API credentials from Kalshi:

    • Log in → Settings → API → Generate API Key
    • Download the private key PEM file
  2. Save your private key:

    mv ~/Downloads/kalshi_private_key.pem ~/.openclaw/kalshi_private_key.pem
    chmod 600 ~/.openclaw/kalshi_private_key.pem
  3. Add env vars to ~/.openclaw/.env:

    KALSHI_API_KEY_ID=your-api-key-uuid
    KALSHI_PRIVATE_KEY_PATH=/Users/yourname/.openclaw/kalshi_private_key.pem
  4. Verify:

    node ~/openclaw/skills/kalshi/scripts/kalshi-cli.mjs balance

Usage

Text your agent:

  • "What's trending on Kalshi?"
  • "Search Kalshi for bitcoin markets"
  • "Check my Kalshi portfolio"
  • "Buy 10 YES contracts on KXGREENLAND-29 at 31 cents" (it will confirm before executing)

The agent always confirms before placing any trade.


Optional: Voice Note Transcription

Send voice memos via iMessage and the agent will transcribe and act on them.

Setup

  1. Get an OpenAI API key from platform.openai.com

  2. Add to ~/.openclaw/.env:

    OPENAI_API_KEY=sk-proj-your-key-here
  3. Add to ~/.openclaw/openclaw.json:

    {
      "tools": {
        "media": {
          "audio": {
            "enabled": true,
            "models": [{ "provider": "openai" }]
          }
        }
      }
    }
  4. Restart the gateway and send a voice note via iMessage.


Full Config Reference

Here's a complete ~/.openclaw/openclaw.json with all features enabled:

{
  "agents": {
    "defaults": {
      "model": {
        "primary": "anthropic/claude-sonnet-4-5-20250929"
      },
      "workspace": "~/.openclaw/workspace"
    }
  },
  "channels": {
    "linq": {
      "enabled": true,
      "apiToken": "your-linq-api-token",
      "fromPhone": "+1XXXXXXXXXX",
      "webhookUrl": "http://localhost:3100/linq-webhook",
      "webhookPath": "/linq-webhook",
      "webhookHost": "0.0.0.0",
      "dmPolicy": "open"
    }
  },
  "tools": {
    "media": {
      "audio": {
        "enabled": true,
        "models": [{ "provider": "openai" }]
      }
    }
  },
  "gateway": {
    "mode": "local",
    "bind": "loopback",
    "auth": {
      "mode": "token",
      "token": "generate-a-random-uuid"
    }
  },
  "plugins": {
    "entries": {
      "linq": {
        "enabled": true
      }
    }
  }
}

Troubleshooting

Gateway won't start — "token not configured"

  • Add gateway.auth.token to your openclaw.json (any UUID works)

Agent doesn't respond to iMessages

  • Check npx openclaw gateway status — Linq should show "ok"
  • Verify your LINQ_API_TOKEN is correct
  • Make sure webhookUrl matches where the gateway is listening

Voice notes aren't transcribed

  • Verify OPENAI_API_KEY is set in .env
  • Check tools.media.audio.enabled is true in config

Kalshi commands don't work

  • Run node skills/kalshi/scripts/kalshi-cli.mjs balance to test directly
  • Verify both KALSHI_API_KEY_ID and KALSHI_PRIVATE_KEY_PATH are set
  • Check that the PEM file exists and is readable

Architecture

iPhone (iMessage)
    │
    ▼
Linq API (cloud relay)
    │
    ▼ webhook
OpenClaw Gateway (localhost:3100)
    │
    ├─► Claude (Anthropic API) — reasoning
    ├─► Whisper (OpenAI API) — voice transcription
    ├─► Kalshi CLI — prediction market trading
    └─► Other skills (weather, GitHub, etc.)
    │
    ▼ REST
Linq API → iMessage → iPhone

No Mac Mini. No Apple ID. No SSH. Just an API key and a phone number.


Links

About

Setup guide for OpenClaw + Linq — real iMessage AI agent on your iPhone

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors