Skip to main content

Module tool

Module tool 

Source
Available on crate feature rag only.
Expand description

Agentic retrieval tool for ADK agents.

The RagTool wraps a RagPipeline as an adk_core::Tool so that agents can perform retrieval as a tool call.

§Example

use std::sync::Arc;
use adk_rag::{RagPipeline, RagTool};

let pipeline = Arc::new(build_pipeline()?);
let tool = RagTool::new(pipeline, "my_docs");

// The agent calls the tool with:
// { "query": "How do I configure X?", "collection": "faq", "top_k": 5 }

Structs§

RagTool
A retrieval tool that wraps a RagPipeline for agentic use.