Logo de Browser4 Experience

Browser4 Experience

ComunidadePopular
platonai
browser4-experience

Use experience_save to persist task traces, experience_query to recall them on revisit, and experience_list to inspect stored knowledge. Reuses selectors, extraction patterns, and blocker awareness across sessions.

Visão geral

Publicado porplatonai
RepositórioBrowser4
Nome da habilidadebrowser4-experience
Estrelas
1.2K
Forks
152
Arquivos incluídos
Somente instruções
LicençaApache-2.0
Links
  • Instruções em Markdown

    Um arquivo SKILL.md que o modelo carrega sob demanda, consumindo tokens apenas quando uma solicitação é realmente relevante para a habilidade.

  • Funciona com qualquer LLM

    Habilidades de IA são Markdown simples, não código específico de um provedor, por isso funcionam com GPT, Claude, Gemini, Grok ou um modelo local.

  • Completa em si mesma

    Tudo de que o modelo precisa está nas instruções — sem arquivos extras para sincronizar.

  • Código aberto

    Publicada por platonai no GitHub. Leia o conteúdo-fonte antes de instalar.

Instalação

Instale a habilidade de IA Browser4 Experience no TypingMind para usá-la com qualquer LLM ou adicione-a a outro agente que leia SKILL.md.

1

Instalar no TypingMind

O TypingMind instala uma habilidade diretamente da pasta dela no GitHub — lê o arquivo SKILL.md, reúne os arquivos de recursos em um pacote e armazena o resultado localmente.

  1. Abra o app e vá para Plugins → Habilidades.
  2. Escolha "Instalar do GitHub".
  3. Cole a URL da pasta da habilidade exibida abaixo e confirme.
    https://github.com/platonai/Browser4/tree/main/skills/browser4-experience
  4. Ative a habilidade em cada chat em que quiser disponibilizá-la.
Plugins → Habilidades → Nova habilidade → Via URL GitHub, depois cole a URL da pasta e pressione Continuar.
2

Instalar em outro agente

Qualquer agente que leia o formato Agent Skills pode usar esta habilidade — copie a pasta para o diretório de habilidades desse agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/platonai/Browser4.git /tmp/Browser4
mkdir -p .claude/skills
cp -r /tmp/Browser4/skills/browser4-experience .claude/skills/browser4-experience
Reinicie Claude Code após copiar para que a nova habilidade seja reconhecida.

Use no TypingMind

Ative Browser4 Experience em qualquer chat do TypingMind e o modelo cuida do resto. O nome e a descrição da habilidade ficam no prompt do sistema e, assim que uma solicitação relevante aparece, o modelo carrega as instruções completas automaticamente — sem precisar de acionamento manual e sem consumir tokens até que ela seja realmente usada.

O modelo carrega Browser4 Experience automaticamente assim que uma solicitação é relevante para essa habilidade.

Funciona com qualquer modelo de IA

Habilidades de IA são instruções em Markdown simples, não código específico de um provedor. Por isso, Browser4 Experience não fica vinculada ao modelo para o qual foi criada. Instale-a uma vez no TypingMind e use-a com GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama ou um modelo local executado por conta própria — tudo com suas próprias chaves de API.

  • Carregada apenas quando necessário

    O prompt do sistema contém apenas o nome e a descrição. As instruções são buscadas na primeira solicitação relevante, então uma habilidade sem uso não gera custo.

  • Troque de modelo durante a conversa

    Como a habilidade é composta de instruções, não de código, trocar de modelo não afeta seu funcionamento — o próximo modelo lê o mesmo arquivo SKILL.md.

Instruções da habilidade

Este é o conteúdo de SKILL.md que o modelo carrega. Leia antes de instalar — uma habilidade é um conjunto de instruções que seu modelo seguirá.

Progressive Experience Memory (PEM)

The PEM system makes Browser4 progressively smarter: each successfully completed task deposits reusable knowledge so that future tasks — identical, similar, or on similar sites — complete faster with fewer steps.

1. Core Loop

Before task ──▶ experience_query ──▶ Get stored selectors, steps, blockers
    │                                      │
    ▼                                      ▼
Execute task                        P1: Replay directly
    │                               P2: Verify then replay
    ▼                               P3: Hint mode (verify all)
After task  ──▶ experience_save ──▶ P4: Advisory only
                                      P5: Cold start (no knowledge)

Copy-Paste Template

The experience tools are MCP tools called by the agent during browser4-cli agent run. The agent should call them as part of its tool set:

bash
# Before starting a task — the agent calls experience_query to check prior knowledge
# After completing a task — the agent calls experience_save to persist what it learned
browser4-cli agent run "Go to https://amazon.com/dp/test and extract product details"

# To inspect stored knowledge, the agent calls experience_list
browser4-cli agent run "List experience knowledge entries for amazon"

2. Key Concepts

  • Knowledge store — a local directory tree of memory artifacts (tasks, traces, index); the store layout is described in section 8.
  • experience_save — persist a completed task's trace (selectors, steps, blockers) into the store.
  • experience_query — retrieve relevant past traces before starting a new task; returns a replay tier P1-P5.
  • experience_list — inspect what is stored, filtered by domain or intent.
  • Replay tiers — P1 (replay directly) → P5 (cold start), the confidence ladder used by the Decision Tree in section 4.

3. Command Map

experience_save

Persists a task execution trace to the knowledge store.

ArgumentRequiredDescription
urlYesThe URL the task operated on
traceYesJSON-encoded ExecutionTrace (steps, selectors, extraction results)
outcomeNo"success" (default) or "failure"
task_typeNoCanonical task type (e.g., extract_product_list, publish_post)
intentNoFree-text description of what the task was trying to do
factsNoRetrospective knowledge patch (inline JSON, or @file.json through the CLI): selectors / interaction_hints / known_blockers / anti_patterns (camelCase and snake_case keys both accepted), merged into the (domain, intent) facts entry — the writer path for lessons learned. Refused when the entry is VERIFIED (immutable); the response then reports facts_rejected

Success path: Knowledge promoted with initial confidence 0.50. Subsequent verified successes raise confidence. Failure path: Negative evidence recorded (failure category classified from the trace). Failed selectors are not automatically turned into anti-patterns — record lessons explicitly with facts (e.g. anti_patterns) via experience_save --facts (or the facts argument), or let experience_deep_learn promote knowledge later. Response: the save result includes facts_merged, facts_status, facts_rejected, and facts_message when facts was supplied.

experience_query

Queries stored knowledge before starting a task.

ArgumentRequiredDescription
urlYesThe target URL
intentNoFree-text intent description

Returns: JSON with tier, confidence, primary_selectors, extraction_query, known_blockers, warnings, steps.

experience_list

Lists stored knowledge entries (diagnostic/debug tool).

ArgumentRequiredDescription
filterNoFilter by domain (partial match)
intent_filterNoFilter by intent (partial match)
pageNoPage number (default 1)
page_sizeNoResults per page (default 20, max 100)

4. Decision Trees

Starting a new task?
├─ experience_query returns P1 (confidence ≥ 0.85)?
│  → Replay stored steps directly. Selectors verified by existence check only.
├─ experience_query returns P2 (confidence 0.60–0.84)?
│  → Use stored selectors as primary candidates. Verify each before use.
├─ experience_query returns P3 (confidence 0.40–0.59)?
│  → Use stored knowledge as hints. Run full discovery for any failed selector.
├─ experience_query returns P4/P5 (confidence < 0.40, or cold start)?
│  → Full discovery mode. Run htmlsnapshot inspect, discover selectors fresh.
│  → Call experience_save after success to bootstrap knowledge.
└─ Always call experience_save after task completion (success or failure).
   → Success path: stores selectors, steps, extraction patterns.
   → Failure path: records negative evidence (what broke, why).

5. Retrieval Tiers

TierConfidenceBehavior
P1 Direct replay≥ 0.85Steps executed without verification. Selectors used as-is.
P2 Verify-before-replay0.60–0.84Each selector validated via htmlsnapshot get before use.
P3 Hint mode0.40–0.59Playbook provides suggestions but full discovery runs.
P4 Advisory< 0.40Knowledge surfaced as suggestion only. Full discovery required.
P5 Cold startNo dataNo prior knowledge. Full exploration.

6. Critical Warnings

Note: The automatic engine hook is live (since 2026-08-24): RobustBrowserAgent auto-deposits completed/failed tasks into the knowledge store (MemoryConsolidator → PEM fusion) and auto-injects recalled knowledge into the run-start ## Memory section. Calling experience_save yourself is still supported for richer traces and diagnostics, but forgetting it no longer loses knowledge.

Where the knowledge lives: the store root is the knowledge.dir JVM system property, defaulting to a knowledge/ directory relative to the backend process's working directory (traces/, experience/, facts/). The engine's auto-deposit and these tools resolve the same property, so one -Dknowledge.dir=<path> relocates the whole knowledge base; when the CLI starts the backend, pass it as BROWSER4_SERVER_OPTS="-Dknowledge.dir=<path>". See config.md and experience-memory.md.

experience_save

Persists a task execution trace to the knowledge store.

ArgumentRequiredDescription
urlYesThe URL the task operated on
traceYesJSON-encoded ExecutionTrace (steps, selectors, extraction results)
outcomeNo"success" (default) or "failure"
task_typeNoCanonical task type (e.g., extract_product_list, publish_post)
intentNoFree-text description of what the task was trying to do
factsNoRetrospective knowledge patch (inline JSON, or @file.json through the CLI): selectors / interaction_hints / known_blockers / anti_patterns (camelCase and snake_case keys both accepted), merged into the (domain, intent) facts entry — the writer path for lessons learned. Refused when the entry is VERIFIED (immutable); the response then reports facts_rejected

Success path: Knowledge promoted with initial confidence 0.50. Subsequent verified successes raise confidence. Failure path: Negative evidence recorded (failure category classified from the trace). Failed selectors are not automatically turned into anti-patterns — record lessons explicitly with facts (e.g. anti_patterns) via experience_save --facts (or the facts argument), or let experience_deep_learn promote knowledge later. Response: the save result includes facts_merged, facts_status, facts_rejected, and facts_message when facts was supplied.

Recording a lesson with facts: a lesson (a selector that broke, a blocker, an anti-pattern) can be recorded immediately after the task — no need to wait for deep_learn:

text
# MCP tool form
experience_save(url="<target-url>", trace="<execution trace JSON>", outcome="success",
                intent="extract product details", task_type="extract_product_list",
                facts='{"interaction_hints":["open the price popover before reading"],
                        "anti_patterns":["clicking the thumbnail before the modal loads"]}')

# CLI equivalent — trace is inline JSON; --facts accepts inline JSON or @file.json
browser4-cli experience save "https://example.com/products" '<trace-json>' --facts @lessons.json

experience_query

Queries stored knowledge before starting a task.

ArgumentRequiredDescription
urlYesThe target URL
intentNoFree-text intent description

Returns: JSON with tier, confidence, primary_selectors, extraction_query, known_blockers, warnings, steps.

experience_list

Lists stored knowledge entries (diagnostic/debug tool).

ArgumentRequiredDescription
filterNoFilter by domain (partial match)
intent_filterNoFilter by intent (partial match)
pageNoPage number (default 1)
page_sizeNoResults per page (default 20, max 100)

Warning: experience_query before open_session is supported — it operates on the file system, not the browser. Use it to plan your task before launching Chrome.

Warning: Knowledge stored for one URL pattern (e.g., /dp/*) is not automatically available for a different pattern (e.g., /s?k=*). The query matches by URL pattern specificity.

Note: The knowledge store is file-backed YAML under knowledge/, resolved relative to the backend process working directory (there is no knowledge.dir config option to relocate it). The store is safe to version with git. Raw traces (under knowledge/traces/<domain>/) are ephemeral (30-day TTL) and not versioned; facts entries (knowledge/facts/<domain>/<intent>.yaml) are immutable once VERIFIED.

7. Quick Patterns

Before a task — query prior knowledge

The store is file-level YAML per (domain, intent) — no per-site blob files:

knowledge/                          ← root: relative to the backend process CWD
├── traces/<domain>/                ← TraceRecords (immutable, 30-day TTL)
├── experience/<domain>/            ← ExperienceStats (mutable; confidence source)
└── facts/<domain>/                 ← KnowledgeFacts — one <intent>.yaml per (domain, intent)
                                      (VERIFIED entries are immutable; merge is refused)
text
experience_query(url="<target-url>", intent="extract product details")

After a task — save what you learned

text
# MCP tool form — trace (JSON) is required; facts patches knowledge onto the (domain, intent) entry
experience_save(url="<target-url>", trace="<execution trace JSON>", outcome="success",
                intent="extract product details", task_type="extract_product_list",
                facts='{"interaction_hints":["open the price popover before reading"],
                        "anti_patterns":["clicking the thumbnail before the modal loads"]}')

# CLI equivalent — trace is inline JSON; --facts accepts inline JSON or @file.json
browser4-cli experience save "https://example.com/products" '<trace-json>' --facts @lessons.json

A lesson (selector that broke, a blocker, an anti-pattern) can be recorded immediately after the task with --facts — no need to wait for deep_learn.

Inspect the store

text
experience_list(filter="amazon")

8. Knowledge Store Layout

The store is file-level YAML per (domain, intent) — no per-site blob files:

knowledge/                          ← root: relative to the backend process CWD
├── traces/<domain>/                ← TraceRecords (immutable, 30-day TTL)
├── experience/<domain>/            ← ExperienceStats (mutable; confidence source)
└── facts/<domain>/                 ← KnowledgeFacts — one <intent>.yaml per (domain, intent)
                                      (VERIFIED entries are immutable; merge is refused)

8. Reference Map

Perguntas frequentes

O que a habilidade de IA Browser4 Experience faz?

Use experience_save to persist task traces, experience_query to recall them on revisit, and experience_list to inspect stored knowledge. Reuses selectors, extraction patterns, and blocker awareness across sessions.

Por que usar Browser4 Experience no TypingMind?

Porque basta instalar uma vez para usar com qualquer modelo. Browser4 Experience é escrito em Markdown simples, e não em código específico de um provedor, então a mesma habilidade funciona com GPT-5, Claude, Gemini, Grok ou um modelo local — e é possível trocar de modelo no meio do chat sem que ela deixe de funcionar. O TypingMind usa suas próprias chaves de API, então o pagamento é feito diretamente aos provedores, em vez de uma assinatura por licença de usuário, e suas habilidades e chats permanecem no seu próprio armazenamento.

Como instalar Browser4 Experience no TypingMind?

Abra Plugins → Habilidades → Instalar do GitHub no TypingMind e cole https://github.com/platonai/Browser4/tree/main/skills/browser4-experience. O TypingMind lê o arquivo SKILL.md e instala a habilidade para que possa ser ativada em cada chat.

Quais modelos de IA podem usar Browser4 Experience?

Qualquer modelo conectado no TypingMind. As habilidades de IA são instruções em Markdown simples, e não código específico de um provedor. Assim, GPT, Claude, Gemini, Grok e modelos locais podem carregar esta habilidade quando uma solicitação corresponder a ela.

Quantos modelos de IA posso usar com Browser4 Experience?

Quantos quiser. Desde que o modelo ofereça suporte a habilidades, é possível usar Browser4 Experience com ele — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e outros — tudo no TypingMind com suas próprias chaves de API.

A habilidade de IA Browser4 Experience é gratuita?

Sim. A habilidade é publicada no GitHub por platonai sob a licença Apache-2.0. O pagamento é feito apenas ao seu provedor de IA pelos tokens usados.

O que são habilidades de IA?

Uma habilidade de IA é um conjunto reutilizável de instruções que ensina um modelo de IA a realizar uma tarefa específica. Ela segue o formato aberto Agent Skills: um arquivo SKILL.md com nome e descrição, além de scripts, modelos de documento ou arquivos de referência de que o modelo possa precisar. O modelo lê as instruções apenas quando sua solicitação corresponde à habilidade, então uma habilidade instalada não gera custos até ser usada.

Qual é a diferença entre habilidades de IA e plugins ou servidores MCP?

Um plugin ou servidor MCP oferece ao modelo novas ferramentas para chamar — código que é executado em algum lugar e retorna um resultado. Já uma habilidade de IA fornece conhecimento e um processo ao modelo: como abordar uma tarefa, quais etapas seguir e como deve ser um bom resultado. As habilidades são escritas em Markdown simples, por isso não precisam de servidor, chave de API nem ambiente de execução, e funcionam com qualquer modelo.

Ver todos

Crie seu próprio espaço de IA agora

Inscreva-se na nossa newsletter para receber novidades sobre recursos e futuros sorteios 👇