Package ai.acolite.agentsdk.core
Interface OutputGuardrail<TContext,TOutput extends AgentOutputType>
public interface OutputGuardrail<TContext,TOutput extends AgentOutputType>
OutputGuardrail
Validates agent output after the final model response.
Output guardrails always run in parallel (no blocking mode) and execute after the agent has produced its final output.
Use output guardrails to: - Check for inappropriate content in responses - Validate output format or structure - Log/audit agent responses - Apply business rules to outputs
Ported from TypeScript OpenAI Agents SDK Source: guardrail.ts
-
Method Summary
Modifier and TypeMethodDescriptionExecute the guardrail validation on agent output.getName()Unique name for this guardrail.
-
Method Details
-
getName
String getName()Unique name for this guardrail.- Returns:
- The guardrail name
-
execute
CompletableFuture<GuardrailFunctionOutput> execute(OutputGuardrailFunctionArgs<TContext, TOutput> args) Execute the guardrail validation on agent output.- Parameters:
args- The output arguments containing final output and context- Returns:
- A CompletableFuture with the guardrail result
-