mvanhorn/agentcookie

Your agent runs on a Mac that isn't your daily driver. agentcookie keeps its sessions in sync with the Mac you actually browse on, continuously, encrypted over Tailscale, so OpenClaw, Hermes, or any other agent runtime wakes up authenticated. macOS, peer-to-peer, no cloud middleman.

What it solves

It eliminates the need to manually log in to websites on the remote servers or VMs where AI agents run. Instead of repeatedly pasting cookies or performing manual authentication ceremonies on a headless Linux box, this tool continuously synchronizes your active browser sessions from your local Mac to your remote agent environment.

How it works

agentcookie uses a source-and-sink architecture over a secure Tailscale network:

  1. Source (Mac): It monitors Chrome's cookie file for changes, decrypts them using the macOS Keychain, filters them based on a user-defined policy, and sends them encrypted via AES-256-GCM.
  2. Sink (Linux/Mac): It receives the encrypted cookies and injects them directly into the remote Chrome instance's in-memory store using the Chrome DevTools Protocol (CDP).

Because it uses live CDP injection, the remote browser session is updated in real-time without needing to rewrite the browser's database files on disk.

Who it’s for

Developers and AI researchers running browser-based agents (using frameworks like browser-use, Puppeteer, or Playwright) on remote Linux VMs, cloud runtimes, or homelab servers who want their agents to inherit their own authenticated web sessions.

Highlights

  • Continuous Sync: Automatically ships cookie diffs the moment they change on the source machine.
  • Zero-Auth Ceremony: Agents can access authenticated pages immediately without manual login steps.
  • Secure Transport: Uses Tailscale's WireGuard channel and AES-256-GCM encryption for data transit.
  • Live CDP Injection: Bypasses the need for local Keychain or SQLite rewrites on Linux by injecting cookies directly into memory.
  • Flexible Policies: Supports both allowlist and blocklist modes to control which domains are synchronized.

Related

  • Project
  • Project
  • Project
  • Project
  • Project