連携
Flowise
Thunderbit を Flowise のカスタム Tool としてラップし、chain と agent で利用
Flowise は LangChain 上のドラッグ&ドロップビルダーです。Custom Tool ノードで /distill をキャンバス上の任意の chain や agent に公開できます。
カスタム Tool を作成
Tools → Custom Tool → Add new
- Tool name:
read_url - Tool description:
Fetch a URL and return clean Markdown for the agent to read. - Input schema (JSON):
{
"type": "object",
"required": ["url"],
"properties": {
"url": { "type": "string" },
"renderMode": { "type": "string", "enum": ["basic", "advanced"], "default": "basic" }
}
}- JavaScript function:
const res = await fetch('https://openapi.thunderbit.com/openapi/v1/distill', {
method: 'POST',
headers: {
Authorization: `Bearer ${$vars.THUNDERBIT_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({ url: $url, renderMode: $renderMode || 'basic' }),
});
const json = await res.json();
return json.data.markdown;API Key は Variables に THUNDERBIT_API_KEY として保存し、ハードコードしない。
chain への組み込み
read_url Tool を Agent または Tool Agent ノードに、LLM(OpenAI、Anthropic、Ollama)と並べてドロップ。Agent が自動的に拾います。
ヒント
- RAG 取り込みには Document Loader ファミリーと組み合わせ —— カスタムノードで
read_urlを呼び、Markdown を Recursive Character Text Splitter に流し、vector store へ - 長いページは agent のコンテキストを吹き飛ばします —— Custom Tool 内で ~8k 文字に切り詰めて返す
関連
- LangChain —— Flowise はこの上に構築
- エージェント Read-URL Tool
- Dify