Ritoko

io.github.Swihv0.1.1Updated Oct 4, 2026

Record browser tasks, replay CSV/Excel rows, verify results and resume locally.

Overview

AI-generated overview

Lets an assistant record a browser or API task once, save it as a reusable workflow, and replay it over CSV or Excel rows with verification and resume.

What it does
Ritoko is a local browser automation and RPA server for AI agents. An agent records browser actions or authors HTTP API and MCP tool steps, saves them as a readable JSON workflow with parameters, a business key, a commit boundary and result checks, then replays that workflow against new CSV or Excel input. A local SQLite journal tracks each item as done, failed, review or skipped, so confirmed rows are skipped on later runs and uncertain writes are held for review. A deterministic runner executes saved workflows without calling an LLM.
When to use it
Use it for repeated, rule-based tasks with verifiable outcomes, such as onboarding records from a spreadsheet, downloading recurring reports, exporting rendered tables, or batching HTTP API calls. It suits batches that need an input format, per-record identification, a success check and recovery after interruption. A brand-new task still needs an agent or workflow author to define the procedure first.
Requirements
Node.js 24 or newer; browser workflows using the direct runner also need Google Chrome. Runs as a local stdio process, typically launched with npx, or as a Claude Code or Codex plugin. Workflows, journals, evidence and output files live in ~/.ritoko by default, overridable with RITOKO_HOME. No API key is required for the deterministic runner; the client agent supplies reasoning.
Before you install
The direct runner can connect to personal Chrome with remote-debugging permission, so it may act inside a logged-in session; a separate clean profile can be selected instead. Workflows can submit, send and write data, and the commit step marks irreversible actions. Duplicate writes are not guaranteed to be prevented: the journal only covers this installation, and independent submissions or remote system behavior remain outside it. Review items need evidence about what actually happened…

Installation

In SourceWeft

  1. Open Ritoko in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

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

[Ritoko crash-and-resume demo: a local customer batch reaches 10 unique submissions, while one uncertain row remains held for review.]

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?

TaskInputWhat the workflow does
Customer or supplier onboardingCSV / Excel rowsFill forms, submit each record and check its identifying details
Recurring report downloadsAccount and period parametersOpen the report, wait for it and save the downloaded file
Back-office data exportsAn HTML or ARIA tableExtract the rendered table to CSV for a later batch
HTTP API operationsRows, parameters and environment-backed credentialsSend requests, check status and JSON results, save response files
Existing MCP toolsRows and tool argumentsCall tools and check their returned data under the same journal rules
Mixed browser and API tasksA spreadsheet plus workflow parametersPass saved values and files between supported browser, HTTP and MCP steps

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

bash
claude plugin marketplace add Swih/ritokoclaude plugin install ritoko@ritoko

Codex CLI

bash
codex plugin marketplace add Swih/ritokocodex plugin add ritoko@ritoko

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:

json
{  "mcpServers": {    "ritoko": {      "command": "npx",      "args": ["--yes", "--prefer-online", "ritoko@latest", "mcp"]    }  }}

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-import with an input spreadsheet 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-import on the same back office with input set to the absolute path of customers.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

mermaid
flowchart LR    A["Describe a task"] --> B["Agent records or authors it"]    B --> C["Save a JSON workflow"]    C --> D["Replay with new data"]    D --> E["Journal and verify each item"]    E --> F["Report results and review holds"]
  1. 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.
  2. Save. The workflow declares its parameters, input, business key, submission boundary (commit) and result checks (expect).
  3. Replay. The direct engine executes the saved steps. Host mode lets a compatible agent execute supported browser actions or connected tools.
  4. 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?

Item statusMeaningNext action
doneThe workflow's checks passedKept on resume; normally skipped in a later run
failedFailed before submissionRetry safe failures when resuming; conflicting data is blocked
reviewThe write may have happenedCheck the actual business result and resolve with evidence
skippedAlready confirmed under the same workflow, scope and keyNo new submission

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.

json
{  "name": "customer-import",  "version": 1,  "description": "Create customers and verify their email.",  "params": {    "base": { "description": "Back-office base URL" },    "input": { "description": "Absolute CSV or XLSX path" }  },  "items": {    "from": "{{param.input}}",    "key": "{{item.Email}}",    "scope": "{{param.base}}"  },  "item": [    {      "do": "goto",      "url": "{{param.base}}/customers/new"    },    {      "do": "fill",      "target": { "primary": { "by": "label", "text": "Email" } },      "value": "{{item.Email}}"    },    {      "do": "click",      "target": {        "primary": { "by": "role", "role": "button", "name": "Create customer" }      },      "commit": true    },    {      "do": "expect",      "target": { "primary": { "by": "testid", "id": "customer-email" } },      "text": "{{item.Email}}"    }  ]}

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:

bash
git clone https://github.com/Swih/ritoko.gitcd ritokonode bin/ritoko.mjs import examples/rpa-challenge.jsonnode bin/ritoko.mjs run rpa-challengenode bin/ritoko.mjs report

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

ValidationObserved resultEvidence
Live RPA Challenge10 rows, 70/70 fields, 100% score; site timer 1.735 sScreenshot, workflow
Local crash-and-resume demoProcess killed after submission 5; 10 unique submissions after recovery; 9 confirmed, 1 held for reviewVideo, recorded facts
Automated checksUnit tests and real-Chrome E2E jobs configured for Windows, Linux and macOSCI workflow and runs, release gates

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

[RPA Challenge result: 100% success, 70 out of 70 fields entered across 10 changing forms, with a site-reported time of 1735 milliseconds.]

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:

bash
pnpm installpnpm checkpnpm testpnpm buildpnpm test:e2e

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.

Source: README.md at commit 1daf6eb

Tools

0
Tool metadata has not been indexed yet.

Version history

1
  1. v0.1.1LatestOct 4, 2026