alejandroOPI/clawdia-bridge

HTTP bridge between Vapi voice assistant (Claudia) and Clawdis AI

26

stars

0

commits

JavaScript

primary language

Jan 5, 2026

updated

README

Clawdia Bridge

HTTP bridge that connects Clawdia (Vapi voice assistant) to Clawdius (AI assistant running on Clawdis).

How It Works

You (phone call)
    ↓
Clawdia (Vapi voice AI)
    ↓ POST /ask (tool call)
Clawdia Bridge
    ↓ WebSocket to Gateway
Clawdius (processes request)
    ↓ returns response
Clawdia Bridge
    ↓ returns to Vapi
Clawdia
    ↓ speaks response
You

Quick Start

# Clone
git clone https://github.com/alejandroOPI/clawdia-bridge.git
cd clawdia-bridge

# Install dependencies
npm install

# Run
npm start

Environment Variables

VariableDefaultDescription
BRIDGE_PORT3847Port to listen on
GATEWAY_URLws://127.0.0.1:18789Clawdis Gateway WebSocket URL

API Endpoints

POST /ask

Clawdia calls this endpoint to ask Clawdius a question.

Vapi Tool Call Format:

{
  "message": {
    "toolCalls": [{
      "id": "tool-call-id",
      "function": {
        "name": "ask_clawdius",
        "arguments": "{\"question\": \"What time is it?\"}"
      }
    }]
  }
}

Response:

{
  "results": [{
    "toolCallId": "tool-call-id",
    "result": "It's 6pm Mexico City time."
  }]
}

Direct Call Format (for testing):

{
  "question": "What time is it?"
}

Response:

{
  "answer": "It's 6pm Mexico City time."
}

GET /health

Health check endpoint.

{
  "status": "ok",
  "mode": "gateway-ws"
}

Vapi Configuration

1. Create Assistant "Clawdia"

In the Vapi dashboard, create an assistant with:

  • Name: Clawdia
  • Voice: Female voice (e.g., Lily from Vapi)
  • Model: Claude or GPT
  • System Prompt:
Eres Clawdia, la asistente de voz de Alejandro. Eres amable, directa y eficiente.

REGLAS:
- Hablas español principalmente
- Se breve en tus respuestas - esto es una llamada telefónica
- Si necesitas información (calendario, emails, clima, etc), usa ask_clawdius
- Clawdius es otro asistente que tiene acceso a toda la información de Alejandro

2. Add Tool

Add this tool to the assistant:

{
  "type": "function",
  "function": {
    "name": "ask_clawdius",
    "description": "Pregunta a Clawdius por información o para ejecutar una acción.",
    "parameters": {
      "type": "object",
      "properties": {
        "question": {
          "type": "string",
          "description": "La pregunta o solicitud para Clawdius"
        }
      },
      "required": ["question"]
    }
  },
  "server": {
    "url": "https://your-server.com/ask"
  }
}

3. Assign Phone Number

Assign a Vapi phone number to the Clawdia assistant.

Exposing to Internet

npm start
tailscale funnel 3847

Your URL: https://your-machine.tailXXXX.ts.net/

ngrok

npm start
ngrok http 3847

Architecture

The bridge connects to the Clawdis Gateway via WebSocket and uses the agent method to process requests. This means:

  1. Questions go through the same pipeline as WhatsApp/Telegram messages
  2. Clawdius has access to all skills (calendar, email, weather, etc.)
  3. Responses are generated by the same AI that handles other channels

Why WebSocket?

  • Direct connection - No polling, no intermediate services
  • Full access - Same capabilities as other messaging channels
  • Fast - Sub-second latency for most responses

Testing

# Health check
curl http://localhost:3847/health

# Direct question
curl -X POST http://localhost:3847/ask \
  -H "Content-Type: application/json" \
  -d '{"question": "What time is it?"}'

License

MIT

alejandroOPI/clawdia-bridge

HTTP bridge between Vapi voice assistant (Claudia) and Clawdis AI

26

stars

0

commits

JavaScript

primary language

Jan 5, 2026

updated

README

Clawdia Bridge

HTTP bridge that connects Clawdia (Vapi voice assistant) to Clawdius (AI assistant running on Clawdis).

How It Works

You (phone call)
    ↓
Clawdia (Vapi voice AI)
    ↓ POST /ask (tool call)
Clawdia Bridge
    ↓ WebSocket to Gateway
Clawdius (processes request)
    ↓ returns response
Clawdia Bridge
    ↓ returns to Vapi
Clawdia
    ↓ speaks response
You

Quick Start

# Clone
git clone https://github.com/alejandroOPI/clawdia-bridge.git
cd clawdia-bridge

# Install dependencies
npm install

# Run
npm start

Environment Variables

VariableDefaultDescription
BRIDGE_PORT3847Port to listen on
GATEWAY_URLws://127.0.0.1:18789Clawdis Gateway WebSocket URL

API Endpoints

POST /ask

Clawdia calls this endpoint to ask Clawdius a question.

Vapi Tool Call Format:

{
  "message": {
    "toolCalls": [{
      "id": "tool-call-id",
      "function": {
        "name": "ask_clawdius",
        "arguments": "{\"question\": \"What time is it?\"}"
      }
    }]
  }
}

Response:

{
  "results": [{
    "toolCallId": "tool-call-id",
    "result": "It's 6pm Mexico City time."
  }]
}

Direct Call Format (for testing):

{
  "question": "What time is it?"
}

Response:

{
  "answer": "It's 6pm Mexico City time."
}

GET /health

Health check endpoint.

{
  "status": "ok",
  "mode": "gateway-ws"
}

Vapi Configuration

1. Create Assistant "Clawdia"

In the Vapi dashboard, create an assistant with:

  • Name: Clawdia
  • Voice: Female voice (e.g., Lily from Vapi)
  • Model: Claude or GPT
  • System Prompt:
Eres Clawdia, la asistente de voz de Alejandro. Eres amable, directa y eficiente.

REGLAS:
- Hablas español principalmente
- Se breve en tus respuestas - esto es una llamada telefónica
- Si necesitas información (calendario, emails, clima, etc), usa ask_clawdius
- Clawdius es otro asistente que tiene acceso a toda la información de Alejandro

2. Add Tool

Add this tool to the assistant:

{
  "type": "function",
  "function": {
    "name": "ask_clawdius",
    "description": "Pregunta a Clawdius por información o para ejecutar una acción.",
    "parameters": {
      "type": "object",
      "properties": {
        "question": {
          "type": "string",
          "description": "La pregunta o solicitud para Clawdius"
        }
      },
      "required": ["question"]
    }
  },
  "server": {
    "url": "https://your-server.com/ask"
  }
}

3. Assign Phone Number

Assign a Vapi phone number to the Clawdia assistant.

Exposing to Internet

npm start
tailscale funnel 3847

Your URL: https://your-machine.tailXXXX.ts.net/

ngrok

npm start
ngrok http 3847

Architecture

The bridge connects to the Clawdis Gateway via WebSocket and uses the agent method to process requests. This means:

  1. Questions go through the same pipeline as WhatsApp/Telegram messages
  2. Clawdius has access to all skills (calendar, email, weather, etc.)
  3. Responses are generated by the same AI that handles other channels

Why WebSocket?

  • Direct connection - No polling, no intermediate services
  • Full access - Same capabilities as other messaging channels
  • Fast - Sub-second latency for most responses

Testing

# Health check
curl http://localhost:3847/health

# Direct question
curl -X POST http://localhost:3847/ask \
  -H "Content-Type: application/json" \
  -d '{"question": "What time is it?"}'

License

MIT

Languages

JavaScript

100.0%