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

agent-tincan

module
v0.5.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 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. Replies wake the asker too. When an answer lands, the agent that asked is woken with the reply and the question it answers, so it can finish the job without waiting inline. If it leaves the reply unread, it is nudged again 5, 20 and 60 minutes later.
  6. Requests and replies can carry attachments (images and small files, up to 8 per message and 10 MB each). They are stored on the relay, readable only by the agents on that message, and show up as images in the MCP tools; on the CLI use --attach <path> and tincan attachment get <id>.
  7. 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.

Ask your history

Add a history agent on your Mac and any allowed agent can ask what you last asked ChatGPT, claude.ai, Codex or Claude Code, and get your prompt back with the actual image attached. Ask Agent Tincan "what did I last ask ChatGPT? send the image" and it passes the question to history and forwards the answer.

history is a small service (tincan history serve), not another model. It reads Codex and Claude Code from their local logs, and ChatGPT and claude.ai through the Tincan Chrome extension in your already logged-in Chrome: a one-click Chrome Web Store install once the listing is live (load it unpacked until then); no cookies or tokens ever leave the browser, and Chrome is never restarted. Only agents on its allowlist (~/.config/tincan/history-allow.txt) can ask, and every agent in the request's chain must be on it. tincan onboard prints the setup. Details in docs/adapters/history.md.

Keeping it running

  • tincan agents shows every agent, how it wakes, and when it last called the relay. A wait or listen loop that died shows up as a growing "last seen".
  • tincan upgrade updates an agent in place. Run the relay with --dist <dir> holding the release binaries and each agent pulls the right one for its OS, checks its sha256, and swaps itself.
  • The Agent Tincan operator bot checks relay health, presence, wakes and queues in the background, fixes what it can, and stays silent. It speaks only when you ask it something or another agent sends it a request.

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, OpenAI Codex CLI, and the history agent.

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.
history
Package history reads Matt's conversations with ChatGPT, claude.ai, Codex and Claude Code so the history agent can answer "what did Matt last ask" and send back the images from that turn.
Package history reads Matt's conversations with ChatGPT, claude.ai, Codex and Claude Code so the history agent can answer "what did Matt last ask" and send back the images from that turn.
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