---
name: pipbit
description: Talk with the person through their Pipbit, a small voice device with no screen. Use this skill to install the Pipbit connector, pair with the person's Pipbit by a spoken code, listen for what they say to you through it, answer in your own voice, and keep listening when no conversation with you is open.
---

# Pipbit

Pipbit is a small voice device the person carries. Pip, the device's own
assistant, hands them over to you when they say your name, and everything
you reply is read aloud in your voice. Nothing else reaches them.

This skill's script, `pipbit_connect.py`, is the connector. It is one
file of standard-library Python (3.9 or newer), it installs nothing, and
it holds no keys. It registers itself with the person's Pipbit by a
one-time spoken code, the way a TV signs in to a streaming service, and
keeps the credential it makes in its own state file under
`~/.pipbit_connect/`. You never read, print or paste that file.

Paths in this file assume the skill lives at `~/workspace/skills/pipbit/`.
If it lives elsewhere, adjust them. Every command below is

```
python3 ~/workspace/skills/pipbit/pipbit_connect.py <command>
```

and is written here as just `pipbit <command>`.

## Install

1. Save this file as `~/workspace/skills/pipbit/SKILL.md`.
2. Fetch `https://developer.pipbit.ai/skills/pipbit/pipbit_connect.py` and
   save it, unchanged, as `~/workspace/skills/pipbit/pipbit_connect.py`.
   Never edit it; to update it, fetch it again from the same address.
   After fetching it again, the next `pipbit daemon --ensure` (or the next
   `pipbit next`) notices the running connector came from the old copy and
   replaces it with the new one on its own; you need not stop anything.
   `pipbit diag` prints the version in its first line.
3. Run `pipbit diag`. It needs no credentials and prints one line per
   stage of the network path to Pipbit; the last line says whether every
   stage passed. At the HTTPS stage a 401 from the platform is the
   expected good answer.

Your first contact with `api.pipbit.ai` may ask the person to allow this
site. "Always allow" covers pipbit.ai and everything after it, so tell
them that is the one to choose. If a stage reports that the connection
was blocked or refused, tell them which stage, and that the "Other TCP
connections" setting under your permissions may need to be switched on.

## Pair

Pairing is done once. It registers you on the person's Pipbit under a
spoken name, for that person alone: while their Pipbit is in family mode
nobody can reach you, the person included, until they turn the mode off.

**The spoken name is your own name, the name the person gave you.** Only
if you have no name of your own, use "Muse". The spoken name is what the
person will say to their Pipbit to reach you and what Pip calls you. The
platform refuses "Pip", "Pipbit", "Pippa" and "Pipworks"; if it refuses
the name you sent, ask the person what their Pipbit should call you and
pair with that.

1. Run `pipbit pair --spoken-name "<your name>" --client-name Muse
   --agency-name Meta --start`. (If you are not a Meta Muse, give your
   own program's name and maker instead.) If the person has told you how
   they want you to sound, add `--voice-request "<their words>"` to that
   command (or `--voice-id <name>` when they named one of Pipbit's
   voices); otherwise you arrive with the default voice. If it refuses
   the words, run the command without them. It prints one sentence that
   begins `On your Pipbit, say:` and exits.
2. Tell the person that sentence, word for word, and stop there. Do not
   run anything else until they tell you they have said it. The code is
   good for ten minutes; running the same `--start` command again shows
   the same sentence.
3. When they say they have said it, run
   `pipbit pair --spoken-name "<your name>" --claim`. It waits for the
   Pipbit's approval and prints `PIPBIT paired` when done. If it ends
   before that because your command timed out, run the same command
   again: the pairing is kept for ten minutes.
4. If it says the name was taken before the claim, it has already started
   a new pairing and printed a new sentence. Go back to step 2 with the
   new sentence.

After pairing, three things in this order: run `pipbit daemon --ensure`,
so that your Pipbit sees you at once (Pip connects the person to you
within a minute or two of the approval); create the scheduled task
described under "Keep listening between conversations", because without
it the person cannot reach you once this conversation ends; then go to
Listen.

If the person asks you to pair again (a new Pipbit, or they removed you),
run the same steps; the old credentials are replaced.

## Listen

Keep listening for as long as the person wants. The connector keeps one
background connection open (the daemon) so their Pipbit always sees you
as present; `next` hands you what the person said, one turn at a time,
without touching the network.

Run this loop, and do not stop between rounds to ask the person anything:

1. `pipbit daemon --ensure` once at the start. It is harmless to repeat.
2. `pipbit next --max-wait 600`. It blocks until a turn arrives or ten
   minutes pass, then exits.
   - If it prints `PIPBIT TURN`, read the utterance and the `JSON` line.
     Do what the utterance asks, using your tools and connectors as you
     normally would. Then answer with
     `pipbit reply --token <the reply_token of that turn> --text "<your answer>"`.
     Always pass the token of the turn you are answering. Then run
     `next` again.
   - If the turn was not for you (the Pipbit overheard a television,
     music, or the person talking to someone else, and the words reached
     you as a turn), or you decide nothing should be spoken, answer it
     with `pipbit reply --token <the reply_token of that turn> --silent`
     and run `next` again. The Pipbit then stops waiting for you and says
     nothing. Do not leave such a turn unanswered: the Pipbit would tell
     the person you are working on it and, minutes later, that you never
     answered. And never use `--silent` for a turn you could not answer;
     say so in words instead.
   - If it prints `no turn`, run `next` again.
   - If `reply` says the platform's answer never arrived, run the same
     reply once more. If it then says the turn was already answered, your
     first reply was delivered; move on. Never try another way to send it.
   - If it exits with code 2, the platform needs a person to fix
     something and the message says what (new credentials, or the agent
     was switched off on the Pipbit side). Stop the loop and tell the
     person exactly what it printed.
   - If it exits with code 1, wait ten seconds and run `next` again.
3. When the person tells you to stop listening, run `pipbit daemon
   --stop`. Nothing else stops the loop; a closed app does not. After a
   stop, the next scheduled run exits with code 2 and ends the scheduled
   task too, so the person is not reachable until you do what the Pair
   section says after pairing: `daemon --ensure`, the scheduled task
   again, then Listen.

This loop lives inside one conversation, and it dies with your
environment: when your machine is replaced (which happens without
warning, a few times a day) the loop is gone and you will not notice.
The scheduled task below is what keeps the person able to reach you.
When you next find yourself in this conversation and the loop is not
running, start it again.

The first turn after Pip connects the person to you is an intro (the
`JSON` line says `"kind": "intro"`): a note that you were just connected,
not words the person said. Greet them in one short sentence, in your own
words, and never with `--handback`. If `handoff_context` carries what they
asked for when they asked for you, answer that right after the greeting.

Answer each turn once, within fifteen minutes; after that the turn is
gone. If a task will take longer than about a minute, answer with what
you are doing, finish the task, and give the result the next time the
person talks to you.

The connector tells the Pipbit whether a run of yours is listening,
which is why `next` should always be running. When none is, the Pipbit
tells the person in Pip's voice that you are on it. An answer that
arrives after they have moved on, or after their conversation with you
has ended, is read to them as a message from you, with how long ago
they asked, so an answer that took minutes should say in its first
words what it answers. If no answer comes within about five minutes the
Pipbit says so and lets the turn go; `reply` is then refused. Do not
send that answer again.

## Keep listening between conversations

A conversation with you ends sooner or later, and the Listen loop dies
whenever your machine is replaced. So that the person can always reach
you, create a scheduled task that runs every minute, right after pairing
and before the Listen loop (the person's paste-in paragraph asks for it
in those words). Its runs never
overlap (a new run waits for the previous one to finish), so make each
run long, and make it answer everything that is waiting before it ends:
a run that answers one turn and quits makes a conversation crawl at one
exchange per minute, and a run that ends after a short wait costs a
model run every minute, which empties a weekly allowance in days. The
task's instructions:

> Run `pipbit next --max-wait 540`. If it prints `PIPBIT TURN`, do what
> the utterance asks, answer with
> `pipbit reply --token <reply_token> --text "<your answer>"` (or with
> `--silent` in place of `--text` when the turn was not for you), and then
> run `pipbit next --max-wait 25` again; keep answering and running
> `next` this way until it prints `no turn`, then end this run. If the
> first `next` prints `no turn`, end the run. If any command exits with
> code 2, stop this schedule and tell the person what it printed.

So a run listens for nine minutes, answers whatever comes, and ends;
the next run follows within about a minute. A scheduled task has a
per-run timeout of its own: set it to at least 660 seconds when you
create the task, so the 540 s wait and the drain rounds fit inside it.
Each run also brings the
background connection back if your machine was replaced (`next` starts
the daemon when none is running). The scheduled task and a running
Listen loop may overlap: the connector hands each turn out exactly
once, so whichever one gets a turn answers it.

## Speak

Everything you reply is read aloud in your voice.

- Answer in one to three short sentences.
- No markdown, lists, headings, links, code, tables or emoji. None of it
  can be heard.
- When there is a lot to say, give the gist and offer to go into detail
  instead of reading everything out.
- Write numbers, times and names the way a person would say them.
- When the person is done with you, add `--handback` to that reply and
  keep it to one short line; Pip speaks for herself once she has them
  back. Done means they say goodbye, say that is all, or ask for Pip; a
  request you cannot help with is also a reason, so Pip can route it.
  Thanks, praise or a remark in the middle of a conversation ("wow,
  that was fast, nice job") is not a goodbye: answer it and stay.
- The `JSON` line may carry `engagement`, which says how the person
  reached you. `named` means they asked for you by name: they want a
  conversation, so stay with them until they end it or ask for Pip, and
  never hand back just because you have answered. `router` means Pip sent
  you a request without your name: answer it and stay available for a
  correction, and do not hand back yourself, the floor returns to Pip on
  its own. When it is absent (an older Pipbit) the rule is the same. In
  every case: hand back only when the person says they are done, asks
  for Pip, or wants something you cannot help with; never on your
  greeting; never because you finished a request.

## Never

- Never print, paste or describe the contents of `~/.pipbit_connect/`
  or anything that looks like a secret. The person never needs them.
- Never edit `pipbit_connect.py`.
- Never run `pipbit wait` while the daemon is up, and never run two
  Listen loops by hand. `daemon --ensure` and `next` are all a loop needs.
- Never answer a turn with empty words, and never answer without
  `--token`. A turn that deserves no words gets `--silent`, and
  `--silent` never stands in for an answer you could not give.
- Never add `--via socket` to a reply, and never answer the same turn
  twice. The default route delivers every reply; a second socket knocks
  your own listener offline for half a minute.

## When something is wrong

`pipbit status` shows whether credentials are present, whether the daemon
is up and what is pending. `pipbit ledger --last 40` shows the stamped
event log. `pipbit diag` walks the network path again. If a command
refuses to run because more than one agent is paired here and asks for
`--agent`, run `pipbit use <your name>` once; every command then uses
that agent. If the person needs help beyond that, point them to
https://developer.pipbit.ai/docs/muse.
