JIXUDOCS
Packages

jixu-tools-jina

Bounded Web Search and URL Reader Tools backed by Jina.

jixu-tools-jina gives an Agent two explicit network capabilities: discover public webpages and read one known public URL. Credentials stay behind the Tool boundary rather than entering Events or Agent-visible inputs.

Install

npm install jixu-core jixu-tools-jina

Create the Tools

import { defineAgent } from "jixu-core";
import {
  createJinaWebReadTool,
  createJinaWebSearchTool,
} from "jixu-tools-jina";

const apiKey = process.env.JINA_API_KEY;
const webSearch = createJinaWebSearchTool({ apiKey });
const webRead = createJinaWebReadTool({ apiKey });

const agent = defineAgent({
  instructions: "Use web evidence carefully and cite resolved URLs.",
  model: { provider: "model", model: "configured-model" },
  modelCapabilities,
  tools: [webSearch, webRead],
});

Capabilities

ToolUse it whenOutput
web_searchA query must discover relevant public pagesBounded source-linked results
web_readThe exact HTTP(S) URL is already knownBounded content and the resolved URL

Both Tools are declared idempotent and network-risking. They enforce request timeouts, response byte limits, content-length limits, cancellation, and typed upstream failures. Search returns an empty successful result when Jina reports no matches.

Trust boundary

Web content is untrusted evidence, not an instruction source and not durable authority. The Agent should inspect relevance, cite the resolved URL, and avoid treating retrieved text as privileged context.

Credential isolation

The Jina API key is captured in the Tool implementation. It must not appear in Tool input, Events, Checkpoints, errors, or Signals. Missing credentials fail with a typed Tool error.