Logo di Browser Terminal Use Agent

Browser Terminal Use Agent

Community
chaokunyang
browser-terminal-use-agent

Operate Browser Terminal Use as an execution bridge between local CLI and browser-hosted terminals. Use when Codex needs to run or iterate shell commands in non-local environments through a browser terminal, build cloud-side verifiable execution loops for LLM agents, debug remote runtime issues (GPU, containers, bastion-only networks), or manage daemon/extension binding, timeout, cancel, and optional token hardening.

Panoramica

Pubblicato dachaokunyang
Repositorybrowser-terminal-use
Nome della skillbrowser-terminal-use-agent
Stelle
26
Fork
1
File inclusi
2
LicenzaApache-2.0
Link
  • Istruzioni in Markdown

    Un file SKILL.md che il modello carica quando serve, consumando token solo quando una richiesta è effettivamente pertinente.

  • Funziona con qualsiasi LLM

    Le skill IA sono in semplice Markdown, non in codice specifico di un fornitore, quindi funzionano con GPT, Claude, Gemini, Grok o un modello locale.

  • File inclusi: 2

    Script, template e riferimenti che il modello può leggere mentre lavora. I file sono di sola lettura e non vengono mai eseguiti.

  • Open source

    Pubblicata da chaokunyang su GitHub. Leggi i sorgenti prima di installarla.

Installazione

Installa la skill IA Browser Terminal Use Agent in TypingMind per usarla con qualsiasi LLM, oppure copiala in un altro agente in grado di leggere SKILL.md.

1

Installa in TypingMind

TypingMind installa una skill direttamente dalla sua cartella GitHub: legge SKILL.md, raccoglie i file delle risorse e salva il risultato in locale.

  1. Apri l'app e vai su Plugin → Skill.
  2. Scegli "Installa da GitHub".
  3. Incolla l'URL della cartella della skill riportato qui sotto e conferma.
    https://github.com/chaokunyang/browser-terminal-use/tree/main/skill/browser-terminal-use-agent
  4. Attiva la skill in ogni chat in cui vuoi averla a disposizione.
Plugin → Skill → Aggiungi skill → Da URL GitHub, poi incolla l'URL della cartella e premi Continua.
2

Installa in un altro agente

Qualsiasi agente che legge il formato Agent Skills può usare questa skill: copia la cartella della skill nella directory delle skill di quell'agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/chaokunyang/browser-terminal-use.git /tmp/browser-terminal-use
mkdir -p .claude/skills
cp -r /tmp/browser-terminal-use/skill/browser-terminal-use-agent .claude/skills/browser-terminal-use-agent
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva Browser Terminal Use Agent in qualsiasi chat di TypingMind e al resto pensa il modello. Il nome e la descrizione della skill sono nel prompt di sistema e, non appena arriva una richiesta pertinente, il modello carica da solo le istruzioni complete: non devi mai richiamarla manualmente e non consuma token finché non viene effettivamente usata.

Il modello carica automaticamente Browser Terminal Use Agent non appena riceve una richiesta pertinente.

Funziona con qualsiasi modello IA

Le skill IA sono semplici istruzioni in Markdown, non codice specifico di un fornitore, quindi Browser Terminal Use Agent non è vincolata al modello per cui è stata scritta. Installala una sola volta in TypingMind e usala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modello locale che esegui tu, sempre con le tue chiavi API.

  • Caricata solo quando serve

    Il prompt di sistema contiene solo il nome e la descrizione. Le istruzioni vengono recuperate alla prima richiesta pertinente, quindi una skill inutilizzata non costa nulla.

  • Cambia modello durante la chat

    Poiché la skill è composta da istruzioni e non da codice, continua a funzionare anche se cambi modello: il nuovo modello legge lo stesso file SKILL.md.

Istruzioni della skill

Questo è il contenuto di SKILL.md che il modello carica. Leggilo prima dell'installazione: una skill è un insieme di istruzioni che il tuo modello seguirà.

Browser Terminal Use Agent

Overview

Use this skill to drive Browser Terminal Use as an agent loop runner: issue commands locally, execute in a bound browser terminal tab, stream output, and use remote exit codes as the control signal for next actions.

Read references/runbook.md for concrete command templates and troubleshooting mappings.

Workflow

  1. Start or verify daemon connectivity.
  2. Ensure extension and terminal tab are ready, then prove the tab is actually bound with a short smoke probe.
  3. Run iterative command loops with explicit timeout and request id.
  4. Diagnose failures and recover quickly.
  5. Enable token hardening when security requirements increase.

1) Start Or Verify Daemon Connectivity

Use global commands:

bash
browterm-daemon --host 127.0.0.1 --port 17373
browterm health

Start daemon on localhost and verify health before running commands.

bash
curl http://127.0.0.1:17373/v1/health

Treat daemon health failure as a hard blocker for agent loops.

2) Ensure Extension And Tab Readiness

Load extension from extension/ in Chrome developer mode. Configure extension bridge URL as ws://127.0.0.1:17373/extension. Bind the browser terminal tab by clicking extension action once. Refresh the target terminal tab after extension reload.

Do not treat browterm health with extensionConnected: true as sufficient evidence that a usable terminal tab exists. Prove tab attachment with a trivial bounded command before any long-running request:

bash
browterm exec --request-id req-tab-smoke --timeout-ms 15000 --json "printf bt-ready"

If the smoke probe does not return the expected sentinel text quickly, stop and treat it as a hard blocker. Common causes are:

  • no browser terminal tab is open
  • the tab is open but not bound to the extension
  • the extension is connected but attached to the wrong tab
  • output is only browser or extension telemetry rather than command output

3) Run Iterative Agent Loops

Use exec as the default operation and keep each step deterministic.

  • Provide --timeout-ms for bounded execution.
  • Provide --request-id so cancellation and traceability stay explicit.
  • Prefer --json when post-processing output in automation.
  • Use the command exit code as the branching condition for next agent step.

Example:

bash
browterm exec --request-id req-env-check --timeout-ms 120000 --json "uname -a"

Hang Detection Rules

  • Run a short smoke probe first. Never start a long remote test until that probe succeeds.
  • If a trivial probe stays queued, times out, or produces no command output within its timeout window, cancel it and raise an error immediately.
  • If output consists only of browser or extension telemetry and not the command's expected stdout, treat that as "tab not actually attached" and fail early.
  • For longer commands, do not cancel just because stdout is quiet.
  • If a longer command appears hung, first check daemon health and whether a browser terminal tab is still bound.
  • Only treat the run as a tab-binding or transport failure when health or tab checks fail, or when output shows only browser or extension telemetry instead of terminal output.

Quote-Safe Command Rules

These are hard rules, not suggestions. If a command is not quote-safe and stable, do not run it through browterm exec. Rewrite it first.

  • Never pass multiline commands to browterm exec.
  • Never use heredoc (<<EOF) inside browterm exec command strings.
  • Never send commands with unbalanced or hard-to-audit quoting.
  • Never rely on shell state that is not made explicit in the same command string.
  • Always prefer one-line commands joined by ; or &&.
  • Always rewrite fragile commands into quote-safe, deterministic forms before execution.
  • For generated files, use printf '%s\n' ... > file instead of heredoc.
  • For JSON payload files, prefer jq -n '...' > file.
  • If the quoting still looks brittle after one rewrite, stop using inline shell and generate a short script with printf '%s\n' ... > /tmp/<name>.sh; bash /tmp/<name>.sh.

Safe patterns:

bash
browterm exec --request-id req-basic --timeout-ms 120000 --json "hostname; whoami; pwd"

browterm exec --request-id req-json --timeout-ms 120000 --json \
  "jq -n '{input_ids:[1,2,3],stream:false}' > /tmp/req.json; cat /tmp/req.json"

browterm exec --request-id req-script --timeout-ms 120000 --json \
  "printf '%s\n' '#!/usr/bin/env bash' 'set -euo pipefail' 'echo ok' > /tmp/bt_step.sh; bash /tmp/bt_step.sh"

Avoid:

bash
# Avoid multiline/heredoc payloads inside browterm exec
browterm exec --request-id bad --timeout-ms 120000 --json \
  'cat >/tmp/x <<EOF
line1
EOF'
bash
# Avoid nested or ambiguous quoting that is difficult to audit quickly
browterm exec --request-id bad --timeout-ms 120000 --json \
  "python -c 'print(\"unterminated or fragile shell composition here)\""

Cancel stuck or obsolete work by request id:

bash
browterm cancel req-env-check

4) Diagnose And Recover

When execution fails, check in order:

  1. Daemon process and /v1/health.
  2. Extension options bridge URL.
  3. Bound tab status (rebind if needed).
  4. Retry command with debug logging on daemon.

Use error-specific playbooks in references/runbook.md.

5) Enable Optional Token Hardening

Keep default local setup tokenless for fastest setup. Enable --token on daemon and CLI for stricter local security boundaries. When enabled, keep daemon, extension options, and CLI token values identical.

Execution Principles

  • Keep one active command per loop step.
  • Prefer short, composable commands over long opaque scripts.
  • Do not execute a command string you cannot quickly prove is quote-safe and stable.
  • Persist request ids in logs for auditability.
  • Re-run with focused probes before broad retries.

File inclusi

Il modello legge questi file quando servono, mentre la skill è caricata. Sono accessibili in sola lettura e non vengono mai eseguiti.

Domande frequenti

Cosa fa la skill IA Browser Terminal Use Agent?

Operate Browser Terminal Use as an execution bridge between local CLI and browser-hosted terminals. Use when Codex needs to run or iterate shell commands in non-local environments through a browser terminal, build cloud-side verifiable execution loops for LLM agents, debug remote runtime issues (GPU, containers, bastion-only networks), or manage daemon/extension binding, timeout, cancel, and optional token hardening.

Perché usare Browser Terminal Use Agent su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. Browser Terminal Use Agent è scritta in semplice Markdown anziché in codice specifico di un fornitore, quindi la stessa skill funziona con GPT-5, Claude, Gemini, Grok o un modello locale, e puoi cambiare modello durante la chat senza che la skill smetta di funzionare. TypingMind usa le tue chiavi API, quindi paghi direttamente i fornitori anziché un abbonamento per posto utente, e le tue skill e chat restano nel tuo spazio di archiviazione.

Come installo Browser Terminal Use Agent in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/chaokunyang/browser-terminal-use/tree/main/skill/browser-terminal-use-agent. TypingMind legge il file SKILL.md, include i file associati e installa la skill, che puoi abilitare per ogni singola chat.

Quali modelli IA possono usare Browser Terminal Use Agent?

Qualsiasi modello che colleghi a TypingMind. Le skill IA sono semplici istruzioni in Markdown anziché codice specifico di un fornitore, quindi GPT, Claude, Gemini, Grok e i modelli locali possono tutti caricare questa skill quando una richiesta corrisponde al suo scopo.

Quanti modelli IA posso usare con Browser Terminal Use Agent?

Quanti ne vuoi. Se un modello supporta le skill, puoi usarlo con Browser Terminal Use Agent: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e molti altri, tutti su TypingMind con le tue chiavi API.

La skill IA Browser Terminal Use Agent è gratuita?

Sì. È pubblicata su GitHub da chaokunyang con licenza Apache-2.0. Paghi solo il tuo fornitore IA per i token che usi.

Cosa sono le skill IA?

Una skill IA è un pacchetto di istruzioni riutilizzabili che insegna a un modello IA come svolgere un'attività specifica. Segue il formato aperto Agent Skills: un file SKILL.md con un nome e una descrizione, più eventuali script, template o file di riferimento di cui il modello potrebbe aver bisogno. Il modello legge le istruzioni solo quando la tua richiesta corrisponde alla skill, quindi una skill installata non comporta costi finché non viene usata.

In cosa si differenziano le skill IA dai plugin o dai server MCP?

Un plugin o un server MCP fornisce a un modello nuovi strumenti da richiamare: codice che viene eseguito da qualche parte e restituisce un risultato. Una skill IA, invece, fornisce al modello conoscenze e procedure: come affrontare un'attività, quali passaggi seguire e quali caratteristiche deve avere un buon output. Le skill sono semplici istruzioni in Markdown, quindi non richiedono server, chiavi API né ambienti di esecuzione e funzionano con qualsiasi modello.

Elenco completo

Crea subito il tuo spazio di lavoro AI

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇