
Ritoko
io.github.Swihv0.1.1更新于 Oct 4, 2026
Record browser tasks, replay CSV/Excel rows, verify results and resume locally.
概览
让助手录制一次浏览器或 API 任务,保存为可复用工作流,再按 CSV 或 Excel 行批量重放,并校验结果、支持断点续跑。
- 功能
- Ritoko 是面向 AI 助手的本地浏览器自动化与 RPA 服务器。助手可以录制浏览器操作,或编写 HTTP API 与 MCP 工具步骤,保存为可读的 JSON 工作流,其中声明参数、业务主键、提交边界和结果校验规则,然后用新的 CSV 或 Excel 输入重放该工作流。本地 SQLite 日志把每条记录标记为已完成、失败、待复核或已跳过,因此已确认的行在后续运行中会被跳过,结果不确定的写入会被保留待复核。确定性执行引擎运行已保存的工作流时无需调用大模型。
- 适用场景
- 适合有明确规则、结果可验证的重复任务,例如按表格批量录入客户或供应商、定期下载报表、导出渲染后的表格,或批量调用 HTTP API。也适合需要输入格式、逐条识别、成功校验以及中断后恢复的批处理。全新的任务仍需由助手或工作流作者先理解站点并定义流程。
- 运行要求
- 需要 Node.js 24 或更高版本;使用直接执行器的浏览器工作流还需要 Google Chrome。以本地 stdio 进程运行,通常用 npx 启动,也可作为 Claude Code 或 Codex 插件使用。工作流、日志、证据和输出文件默认存放在 ~/.ritoko,可用 RITOKO_HOME 覆盖。确定性执行引擎不需要 API 密钥,推理由客户端助手提供。
安装
在 SourceWeft 中
- 打开 控制台中的 Ritoko,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
Ritoko — reusable automation for AI agents
Solve a task once. Save the procedure. Run it again with new data.
Ritoko is an open-source browser automation and robotic process automation (RPA) tool for AI agents. Turn a solved task into a reusable browser, HTTP API or MCP workflow, run CSV or Excel batches, verify results and resume interrupted work with a local SQLite journal.
Use it as a Claude Code or Codex plugin, a local Model Context Protocol (MCP) server, or a standalone CLI. The direct replay engine runs saved workflows without calling an LLM.
[CI] [npm version] [Node.js 24+] [MIT license]
Quick start · Use cases · How it works · Workflow example · FAQ · Advanced guide
Watch the 34-second demo — real-time execution against a local test application. Kill the process after the fifth submission, resume, then rerun the same CSV: 10 submissions received, 10 unique, one row still awaiting confirmation. Recorded results and environment.
Why use Ritoko?
An agent can figure out how to enter a customer, download a report or call a business tool. A recurring batch also needs an input format, a rule for identifying each record, a success check and a way to recover after interruption.
Ritoko keeps those decisions in a reusable procedure:
- Reuse the work. Save parameters, selectors, API calls and verification rules in a readable JSON workflow.
- Process new data. Feed the procedure another CSV or Excel file instead of explaining the same steps for every row.
- Recover with evidence. See which items finished, failed or have an uncertain outcome. Confirmed items are skipped on later runs; uncertain writes are held for review.
For example: teach your agent to create one customer, save customer-import, then ask it to process next week's spreadsheet and report each result.
What can you automate?
Ritoko fits repeated tasks with explicit rules and verifiable outcomes. A new task still needs an agent or a workflow author to understand the site and define the procedure.
Quick start
1. Install in your agent
Requires Node.js 24 or newer. Browser workflows using the direct runner also need Google Chrome. Standalone HTTP/MCP workflows can run without a browser.
Claude Code
Codex CLI
Restart the client after installation. The Git plugin includes the agent skill and a local MCP server; its launcher installs pinned runtime dependencies on first start, with npm lifecycle scripts disabled.
For long Codex batches, configure the tool-call timeout before running.
Other local MCP clients
Add this stdio server configuration to a client that supports local MCP processes:
This uses the latest published npm release. Git marketplace installs use their Git revision, which may be newer. For repeatable production runs, pin a published version and test upgrades on a small batch.
Also load the Ritoko agent skill if your client supports skills. Claude Code and Codex CLI are the tested plugin clients; other clients need their own compatibility checks. See client setup.
2. Choose the browser or integration
Tell the agent which browser you want it to use. The direct runner connects to personal Chrome after you enable remote debugging at chrome://inspect/#remote-debugging and allow the connection. Choose RITOKO_BROWSER=clean explicitly for a separate profile.
A compatible agent browser can execute host workflows when it permits page-script execution. Codex's current computer-use evaluate is read-only, so it cannot execute host browser replay. Host API-only and connected MCP-tool batches remain available. See browser selection and trust boundaries.
3. Teach one task, then reuse it
Ask your agent:
Record a customer import with Ritoko on this back office. Use the browser I selected. Save it as
customer-importwith aninputspreadsheet parameter. Use Email as the business key and verify the created customer's email.
If the demonstration created a real record, the agent should adopt that already submitted row with run_adopt and evidence before replaying the batch.
Then:
Run
customer-importon the same back office withinputset to the absolute path ofcustomers.csv. Show me the confirmed, failed and review items, plus any saved files.
Later:
Resume my last Ritoko run.
Show the report for my last run and explain which items still need review.
How it works
- Define. The agent records browser actions or writes supported API/MCP steps. The recorder prefers unique labels, roles and other meaningful selectors; fragile positional selectors are flagged.
- Save. The workflow declares its parameters, input, business key, submission boundary (
commit) and result checks (expect). - Replay. The direct engine executes the saved steps. Host mode lets a compatible agent execute supported browser actions or connected tools.
- Journal and recover. SQLite keeps each run's workflow and input rows. A resumed batch uses that snapshot, even if the original spreadsheet changes. A changed page can pause for repair; an uncertain submission stays held for review.
What happens after a failure?
A run is complete only when its items are confirmed or skipped and its final checks pass. A partial result or repair pause is visible in the report and returns CLI exit code 2.
Verification quality matters. A receipt, record ID or matching customer email can prove the intended result. A generic “Success” banner usually cannot. The journal tracks this Ritoko installation; it cannot prevent independent submissions or guarantee that a remote site is idempotent.
What does a workflow look like?
This illustrative browser workflow creates one customer per spreadsheet row. Adapt the URL, labels and result selector to your application before saving it.
key identifies the business record; this example's scope separates destination URLs. Include the account identifier in the scope if several accounts share a URL. The commit marks the irreversible action, and the following expect checks that specific row. Read-only batches declare readOnly: true.
See complete example workflows, the workflow schema and the HTTP/MCP reference.
Use the CLI without an agent
From a Git checkout, the launcher can import and run an existing workflow without an agent or an LLM API key:
The RPA Challenge example downloads its own Excel input. Choose the direct browser as described above before running it. To intentionally run this same challenge again, add --repeat; review holds remain blocked.
For an interrupted direct run, use node bin/ritoko.mjs resume <runId>. Workflows, journals, evidence and output files live in ~/.ritoko by default; override with RITOKO_HOME.
Evidence and current scope
The recorded demos used Ritoko 0.1.0 on Windows with headless Chrome. The RPA site's timer excludes installation and setup; the recorded CLI wall time was 3.559 s. RPA Challenge has no per-row receipt, so its example relies on the final score. These demonstrations and controlled tests do not establish a reliability rate or throughput for every website.
View the live RPA Challenge result
FAQ
Do I need a separate LLM API key?
Ritoko's deterministic runner does not require one. When you use the plugin, your client agent supplies the reasoning through its existing subscription or API configuration. Recording, repairing and host orchestration still use that client. External APIs, OCR providers or paid generation services require their own access and may charge separately.
Does Ritoko read invoices or perform OCR?
Document reading is optional. document_image returns a downloaded JPEG/PNG to the client agent for its model to read. Ritoko includes no local OCR engine or invoice parser. A chosen external OCR service uses user-configured credentials. Each new image still needs the agent or that service; ordinary browser and API replay does not.
Can Ritoko use my logged-in browser?
The direct runner can connect to personal Chrome with your remote-debugging permission. You can explicitly choose a separate clean profile. Integrated browser support depends on the client's permitted actions; see driver limits. Complete login or MFA in the selected browser when needed.
Can I use Ritoko with any MCP client?
A local client that can launch a stdio process can connect to the server. Claude Code and Codex CLI are the tested plugin clients. Other clients need configuration and capability checks. An isolated cloud client cannot access your local MCP process or files without a separate connection mechanism.
Does Ritoko guarantee no duplicate writes?
No. It skips confirmed items and blocks uncertain writes within its journal, including on future runs. The workflow needs the correct business key, destination scope and result checks. Independent submissions and remote system behavior remain outside that journal. Resolving a review item requires evidence about what actually happened.
Can a browser recording become an API workflow?
Optional network capture provides fetch/XHR metadata to help the agent investigate an API. It does not convert recordings into executable API steps automatically. Verify the API contract and authentication, test an authorized row, then explicitly save the replacement. See network hints.
Documentation and contributing
- Advanced usage: client configuration, CLI, browser choices, host batches, recovery and workflow rules.
- Agent skill: instructions for recording, running, adopting and repairing workflows.
- Integration reference: input formats, HTTP/MCP step shapes and driver limits.
- Release gates: required checks, validation roadmap, publishing and update policies.
- Report a bug or request a feature: include the client, Node/browser/OS versions and a redacted reproduction. Keep credentials and business data private.
For development, use Node.js 24+ and pnpm:
Ritoko automates services you are authorized to use. It does not bypass CAPTCHAs or anti-bot protections. Workflows and API/MCP commands are executable configuration and require a trusted author.
Built by Swih with Claude (Anthropic) and Codex (OpenAI), credited as contributors in the Git history. Released under the MIT license.
来源:README.md,提交 1daf6eb
工具
0版本历史
1- v0.1.1最新Oct 4, 2026
