OpenAIAgentTarget
junjo.plugins.openai_agents.evaluation.OpenAIAgentTarget
Kind: Class
SDK version: 0.67.0
Documentation channel: Stable release
Signature
Section titled “Signature”OpenAIAgentTarget(*, key: str, name: str, input_version: int, input_type: TypeForm[InputT], expected_agent_name: str, factory: Callable[[InputT, EvaluationContext, ResourcesT], OpenAIAgentInvocation[ContextT] | Awaitable[OpenAIAgentInvocation[ContextT]]], projector: Callable[[RunResult, InputT, EvaluationContext, ResourcesT], object | Awaitable[object]])Execute an OpenAI Agent and bind its exact standard Agent span.
The target is conceptual kind agent in evaluation datasets without
pretending the external runtime is a native Junjo Agent. It captures the
one standard invoke_agent span whose Agent name matches
expected_agent_name and returns an exact otel_span evidence
reference. Missing, duplicate, or mismatched evidence fails clearly.
Constructor
Section titled “Constructor”Declare one application-owned outer OpenAI Agent target.
Parameters
Section titled “Parameters”| Name | Type | Description | Default |
|---|---|---|---|
key |
str |
Stable dispatch identity within the application harness. | |
name |
str |
Human-readable target name snapshotted into Studio cases. | |
input_version |
int |
Positive version of the target input contract. | |
input_type |
TypeForm[InputT] |
Pydantic-compatible case input type. | |
expected_agent_name |
str |
Exact OpenAI Agent name expected on the standard invoke_agent span. |
|
factory |
Callable[[InputT, EvaluationContext, ResourcesT], OpenAIAgentInvocation[ContextT] | Awaitable[OpenAIAgentInvocation[ContextT]]] |
Application factory for a fresh invocation using the validated input, evaluation context, and shared harness resources. |
|
projector |
Callable[[RunResult, InputT, EvaluationContext, ResourcesT], object | Awaitable[object]] |
Mapping from the real RunResult to the subjectconsumed by the case evaluator. |
Raises
Section titled “Raises”| Exception | Description |
|---|---|
TargetContractError |
If declaration metadata or the input contract is invalid. |
Members
Section titled “Members”input_schema
Section titled “input_schema”input_schema: dict[str, object]Public attribute.
validate_input
Section titled “validate_input”validate_input(input_json: object) -> InputTPublic member documented by its signature.
execute
Section titled “execute”execute(input_value: object, *, context: EvaluationContext, service_identity: ExecutionServiceIdentity, resources: object) -> TargetExecutionPublic member documented by its signature.