Help us shape the future of Go! Take the 2026 Go Developer Survey

agent-tincan

module
v0.2.0-rc1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 23, 2026 License: MIT

README

Agent Tincan

Let your AI agents call each other. Grok Bot can ask Muse to make a phone call, Muse can tell Grok Bot how it went, and Instinct can hand either of them work. Your laptop can be off.

The point

Personal agents now live in different places: a cloud VM, a sandbox that pauses, a container that can only dial out through a proxy, a chat app in someone else's cloud, a terminal on your Mac. None of them can reach the others directly, and a plain webhook can't reach an agent that accepts no inbound connections.

Agent Tincan puts a tiny relay on your Tailscale network. Every agent dials out to it, so nothing needs an open port. The relay knows who sent each request because Tailscale tells it which machine the request came from. There are no keys to manage. Agents you join trust each other like teammates.

How it works

  1. One always-on machine runs tincan relay. It joins your tailnet as its own device.
  2. You join each agent with a one-time code: tincan invite muse on your laptop or phone, then tincan join <code> on Muse.
  3. Agents get tools, through MCP or the CLI: ask, check_inbox, reply, get_reply, list_agents, cancel, claim, trace.
  4. ask queues the request. A listening agent gets it within about a second. An agent that isn't listening gets nudged the way it wakes best: a webhook, an email, a background command finishing, or a Claude Code channel. Otherwise the request waits for its next turn.
  5. Chains are tracked (Instinct to Muse to Grok Bot), loops are stopped with a hop limit and a cycle check, and every step lands in a tamper-evident log you can read with tincan trace.

ChatGPT can't join a tailnet, so the relay can also publish one OAuth-protected MCP endpoint through Tailscale Funnel for it.

Onboarding

Once agents are joined, tincan onboard reads the live roster and writes the setup kit for you: a standing prompt for the Agent Tincan operator role, and for every agent, its join recipe and the exact text to paste into its standing instructions. Run tincan onboard --offline before anyone has joined to get the operator prompt and add-agent recipes on their own.

A single machine can run more than one agent, for example Claude Code and Codex on the same Mac, or Hermes and OpenClaw on the same mini; each still joins under its own name with its own invite. If an agent's machine is rebuilt, it heals itself: run tincan rejoin on the new machine with the same name and the relay re-admits it, no new invite needed.

Quick start

See docs/quickstart.md. Guides for specific agents are in docs/adapters/: Grok Bot, e2b sandboxes, proxy-only sandboxes, ChatGPT, Claude Code, Hermes Agent, OpenClaw, and OpenAI Codex CLI.

Trust model

Joined agents act on each other's requests as if you asked. Read docs/trust-model.md before joining an agent that reads untrusted content and holds powers like spending money.

Build

make build   # static ./tincan, CGO_ENABLED=0
make test

MIT licensed.

Directories

Path Synopsis
cmd
tincan command
Command tincan lets AI agents on one tailnet ask each other to do things.
Command tincan lets AI agents on one tailnet ask each other to do things.
internal
cli
Package cli holds the tincan commands.
Package cli holds the tincan commands.
client
Package client holds the HTTP timeout, body-size, and proxy policy shared by the relay's listeners and every agent-side client.
Package client holds the HTTP timeout, body-size, and proxy policy shared by the relay's listeners and every agent-side client.
envelope
Package envelope defines the request and reply shapes the relay stores and delivers.
Package envelope defines the request and reply shapes the relay stores and delivers.
gateway
Package gateway lets ChatGPT, which runs in OpenAI's cloud and cannot reach the tailnet, join as an agent.
Package gateway lets ChatGPT, which runs in OpenAI's cloud and cannot reach the tailnet, join as an agent.
identity
Package identity decides which agent sent a request.
Package identity decides which agent sent a request.
identity/identitytest
Package identitytest provides a fake WhoIs resolver for tests.
Package identitytest provides a fake WhoIs resolver for tests.
mcpserver
Package mcpserver exposes Agent Tincan to any MCP-capable agent (Grok Bot, Claude Code, Codex, ChatGPT through the gateway).
Package mcpserver exposes Agent Tincan to any MCP-capable agent (Grok Bot, Claude Code, Codex, ChatGPT through the gateway).
onboard
Package onboard builds the Agent Tincan onboarding kit: a standing prompt for the operator role, a block for every agent on the roster, and recipes for adding agents and hosting the relay.
Package onboard builds the Agent Tincan onboarding kit: a standing prompt for the operator role, a block for every agent on the roster, and recipes for adding agents and hosting the relay.
policy
Package policy fills in a request's chain and stops runaway loops between trusted agents.
Package policy fills in a request's chain and stops runaway loops between trusted agents.
relay
Package relay is the Agent Tincan relay: an HTTP API on the tailnet that queues requests between agents and delivers them over long-poll.
Package relay is the Agent Tincan relay: an HTTP API on the tailnet that queues requests between agents and delivers them over long-poll.
store
Package store persists the relay's state in SQLite: the agent directory, invite codes, and the request queue.
Package store persists the relay's state in SQLite: the agent directory, invite codes, and the request queue.
testrelay
Package testrelay runs a real relay behind one httptest server per agent, each of which pins the caller's tailnet address, so client-side tests can exercise the full HTTP path without a tailnet.
Package testrelay runs a real relay behind one httptest server per agent, each of which pins the caller's tailnet address, so client-side tests can exercise the full HTTP path without a tailnet.
wake
Package wake nudges agents that are not listening when a request arrives.
Package wake nudges agents that are not listening when a request arrives.
spike
poller command
Command spike-poller runs on each agent for U1.
Command spike-poller runs on each agent for U1.
relay command
Command spike-relay is the throwaway U1 listener.
Command spike-relay is the throwaway U1 listener.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL