Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions src/content/reference/cli/agent.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ usage: lightpanda agent [SCRIPT] [OPTIONS] [COMMON_OPTIONS]

Arguments:
[SCRIPT]
Optional path to a .js script. Runs the script (no LLM calls) and
exits; `lightpanda run SCRIPT` is the preferred spelling. With no
script and no --task, the REPL starts; from there /load runs a
script and /save exports the session to a file.
Optional path to a .js script, or `-` for stdin. Runs the script
(no LLM calls) and exits; `lightpanda run SCRIPT` is the preferred
spelling. With no script and no --task, the REPL starts; from
there /load runs a script and /save exports the session to a file.
Caution: .js files can contain evaluate(...) calls that run
arbitrary JavaScript in the page. Only run scripts you trust, the
same way you would a shell script.
Expand Down Expand Up @@ -91,12 +91,22 @@ Options:
it to PATH, instead of printing the answer. Replay it later with
`run PATH` (no LLM calls). Overwrites PATH if it exists.
Requires --task.
--search-engine <ENGINE>
Which web search API the `search` tool uses. Default: auto,
which takes the first with a key in the environment, in the
order brave, tavily, exa, keenable. `keenable` also works with
no key at all, through a rate-limited public endpoint.
Allowed values: auto, brave, tavily, exa, keenable.
--system-prompt <STRING>
Override the default system prompt.
--task <STRING>
One-shot mode: run a single user turn, print the final answer
to stdout, and exit. Conflicts with the positional script. With
--save, the answer is suppressed and a script is written instead.
--url <URL>
Open this page before the first turn. With --task it saves the
model a turn spent navigating; with --save the opening
navigation is the first line of the script.
--verbosity <LEVEL>
Stderr chatter level. Default: high when --task captures stderr
to a pipe or file; low otherwise. low/medium also raise
Expand Down
12 changes: 8 additions & 4 deletions src/content/reference/cli/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Every command also accepts a shared set of [common options](/reference/cli/commo

## help

Show the command list above, or `lightpanda help <command>` for one command's own reference.
Show the command list above, or `lightpanda help <command>` for one command's own reference. `--help` and `-h` work too, at the top level or after any command.

```sh copy
lightpanda help [command]
Expand All @@ -44,13 +44,17 @@ lightpanda run script.js
```

```console
usage: lightpanda run <SCRIPT> [COMMON_OPTIONS]
usage: lightpanda run <SCRIPT | -> [COMMON_OPTIONS]

Examples:
lightpanda run script.js (replay a saved script)
cat script.js | lightpanda run - (read the script from stdin)

Arguments:
<SCRIPT>
Path to a .js script to run, then exit. Produce one with
`lightpanda agent --task "..." --save script.js`, or `/save` from
the agent REPL.
`lightpanda agent --task "..." --save script.js`, or `/save` from the
agent REPL. Pass `-` to read the script from stdin instead.
Caution: .js files can contain evaluate(...) calls that run
arbitrary JavaScript in the page. Only run scripts you trust, the
same way you would a shell script.
Expand Down
5 changes: 3 additions & 2 deletions src/content/usage/agent.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,9 @@ than a V8 stack trace.

### Web search

`/searchEngine <engine>` sets the backend the agent's web search runs
against: `auto` (the default), `brave`, `tavily`, `exa`, or `keenable`.
Set the backend the agent's web search runs against with the CLI option
`--search-engine` or the REPL command `/searchEngine`: `auto` (the default),
`brave`, `tavily`, `exa`, or `keenable`.
The choice is saved per-directory in `.lp-agent.zon`.

An API key is optional. `auto` falls back to Keenable's keyless public
Expand Down
Loading