Package ai.acolite.agentsdk.core
Interface ToolOutputGuardrail<TContext>
- All Superinterfaces:
ToolGuardrailBase
ToolOutputGuardrail
Validates tool output after tool execution.
Tool guardrails execute sequentially (not in parallel) and can: - Allow the tool output to be used (ALLOW) - Reject and replace output with alternative content (REJECT_CONTENT) - Throw an exception to halt execution (THROW_EXCEPTION)
Use tool output guardrails to: - Filter sensitive information from tool results - Validate tool output format - Transform or sanitize tool responses - Log/audit tool outputs
Ported from TypeScript OpenAI Agents SDK Source: toolGuardrail.ts
-
Method Summary
Modifier and TypeMethodDescriptionExecute the guardrail validation on tool output.getName()Unique name for this guardrail.
-
Method Details
-
getName
String getName()Unique name for this guardrail.- Returns:
- The guardrail name
-
execute
CompletableFuture<ToolGuardrailFunctionOutput> execute(ToolOutputGuardrailFunctionArgs<TContext> args) Execute the guardrail validation on tool output.- Parameters:
args- The tool output arguments- Returns:
- A CompletableFuture with the guardrail result
-