Package ai.acolite.agentsdk.core
Interface ToolInputGuardrail<TContext>
- All Superinterfaces:
ToolGuardrailBase
ToolInputGuardrail
Validates tool input arguments before tool execution.
Tool guardrails execute sequentially (not in parallel) and can: - Allow the tool call to proceed (ALLOW) - Reject and replace output with alternative content (REJECT_CONTENT) - Throw an exception to halt execution (THROW_EXCEPTION)
Use tool input guardrails to: - Block tools with dangerous arguments - Validate parameters before execution - Apply rate limits or quotas - Check for sensitive data in tool inputs
Ported from TypeScript OpenAI Agents SDK Source: toolGuardrail.ts
-
Method Summary
Modifier and TypeMethodDescriptionExecute the guardrail validation on tool input.getName()Unique name for this guardrail.
-
Method Details
-
getName
String getName()Unique name for this guardrail.- Returns:
- The guardrail name
-
execute
CompletableFuture<ToolGuardrailFunctionOutput> execute(ToolInputGuardrailFunctionArgs<TContext> args) Execute the guardrail validation on tool input.- Parameters:
args- The tool input arguments- Returns:
- A CompletableFuture with the guardrail result
-