JIXU DOCUMENTATION
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-jinaCreate 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
| Tool | Use it when | Output |
|---|---|---|
web_search | A query must discover relevant public pages | Bounded source-linked results |
web_read | The exact HTTP(S) URL is already known | Bounded 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.