---
name: tweb-cli
description: Use the installed tweb Agent Web Runtime CLI as a parent agent. Use when an agent needs to start or control a tweb Agent Browser Session, send Task Turns, parse Text Protocol blocks, use slash commands such as /trace, /eval, /screenshot, /html, /human, /interrupt, or /quit, select Persistent Profiles, prepare Manual Mode sessions, or handle tweb errors and artifacts.
---
# tweb CLI
Use this skill to operate the installed `tweb` command as an **Agent Web Runtime**. Assume `tweb` is available on `PATH`, typically from `~/.local/bin/tweb`.
Do not treat `tweb` as a human browser, a Playwright replacement API, or a source-build task. This skill is for using the CLI surface from another agent.
## Mental model
- `tweb` starts an **Agent Browser Session** controlled through stdin/stdout.
- The parent **Agent** sends plain-text **Task Turns** for normal work.
- The **Browser Subagent** performs page-local inspection and actions internally.
- Slash commands are escape hatches for inspection, artifacts, handoff, interruption, and shutdown.
- The **Active Page** persists across completed Task Turns.
- **Turn Memory** does not persist; include needed cross-turn context in follow-up Task Turns.
- One **Agent Browser Session** runs at most one active Task Turn at a time.
## Starting a session
Start from `about:blank`:
```sh
tweb
```
Start with a **Launch URL**:
```sh
tweb https://example.com
```
Use a named **Persistent Profile** when web identity should survive across sessions:
```sh
tweb --profile work https://example.com
```
Use **Manual Mode** to let a human prepare or update a Persistent Profile:
```sh
tweb --manual --profile work
```
## Text Protocol output
`tweb` writes readable XML-style blocks. Parse by block tag, not by line position.
```text
url: https://example.com
```
Block meanings:
- `` means the **Agent Browser Session** can accept Task Turns; it does not mean the page is network-idle.
- `` reports status, URL changes, progress, or uncertainty.
- `` means the current Task Turn is paused and needs parent-agent steering.
- `` completes a Task Turn or slash command.
- `` returns the current **In-Memory Trace** as JSON.
- `` is recoverable unless follow-up output proves otherwise.
- `` means the session cannot continue; start a new session after fixing the cause.
## Sending Task Turns
Send one plain-text instruction per Task Turn:
```text
Find the current pricing for ExampleCo Pro and summarize the plan limits.
```
Good Task Turns:
- State the goal, not browser primitives.
- Include relevant cross-turn context explicitly.
- Ask for compact, source-aware results when evidence matters.
- Let the Browser Subagent decide Page Readiness.
Avoid:
- Micromanaging with click/type/selector steps unless debugging.
- Assuming tabs are part of the public abstraction.
- Starting another Task Turn while one is already running.
If you send plain text while a Task Turn is running, it becomes **Queued Steering**:
```text
Prefer official docs over blog posts.
```
If `` appears, answer with plain text steering to resume the same Task Turn.
## Slash commands
Use slash commands only when you need an explicit escape hatch.
```text
/trace
/eval document.title
/screenshot page.png
/html page.html
/human
/interrupt
/quit
```
Command behavior:
- `/trace` returns a `` block with JSON for the current session.
- `/eval ` evaluates JavaScript in the Active Page and returns an inline ``.
- `/screenshot