Agent Takeover for Openclaw

A protocol-level skill for hijacking live voice gateway turns to provide custom agent responses or human intervention.

tracsystems
v0.1.4
Feb 25, 2026
0
397
1

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install agent-takeover

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install agent-takeover using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Agent Takeover?

The Agent Takeover skill enables an external entity—such as a custom script or a WebSocket client—to intercept a live voice session on the Clawfinger gateway. By leveraging Openclaw Skills, developers can bypass the default local LLM to provide custom responses, inject specific greetings, and maintain full bidirectional control over the telephony lifecycle.

This functionality is critical for building hybrid AI systems where specific conversation turns require external logic, human-in-the-loop oversight, or specialized third-party API integrations. It allows the agent to act as the primary brain of the call while still utilizing the gateway's core ASR and TTS capabilities.

Agent Takeover Use Cases

  • Implementing human-in-the-loop transitions for sensitive AI voice conversations.
  • Injecting dynamic, pre-synthesized greetings or legal disclaimers into active calls.
  • Creating specialized automated agents that use external logic or proprietary APIs instead of a standard LLM.
  • Testing and debugging voice gateway performance through manual turn handling and observation.

How Agent Takeover Works

  1. Establish a persistent WebSocket connection to the gateway to monitor real-time bus events.
  2. Initiate an outbound call via ADB or monitor the event stream for a new session ID when a call is connected.
  3. Send a takeover command to the gateway, which flags the session to redirect future turn processing to the agent.
  4. Receive turn.request messages containing the caller's transcript and a unique request ID whenever the user speaks.
  5. Process the input and send a reply message back to the gateway, ensuring the request ID is echoed to correlate the response.
  6. Hand control back to the local LLM at any time by sending a release command to the gateway.

Agent Takeover Setup

To begin using this skill within the Openclaw Skills ecosystem, ensure your gateway is running and your device is connected via ADB.

# Establish ADB reverse port forwarding to the gateway
adb reverse tcp:8996 tcp:8996

# Install the necessary Python dependencies for custom agent scripts
pip install websockets

# Run your takeover script or connect via the Clawfinger plugin
python3 test_takeover.py

Agent Takeover Data Schema & Taxonomy

The skill utilizes a structured JSON protocol over WebSockets for real-time interaction. Data is organized by event types and session identifiers.

Message Type Direction Key Fields
turn.request Gateway to Agent session_id, transcript, request_id
reply Agent to Gateway reply, request_id
dial Agent to Gateway number
takeover Agent to Gateway session_id
session.ended Gateway to Agent session_id

Agent Takeover Advanced Features

  • Full bidirectional WebSocket control for sub-second turn latency and event observation.
  • Knowledge injection via context pushing to enhance local LLM performance before or after a takeover.
  • Automated fallback to local LLM if the external agent fails to respond within the configurable timeout period.
  • Multi-agent support where the latest takeover command gains priority control of the active session.
  • Seamless integration with the Clawfinger plugin for simplified tool-based management and slash command support.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*