Expand description
agent-tool-middleware: middleware pipeline for LLM agent tool call processing.
use agent_tool_middleware::{MiddlewarePipeline, LogMiddleware};
use serde_json::json;
let mut pipe = MiddlewarePipeline::new();
pipe.add(LogMiddleware::new());
let (args, result) = pipe.run("search", json!({"q": "rust"}), json!({"hits": 5}));
assert_eq!(args["q"], "rust");Structs§
- Call
Record - A call record in the pipeline log.
- Inject
Field Middleware - Middleware that adds a field to every args object.
- LogMiddleware
- Logging middleware — records every call.
- Middleware
Pipeline - A pipeline of middleware applied to every tool call.
Traits§
- Middleware
- A middleware that can modify args before a call and result after.