原文
const companySchema = z.array(
z.object({
name: z.string(),
location: z.string(),
}),
);
await webTasks.run({
task: "Scrape YC companies. Return name, batch, description, and URL.",
startUrl: "https://www.ycombinator.com/companies",
parameters: { batch: "S24" },
outputSchema: companySchema,
reuseKey: "yc_companies_scraper",
});
// ✓ created skill yc_companies_scraper
// ✓ wrote reusable helpers
// ✓ returned 247 companies · 6m 12s · $0.84 AI + 0.10 compute hrs
await webTasks.run({
task: "Scrape YC companies. Return name, batch, description, and URL.",
startUrl: "https://www.ycombinator.com/companies",
parameters: { batch: "W24" },
outputSchema: companySchema,
reuseKey: "yc_companies_scraper",
});
// ✓ reused skill yc_companies_scraper
// ✓ returned 208 companies · 58s · $0.12 AI + 0.02 compute hrsclass Company(BaseModel):
name: str
location: str
await web_tasks.run(
task="Scrape YC companies. Return name, batch, description, and URL.",
start_url="https://www.ycombinator.com/companies",
parameters={"batch": "S24"},
output_schema=list[Company],
reuse_key="yc_companies_scraper",
)
# ✓ created skill yc_companies_scraper
# ✓ wrote reusable helpers
# ✓ returned 247 companies · 6m 12s · $0.84 AI + 0.10 compute hrs
await web_tasks.run(
task="Scrape YC companies. Return name, batch, description, and URL.",
start_url="https://www.ycombinator.com/companies",
parameters={"batch": "W24"},
output_schema=list[Company],
reuse_key="yc_companies_scraper",
)
# ✓ reused skill yc_companies_scraper
# ✓ returned 208 companies · 58s · $0.12 AI + 0.02 compute hrsIntuned Web Tasks runs browser automations from natural-language instructions —
scraping, crawling, form filling, multi-step actions, and downloading files. Use it
whenever the user asks to extract data from, act on, or pull files from a website.
## Flow
If no task has been given yet, ask what they want to automate in one line and offer
1–2 examples — e.g. "What would you like to automate? For example, 'scrape all
companies from the YC directory' or 'download every PDF from a site'."
When the user gives you an automation task:
1. Ask whether to trigger via the **Intuned CLI** or the **SDK** (TypeScript or Python).
2. Trigger it, using their request as the `task`. Don't ask anything else
unless a required input is missing.
## Optional inputs
Include these only when they apply and you can infer them from the task — never ask for them:
- `parameters` — dynamic inputs that change between runs.
- `outputSchema` — JSON Schema, only when extracting structured data.
- `startUrl` — only when known; the agent infers it otherwise.
- `reuseKey` — when you re-run the same or similar task (e.g. to change a limit or
parameter), reuse the `reuse.key` the previous run returned, or a key the user gives
you. Only omit it for a brand-new task; the server then generates one — keep it and
reuse it on follow-ups for the same/similar task. Never ask whether the task is repetitive.
## CLI
Install first if missing: `npm install -g @Intuned/cli`, verify with `intuned -v`.
intuned platform webtasks run "<task>" --json
Add `--reuse-key <key>` when re-running the same/similar task (the prior run's key) or when the user provided one.
## TypeScript SDK (`npm install @Intuned/client`)
import { IntunedClient } from "@Intuned/client";
await client.webTasks.run({
task: "<what to do>",
startUrl: "<url, optional>",
parameters: { /* optional */ },
outputSchema: { /* jsonSchema, optional */ },
// reuseKey: the prior run's key on follow-ups, or one the user gave
});
## Python SDK (`pip install intuned-client`)
from intuned_client import IntunedClient
client.web_tasks.run(body={
"task": "<what to do>",
"start_url": "<url, optional>",
"parameters": {}, // optional
"output_schema": {}, // optional
})
## Docs
Refer here for more options and details:
https://intunedhq.com/docs/main/07-web-tasks/overview.md