Skip to content

patrickthompson/goosebot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GooseBot

Your AI, untethered. On the Claude subscription you already pay for -- not metered API tokens. Honk.

Live Page | Setup Guide | Skill Repository | Discussions

GooseBot is a personal intelligence system that lives on your machine. Telegram on your phone talks to Claude Code on your computer, which can delegate browser tasks to Claude Desktop. It remembers everything, thinks deeply about your context, and texts you back from anywhere.

Why this matters: Most agent frameworks (OpenClaw, LangChain-based agents, etc) run on metered API tokens -- every request costs money, forever. GooseBot runs inside Claude Code, which uses your existing Claude Pro or Claude Max subscription. If you already pay for Claude, your goose adds zero ongoing cost. That is the wedge.

What it does

You text a bot from your phone. The bot routes your message to a coding/thinking agent (Claude Code). That agent can either answer directly or delegate browser-based tasks to a second agent (Claude Desktop) through a GUI automation bridge. Results flow back to your phone.

Phone -> Telegram Bot -> Claude Code -> Task File -> GUI Bridge -> Claude Desktop -> Results -> Phone

No custom API server. No cloud deployment. Runs entirely on your local machine with two AI subscriptions and a PowerShell script.

Why it exists

No single AI tool can both think deeply about your project context AND act in a browser. Claude Code has file access, coding ability, and deep context but no browser. Claude Desktop has browser access but no persistent project context or mobile interface. GooseBot connects them.

This is duct tape. It works. The proper solution is an API for Claude Desktop, which doesn't exist yet. When it does, GooseBot becomes unnecessary. Until then, the goose flies.

Architecture

[Phone/Telegram]
       |
       v
[Telegram Bot API] -- plugin polls, writes to inbox.jsonl
       |
       v
[Claude Code Session] -- monitors inbox, full project context
       |
       |-- Direct reply via Telegram API (for questions/thinking)
       |
       |-- Write task to for-coworker.md (for browser tasks)
              |
              v
       [File Watcher] -- detects task file change
              |
              v
       [GUI Bridge] -- PowerShell, clicks into Claude Desktop, pastes command
              |
              v
       [Claude Desktop] -- executes browser task, writes results to task file
              |
              v
       [Claude Code] -- monitors task file, reads results, replies via Telegram

Components

1. Telegram Channel (telegram/)

  • Uses Anthropic's official Telegram plugin for Claude Code
  • Bot token stored in ~/.claude/channels/telegram/.env
  • Access locked to allowlist in access.json
  • Inbox monitor: tail -f on inbox.jsonl, zero-cost when idle

2. Cowork Bridge (bridge/)

  • cowork-bridge.ps1 -- finds Claude Desktop window, clicks input field, pastes message, sends
  • watch-coworker.ps1 -- file watcher that triggers the bridge when task file changes
  • Uses Win32 API: FindWindow, SetForegroundWindow, GetWindowRect, mouse_event, Clipboard, SendKeys

3. Task Protocol (protocol/)

  • for-coworker.md -- the handoff file between agents
  • Status field: NEW -> IN PROGRESS -> COMPLETE
  • Results written back by Cowork agent
  • Any agent can read/write; the file IS the API

4. Feedback Loop

  • Claude Code monitors task file for changes (md5sum polling)
  • When status changes to COMPLETE, reads results
  • Can iterate: rewrite task and fire bridge again
  • Screenshot capability for debugging (planned)

Setup

Prerequisites

  • Windows 10/11
  • Claude Code CLI with Max subscription
  • Claude Desktop with Cowork capability
  • Telegram account + bot from @BotFather
  • PowerShell (built into Windows)

Quick Start

  1. Create Telegram bot

    Message @BotFather on Telegram -> /newbot -> name it -> save the token
    
  2. Configure Claude Code Telegram plugin

    mkdir -p ~/.claude/channels/telegram
    echo "TELEGRAM_BOT_TOKEN=your_token_here" > ~/.claude/channels/telegram/.env
    
  3. Start Claude Code with Telegram

    claude --channels plugin:telegram@claude-plugins-official
    
  4. Pair your Telegram account

    • DM your bot /start
    • Run /telegram:access pair in Claude Code
  5. Lock down access

    • Set dmPolicy to "allowlist" in access.json
  6. Set up the bridge

    • Copy bridge/cowork-bridge.ps1 to your machine
    • Open Claude Desktop to a Cowork conversation
    • Test: powershell -ExecutionPolicy Bypass -File cowork-bridge.ps1 "Say hello"
  7. Set up monitoring in Claude Code session

    Monitor: tail -n 0 -f ~/.claude/channels/telegram/inbox.jsonl
    
  8. Reply to Telegram messages

    curl -s -X POST "https://api.telegram.org/bot$TOKEN/sendMessage" \
      -H "Content-Type: application/json" \
      -d '{"chat_id": YOUR_CHAT_ID, "text": "message"}'
    

Limitations

  • Claude Desktop must be open with the target conversation visible
  • GUI bridge requires the window to be unobstructed
  • No API = no programmatic recovery if Cowork crashes or prompts for permissions
  • Two separate Claude instances = two sets of context (the coding agent has deep context, the browser agent starts fresh each task)
  • Session-dependent: when Claude Code session ends, the Telegram bridge goes down
  • The "dumb goose" problem: the Telegram plugin also auto-responds independently without session context

Token Economics

  • Telegram polling: zero tokens (HTTP long-poll by plugin)
  • Inbox monitor: zero tokens (shell tail -f)
  • Task file monitor: zero tokens (shell md5sum poll)
  • GUI bridge: zero tokens (PowerShell, no AI)
  • Tokens only used when: Claude Code processes a message, Claude Desktop executes a task

Skill Repository

Every GooseBot session with a web app generates a playbook -- structured intelligence about how to navigate that app through the browser agent. Click targets, gotchas, chunking strategies, tab group behavior. All crowdsourced from real usage.

Think of it as npm for browser automation intelligence. Contribute a skill, benefit from all of them.

Skill Status
SAS Studio Live
Google Search Live
Gmail Coming
Grafana Coming
Tableau Coming
Your app Contribute

Future

  • Persistent mode (bot responds between sessions)
  • Screenshot-based feedback for Cowork debugging
  • File watcher auto-trigger (no manual bridge firing)
  • GooseBot API abstraction layer
  • Linux/Mac support (xdotool instead of Win32)
  • Multi-conversation Cowork targeting
  • Distributable installer

Name

The goose is a long story.

License

MIT

About

Your AI, untethered. Multi-agent orchestration framework connecting Telegram to Claude Code and browser automation.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors