whatisgithub

What is pi-agent-browser-screenshot?

jnsahaj/pi-agent-browser-screenshot — explained in plain English

Analysis updated 2026-05-18

12TypeScriptAudience · developerLicenseSetup · easy

In one sentence

A pi terminal AI tool extension that shows agent-browser screenshots inline, even inside tmux, using kitty graphics protocol tricks.

Mindmap

mindmap
  root((repo))
    What it does
      Inline agent-browser screenshots
      Works inside tmux
      TUI-only, not sent to model
    Tech stack
      TypeScript
      pi extension
      kitty graphics protocol
    Use cases
      View AI agent screenshots
      Debug in tmux sessions
      Text fallback support
    Audience
      Developers using pi
      Terminal power users

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

See agent-browser screenshots directly inline in the pi terminal transcript.

USE CASE 2

View inline images from an AI coding agent even when running inside tmux.

USE CASE 3

Enable allow-passthrough in tmux to unlock kitty or Ghostty inline image support.

USE CASE 4

Fall back gracefully to a text file path when your terminal cannot render images.

What is it built with?

TypeScriptpitmuxkitty graphics protocol

How does it compare?

jnsahaj/pi-agent-browser-screenshotalamops/agetoraza-ali/blendpixel.com
Stars121212
LanguageTypeScriptTypeScriptTypeScript
Setup difficultyeasyhardeasy
Complexity4/52/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

Full inline image support inside tmux needs tmux 3.3+ with allow-passthrough enabled and a kitty or Ghostty terminal.

So what is it?

pi-agent-browser-screenshot is an extension for a terminal based AI coding tool called pi. Its job is to let you see screenshots taken by another tool, agent-browser, directly inside pi's text interface, including when you are running pi inside tmux, a terminal multiplexer that normally blocks pi from showing images at all. When an AI agent using pi runs an agent-browser command that takes a screenshot, this extension notices the resulting image file and displays it right there in the conversation transcript. These screenshots only appear on your screen. They are saved along with the session but are never actually sent to the underlying AI model. How well this works depends on your terminal setup. In kitty or Ghostty terminals running inside tmux, the extension displays real inline images using a special graphics protocol built into those terminals. Outside of tmux, it falls back to whatever pi's own interface normally supports, which may still be an inline image or a plain text fallback depending on the terminal. In other terminal types running inside tmux, you only get a text fallback showing the file path instead of an actual image. To make inline images work inside tmux, you need tmux version 3.3 or newer, and you have to turn on a setting called allow-passthrough in your tmux configuration file, since tmux blocks the necessary escape sequences by default. If that setting is off, the extension simply falls back to showing text instead of failing. Technically, images inside tmux are transferred using the kitty graphics protocol, wrapped so it can pass through tmux, and drawn on screen using special Unicode placeholder characters that carry the image's identity and position as ordinary text. Because these placeholders behave like normal text, tmux can scroll and redraw them along with everything else. A few limits apply: only image files that the screenshot command itself just created are shown, images merely referenced elsewhere in the output are ignored, the tmux path only supports PNG images, and any file larger than 10 megabytes is skipped. The project is released under the MIT license.

Copy-paste prompts

Prompt 1
Help me install pi-agent-browser-screenshot with pi install git:github.com/jnsahaj/pi-agent-browser-screenshot.
Prompt 2
Explain how to enable allow-passthrough in my tmux.conf so inline screenshots work.
Prompt 3
Walk me through why my terminal only shows a file path instead of an inline screenshot.
Prompt 4
Explain how the kitty graphics protocol and Unicode placeholders render images inside tmux.

Frequently asked questions

What is pi-agent-browser-screenshot?

A pi terminal AI tool extension that shows agent-browser screenshots inline, even inside tmux, using kitty graphics protocol tricks.

What language is pi-agent-browser-screenshot written in?

Mainly TypeScript. The stack also includes TypeScript, pi, tmux.

How hard is pi-agent-browser-screenshot to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is pi-agent-browser-screenshot for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.