Guides

Examples

Real-world use cases showing what you can build with Reduck.


Invoice retrieval from a supplier portal

Automate downloading invoices from a supplier that doesn’t have an API.

import { ReduckClient } from "@reduck-ai/sdk"

const client = new ReduckClient({ apiKey: process.env.REDUCK_API_KEY! })
const devices = await client.listDevices()

const run = client.run(
	`Go to the supplier portal. Log in with the saved credentials.
	Navigate to the invoices section.
	Download all invoices from the last 3 months as PDF.`,
	{ deviceId: devices[0].id }
)

for await (const event of run) {
	if (event.type === "progress") console.log("→", event.text)
	if (event.type === "done") console.log(event.success ? "Invoices downloaded." : "Failed.")
	if (event.type === "failure") console.error("Failed:", event.error)
}

The extension navigates the portal like a human would — handling login pages, pagination, and download buttons. Downloaded files land in Chrome’s default download folder.


Fill a government form

Submit a recurring declaration on a portal with no API.

import { ReduckClient } from "@reduck-ai/sdk"

const client = new ReduckClient({ apiKey: process.env.REDUCK_API_KEY! })
const devices = await client.listDevices()

const run = client.run(
	`Go to the URSSAF portal. Navigate to "Déclarer et payer".
   Fill the monthly declaration with these values:
   - Chiffre d'affaires: 12500
   - Submit the declaration.
   Do NOT confirm the payment — stop before the final validation.`,
	{ deviceId: devices[0].id }
)

for await (const event of run) {
	if (event.type === "progress") console.log("→", event.text)
	if (event.type === "done") console.log(event.success ? "Done." : "Failed.")
}

Note: the prompt explicitly says “stop before final validation” — Reduck follows your instructions literally. You can add safety boundaries in natural language.


Price monitoring across multiple sites

Check prices on several e-commerce sites and collect results.

import { ReduckClient } from "@reduck-ai/sdk"

const SITES = [
	{ url: "https://www.amazon.fr", product: "AirPods Pro 2" },
	{ url: "https://www.fnac.com", product: "AirPods Pro 2" },
	{ url: "https://www.boulanger.com", product: "AirPods Pro 2" },
]

const client = new ReduckClient({ apiKey: process.env.REDUCK_API_KEY! })
const devices = await client.listDevices()
const deviceId = devices[0].id

for (const { url, product } of SITES) {
	const run = client.run(
		`Go to ${url}. Search for '${product}'. Find the current price of the first result.`,
		{ deviceId }
	)
	for await (const event of run) {
		if (event.type === "done") console.log(JSON.stringify({ site: url, product, ...event }))
	}
}

Extract data from a logged-in SaaS

Pull data from a SaaS tool where you have saved credentials in Chrome.

reduck -q "Go to the Pennylane dashboard. Navigate to Invoices > Supplier invoices. \
Filter by date: last month. Export the list as CSV."

Because Reduck uses your real Chrome with your saved sessions, it works with any site you’re already logged into.


Multi-step workflow with human-in-the-loop

Use Reduck from an agent (like Claude Code or a custom agent) as a browser tool.

import { ReduckClient } from "@reduck-ai/sdk"

const client = new ReduckClient({ apiKey: process.env.REDUCK_API_KEY! })
const [device] = await client.listDevices()

// Agent calls this to perform a browser action
async function browserAction(prompt: string) {
	const run = client.run(prompt, { deviceId: device.id })
	let last: unknown
	for await (const event of run) last = event
	return last
}

// Agent decides what to do based on the result
const result = await browserAction(
	"Go to the shipping portal and check the status of order #12345"
)
// Agent processes the result and decides next step

This is the core pattern for building agent-driven browser automation — any AI agent can use Reduck as its “browser hands”.


Batch processing from a script

Run multiple automations sequentially with error handling.

import { ReduckClient } from "@reduck-ai/sdk"

const TASKS = [
	{ prompt: "Download the March invoice", url: "https://provider-a.com" },
	{ prompt: "Check the account balance", url: "https://bank.example.com" },
	{ prompt: "Export the contact list as CSV", url: "https://crm.example.com" },
]

const client = new ReduckClient({ apiKey: process.env.REDUCK_API_KEY! })
const [device] = await client.listDevices()

for (const task of TASKS) {
	try {
		const run = client.run(task.prompt, { deviceId: device.id })
		for await (const event of run) {
			if (event.type === "done") console.log(JSON.stringify({ task: task.prompt, status: event.success ? "ok" : "failed" }))
			if (event.type === "failure") console.log(JSON.stringify({ task: task.prompt, status: "failed", error: event.error }))
		}
	} catch (e) {
		console.log(JSON.stringify({ task: task.prompt, status: "error", error: String(e) }))
	}
}