Tools & planner

Built-in tools callable from workers via ctx.tool(...). The planner chooses execution strategy (single node vs map-reduce) from worker intent.

LIVE

echo tool

Calls dispatch_tool("echo", …) on the real registry — same path workers use with ctx.tool("echo", …).

Built-in tools

NamePurpose
echoPassthrough args (testing)
fetchHTTP GET/POST with SSRF protection
scrapeSearch HTML stub (override in prod)
aiOpenAI-compatible chat (RESUMA_AI_*)

Call from a worker

#[worker(intent = "fetch and summarize with AI")]
async fn pipeline(input: Value, ctx: WorkerContext) -> Result<Value> {
    let page = ctx.tool("fetch", json!({ "url": input["url"] })).await?;
    let summary = ctx.tool("ai", json!({
        "prompt": "Summarize",
        "data": page
    })).await?;
    Ok(summary)
}

Register custom tools

register_tool("my_api", |args| {
    Box::pin(async move {
        // call your API
        Ok(json!({ "ok": true }))
    })
});

SSRF & fetch limits

  • RESUMA_FETCH_ALLOWLIST — optional host allowlist
  • RESUMA_FETCH_MAX_BYTES — default 5 MB response cap
  • Private IPs, metadata hosts, and redirects are blocked

Map-reduce parallelism

Heavy intents (e.g. containing "AI" with large item lists) trigger map-reduce. Concurrency is capped by RESUMA_NODE_PARALLEL (default 4) via a semaphore.

← Webhooks · Flow UI →