OpenClaw
This guide shows how to integrate the AgentDuet SDK with OpenClaw so an after-hours phone agent can take a voicemail and notify Slack through OpenClaw’s message CLI.
Sample: after-hours voicemail → OpenClaw → Slack.
- Business hours: pre-answer
connect(), thenclose()— caller rings the human line; OpenClaw is idle - After hours: AI answers, takes a message, saves it locally, and notifies Slack through OpenClaw
The sample runs openclaw message send after Gemini calls leave_voicemail.
What this integration provides
- AgentDuet answers (or pass-through connects) inbound calls
- Gemini Live runs the after-hours voicemail dialogue
- OpenClaw delivers Slack with the same CLI you already use in chat (
message send)
How the pieces fit
Prerequisites
- Python 3.12+
- AgentDuet API key and connector UUID from agentduet.com
- Gemini API key
- OpenClaw running locally, with Slack connected (see below)
Set up OpenClaw
Install and onboard OpenClaw from their docs:
When that is done:
openclawonPATHon the machine that runs this sample- Gateway running (
openclaw gateway status) - Slack connected, bot invited to the notify channel
- A working send (same shell as
python main.py):
channel:C0123456789 is OpenClaw’s Slack target format: the prefix channel: plus the Slack channel ID (IDs start with C). In Slack, open the channel → View channel details → copy the ID at the bottom, or copy the channel link and take the C… segment. #channel-name also works if OpenClaw can resolve the name. See message CLI.
If this command fails, fix OpenClaw before starting AgentDuet.
Step 1: Clone the sample
Layout:
Step 2: Install dependencies
The sample pins agentduet==1.0.0.
Step 3: Configure .env
FORCE_AFTER_HOURS=1 makes every inbound call use the after-hours path (Riley + Slack), even if the wall clock is inside weekday 09:00–17:00 UTC. Omit it when you want real business-hours pass-through to the human line.
Optional:
Step 4: Run
Call your AgentDuet number. Leave a short message. Confirm Slack receives an After-hours voicemail post delivered by OpenClaw.
How AgentDuet and OpenClaw connect
-
Gemini Live calls the local
leave_voicemailtool frommain.py. -
The handler appends
voicemails/messages.jsonl, then runs: -
Slack delivery uses OpenClaw’s configured Slack bot.
