@agentrq/agentrq-ws

中文文档
0.15.7发布于 2026/11/05Apache-2.0ES Module零依赖构建来源已验证近 30 天下载 4198

AgentRQ workspace client — drive an AgentRQ workspace from the command line, using the workspace's own .mcp.json

原始使用文档
文档目录10 节
  1. Why it exists
  2. Install
  3. Commands
  4. Attachments never become your problem
  5. Long text
  6. Asking the human something
  7. Output
  8. Choosing a server
  9. Development
  10. License

@agentrq/agentrq-ws

The AgentRQ workspace client: everything an agent can do in a workspace, from a shell, without spending an agent's tokens to do it.

npx -y @agentrq/agentrq-ws@latest help

It reads the .mcp.json in the current directory — the same file the agent working there uses — so inside a workspace checkout there is nothing to configure.

cd ~/code/my-workspace
npx -y @agentrq/agentrq-ws@latest workspace

Why it exists

An agent talks to its workspace over MCP, which is the right shape for an agent and the wrong shape for a person: every call is a JSON envelope, and every answer is tokens the agent pays for. The same seven tools are underneath this CLI, but a command is a line of shell and the answer is plain text.

It is also the difference between reading an attachment and handling one — see below.

Install

Nothing to install: npx -y @agentrq/agentrq-ws@latest <command> fetches it on demand, and it has no runtime dependencies. To keep it around:

npm install -g @agentrq/agentrq-ws
agentrq-ws help

Node 20.6 or newer.

Commands

CommandWhat it does
workspaceShow the workspace title and mission
task get <taskId>Fetch a task, with --conversation for its history
task nextTake the next not-started task — this dequeues the queue
task create <title>Create a task, with --clear-context to send /clear to the agent first
task status <taskId> <status>Set a task's status
task help [action]The server's help for its task tool: every action, or one action's payload
reply <taskId> <text>Send a message to a task
attachment get <id> --task <taskId>Download an attachment to a file
memory load [name]Read a workspace memory (defaults to the index)
memory save [name] --content …Replace a workspace memory
memory delete [name]Delete a workspace memory
skill search [q]Find the skills this workspace can use, by name or description; --limit/--offset page
skill load <uri>Read a skill file (skill://<name> reads its SKILL.md)
skill save <uri> --content …Replace a file of one of this workspace's skills
skill delete <uri>Take a skill out of this workspace (skill://<name>), deleting it when no other workspace uses it, or delete one of its files
pano save [id --version N] --title … --markdown …Create a Pano doc, or replace one, and print its id and version; replacing needs the --version you read and is refused if the doc changed since; --file sends a file the markdown links, --ttl-days and --color set its life and post-it
pano edit <id> --version N …Change part of a doc without resending it: --replace TEXT --with TEXT (the text must occur once), --append TEXT, or --ops as a JSON array; the ops apply all or none. Prints the id and new version
pano read <id>Read a Pano doc (its version included), --comments/--attachments adding those; --out DIR writes its markdown and downloads its files instead, printing its version and their paths
pano comment <id> <text>Comment on a Pano doc
pano attach <id> --file PATH…Attach files to a Pano doc; they need no link
pano delete <id>Delete a Pano doc
pano help [action]The server's help for its pano tool: every action, or one action's payload
event publish <name>Publish a named event
ask <taskId> <message>Ask the human a question and wait
site-tools [q]List the websites shared with this workspace from the Chrome extension, and their tools' names and descriptions; q ranks the tools, --pattern filters them by a regular expression, --limit/--offset page
site-tool <site> <tool>Show one shared website's tool in full, with its input schema
call-site-tool <site> <tool> --task <taskId>Run a shared website's tool in the human's Chrome, with --args '{…}'
toolsList the tools this workspace server offers
tools help [tool|tool.action]The server's help: every tool, one tool's actions, or one action's payload with an example
call <tool> --args '{…}'Call any tool directly

Every command takes --help, and so does every family:

agentrq-ws task --help          # lists task get / next / create / status / help
agentrq-ws attachment get -h    # the one command, its options and defaults

task next is a separate verb rather than a bare task get on purpose: it claims work, and a command that mutates the queue should say so in its name.

Attachments never become your problem

The underlying tools speak base64 in both directions. This CLI does not.

Uploading takes a path. The filename, media type and encoding are worked out for you:

agentrq-ws reply 0isnjTCkpW5 "Build is green — log attached" --attach ./run.log
agentrq-ws task create "Review the design" --body @brief.md --attach ./mock.png

Downloading writes a file and prints where it went. With no --out it lands in the OS temp directory:

$ agentrq-ws attachment get 0isp9dJxr85 --task 0isnjTCkpW5
/tmp/agentrq-ws-help.txt

--out takes a directory (keeping the attachment's own name) or a full path (renaming it):

agentrq-ws attachment get 0isp9dJxr85 --task 0isnjTCkpW5 --out ~/Downloads
agentrq-ws attachment get 0isp9dJxr85 --task 0isnjTCkpW5 --out ./report.pdf

The --task is needed because an attachment belongs to a task. The CLI asks for the attachment's public link, downloads it, and saves the file under the name a human gave it; an older attachment with no link arrives the same way, from its content.

Long text

Anywhere prose is expected — --body, --content, --payload, and a reply's text — @path reads a file and - reads stdin:

agentrq-ws task create "Post-mortem" --body @notes.md
git log --oneline -20 | agentrq-ws reply 0isnjTCkpW5 -
agentrq-ws memory save release-notes.md --content @CHANGELOG.md

Asking the human something

# a form
agentrq-ws ask 0isnjTCkpW5 "Which branch should I release from?" \
  --field branch:string:"Branch name" --field sign:boolean:"Sign the tag?"

# or a link to go and do something
agentrq-ws ask 0isnjTCkpW5 "Approve the deploy, then confirm" --url https://example.com/approve

Both block until the human answers or the timeout elapses (--timeout, one hour by default and at most).

Output

Commands print the server's text. --json prints the raw result instead, for piping into jq:

agentrq-ws tools --json | jq -r '.[].name'

Failures print one line and exit non-zero. A stack trace means a bug in the CLI, not a mistake in the command.

Choosing a server

The nearest .mcp.json at or above the working directory is used. When it defines several servers, name one:

agentrq-ws workspace --server agentrq-workspace
agentrq-ws workspace --config ../other/.mcp.json
VariableEffect
AGENTRQ_WS_URLUse this server URL and ignore .mcp.json entirely
AGENTRQ_WS_SERVERWhich server in .mcp.json to use

Development

cd cli/agentrq-ws
npm test                  # 147 tests, no network
npm run test:coverage

The tests drive the whole path — argv, config loading, the MCP handshake, SSE framing, files on disk — with only the socket replaced.

License

Apache-2.0

版本与发布记录

@agentrq/agentrq-ws 共发布 57 个版本,首次发布于 2026/09/17;过去 12 个月发布了 57 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.15.7latest2026/11/051 天前
0.15.62026/11/051 天前
0.15.52026/11/041 天前
0.15.42026/11/042 天前
0.15.32026/11/024 天前
0.15.22026/11/015 天前

关于 @agentrq/agentrq-ws 的常见问题

@agentrq/agentrq-ws 是什么?

AgentRQ workspace client — drive an AgentRQ workspace from the command line, using the workspace's own .mcp.json

如何安装 @agentrq/agentrq-ws?

在项目目录运行 npm install @agentrq/agentrq-ws,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 agentrq-ws,可以用 npx agentrq-ws 直接运行。

@agentrq/agentrq-ws 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/agentrq__agentrq-ws 是否存在。

@agentrq/agentrq-ws 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@agentrq/agentrq-ws 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=20.6.0。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@agentrq/agentrq-ws 可以商用吗?

@agentrq/agentrq-ws 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@agentrq/agentrq-ws 的下载量有多少?

根据 npm 官方下载统计,@agentrq/agentrq-ws 在 2026/10/05 – 2026/11/03 这 30 天内被下载 4,198 次,日均约 140 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@agentrq/agentrq-ws 还在维护吗?

最新版本 0.15.7 发布于 2026/11/05(1 天前);至今共发布 57 个版本,其中过去 12 个月发布了 57 个;首次发布于 2026/09/17。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。