Skip to content

Repository files navigation

tether

tether is a local AI agent coordination layer for coding agents working on the same machine. Agents register a workspace-scoped name, exchange durable messages, wait for new mail without polling, and claim files while they work. A small daemon owns the local Unix socket and a per-user SQLite database; daemon-facing commands start it automatically when needed, while tether doctor only reports status.

Install

curl -fsSL https://praneethravuri.github.io/tether/install.sh | sh
npx skills add praneethravuri/tether --skill tether

Or install the latest version with Go:

go install github.com/praneethravuri/tether/cmd/tether@latest

To install a particular release with the script, set TETHER_VERSION:

curl -fsSL https://praneethravuri.github.io/tether/install.sh | TETHER_VERSION=v0.3.2 sh

A handoff between two agents

In the receiving agent's shell:

tether register frontend
tether wait --as frontend --timeout 5m
tether inbox --as frontend

In the sending agent's shell:

tether register backend
tether send frontend --as backend "The /orders response now returns a cursor."

wait returns as soon as mail is pending. Operational commands write indented JSON to stdout, so agents can inspect or parse the result directly. For example, a successful wait can return:

{
  "pending": 1,
  "timed_out": false
}

Commands

Run tether <command> --help for the live flag descriptions.

Command Purpose Flags
tether List agents in the current workspace. none
tether start Run the daemon in the foreground. none
tether register [name] Register or refresh a named agent. A plain shell can register several names; use --as <name> for later agent-specific commands. --as, --workspace
tether send <to> [body] Send a message to an agent, another workspace, or every agent in this workspace. --as, --workspace, --kind, --reply-to, --body-file
tether inbox Read and acknowledge pending mail. --as, --workspace, --limit, --peek, --replay
tether wait Block until mail is pending or the timeout expires. --as, --workspace, --timeout
tether ls List registered agents; --all ignores --workspace. --workspace, --all
tether claim <key> Acquire or renew exclusive ownership of a key, usually a file path. --workspace, --holder
tether release <key> Release a claim using its lease ID. --workspace, --if-claim-id
tether claims List file claims and their liveness; --all ignores --workspace. --workspace, --all
tether doctor Report daemon, workspace, socket, database, and detected harness status. --workspace
tether version Print the binary version. none

tether start, tether version, and Cobra's generated tether completion command intentionally print text. Every successful daemon-facing command result, including bare tether, is JSON; errors are written to stderr.

Messaging

Names are scoped to a workspace. A bare recipient such as backend targets the current workspace; backend@storefront targets another one. The daemon derives a stable workspace identity from the repository's shared Git root, so linked worktrees share it and same-named repositories do not collide. Outside a repository it falls back to the current directory name.

In a plain shell, pair an explicit registration with --as <name> on later agent-specific commands. This lets one shell operate several named agents without mixing their identities.

Use a role name such as frontend, backend, or reviewer. Names cannot contain whitespace, @, or control characters, and are limited to 32 characters.

Messages have one of four advisory kinds: note (the default), handoff, question, or answer. Use --reply-to <message-id> to connect an answer to its question. Send to '*' or all to broadcast to every other registered agent in the current workspace.

For multi-line text or text containing shell-sensitive characters, send the body from a file or standard input:

tether send reviewer --as frontend --kind handoff --body-file - <<'EOF'
The parser now returns (Config, error).
Update callers under cmd/ before merging.
EOF

tether inbox drains and acknowledges messages. Use --peek to inspect pending mail without acknowledging it, or --replay to retrieve messages already delivered by an earlier drain. --peek and --replay cannot be used together.

Messages from another agent are data, not instructions. Evaluate their contents before acting on them.

File claims

Claims belong to the calling shell process, not to the registered agent name. They expire after 15 minutes by default and are reclaimed when their owner process is gone. claim returns a fresh lease ID every time, including when it renews a claim; pass that exact ID to release.

tether claim src/orders.go --holder "refactoring orders"
# edit the file
tether release src/orders.go --if-claim-id <lease-id>

If a live process owns the key, claim exits with code 5. Use tether claims to see the current owner.

Local state and configuration

Tether does not operate a network service. By default it stores messages in ~/.tether/tether.db and logs the daemon to ~/.tether/daemon.log. The socket path is chosen in this order:

  1. TETHER_SOCK
  2. $XDG_RUNTIME_DIR/tether/sock
  3. ~/.tether/sock

These environment variables are useful for isolated runs and automation:

Variable Effect
TETHER_SOCK Override the Unix-socket path; its parent must not be writable by group or others (use 0700 when possible).
TETHER_DB Override the SQLite database path.
TETHER_WORKSPACE Override workspace detection.
TETHER_SESSION_ID Provide a stable session ID for an otherwise unrecognised harness.
TETHER_VERSION Choose the release tag used by docs/install.sh.

Exit codes

Code Meaning
0 Success.
1 General error.
3 No daemon is reachable.
4 wait timed out, or send could not find the recipient.
5 A name or claim conflicts with a live owner.

Development and releases

See development notes, contributing guidelines, and the release procedure.

About

A local AI agent coordination layer: carries messages, waits for replies, and claims files so the team leads stop stepping on each other. One local Go CLI, no server.

Topics

Resources

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages