Python API Reference
Reference for Junjo Python SDK 0.69.0.
Documentation channel: Stable release
This reference is generated from the released source revision.
The common Agent definition and binding types are also available from junjo. Provider-neutral messages, results, and typed errors live in junjo.agent, and deterministic scripted testing support is public at junjo.agent.testing.
Core API
Section titled “Core API”Module: junjo
junjo.BaseStatejunjo.BaseStorejunjo.CompiledEdgejunjo.CompiledGraphjunjo.CompiledNodejunjo.Conditionjunjo.Edgejunjo.ExecutionCorrelationjunjo.ExecutionResultjunjo.Graphjunjo.GraphCompilationErrorjunjo.GraphFactoryjunjo.GraphRenderErrorjunjo.GraphSerializationErrorjunjo.GraphValidationErrorjunjo.Hooksjunjo.Nodejunjo.NodeEvaluationResultjunjo.RunConcurrentjunjo.StoreFactoryjunjo.Subflowjunjo.Workflowjunjo.WorkflowCancelledErrorjunjo.WorkflowExecutionErrorjunjo.evaluate_node
Agent Definitions
Section titled “Agent Definitions”Module: junjo.agent.definition
The common definition and binding types are also available from junjo.
Agent Model Drivers
Section titled “Agent Model Drivers”Module: junjo.agent.model_driver
Connect your provider client with an application-owned adapter. See specialist agents for model bindings and application-owned provider integration.
junjo.agent.model_driver.ModelDriverjunjo.agent.model_driver.ModelDriverBindingjunjo.agent.model_driver.ModelDriverDescriptor
Agent Tools
Section titled “Agent Tools”Module: junjo.agent.tool
Declare typed capabilities for an Agent to invoke. See compose agents and workflows for service ownership, dependencies, and nested execution.
Agent Messages
Section titled “Agent Messages”Module: junjo.agent.messages
junjo.agent.messages.AgentInputMessagejunjo.agent.messages.AssistantOutputMessagejunjo.agent.messages.AssistantToolCallsMessagejunjo.agent.messages.FinalOutputResponsejunjo.agent.messages.ModelRequestjunjo.agent.messages.ModelUsagejunjo.agent.messages.ToolCalljunjo.agent.messages.ToolCallsResponsejunjo.agent.messages.ToolDefinitionjunjo.agent.messages.ToolResultMessagejunjo.agent.messages.detach_messagejunjo.agent.messages.message_to_jsonjunjo.agent.messages.normalize_model_responsejunjo.agent.messages.response_to_jsonjunjo.agent.messages.validate_history
Agent Results
Section titled “Agent Results”Module: junjo.agent.result
Inspect validated output, transcript, usage, and execution identity. Start with specialist agents and agent testing for successful and failed runs.
junjo.agent.result.AgentExecutionResultjunjo.agent.result.AgentUsagejunjo.agent.result.UsageAggregateField
Agent State
Section titled “Agent State”Module: junjo.agent.state
Agent JSON
Section titled “Agent JSON”Module: junjo.agent.json
Portable JSON aliases describe the values accepted by Agent contracts. JsonValue uses mutable lists and dictionaries; FrozenJsonValue describes the recursively immutable tuples and mappings exposed in owned execution records.
Agent Errors
Section titled “Agent Errors”Module: junjo.agent.errors
junjo.agent.errors.AgentAdmissionErrorjunjo.agent.errors.AgentConfigurationErrorjunjo.agent.errors.AgentErrorjunjo.agent.errors.AgentExecutionErrorjunjo.agent.errors.AgentHistoryValidationErrorjunjo.agent.errors.AgentInputValidationErrorjunjo.agent.errors.AgentInternalErrorjunjo.agent.errors.AgentInvocationErrorjunjo.agent.errors.AgentLimitExceededErrorjunjo.agent.errors.AgentModelErrorjunjo.agent.errors.AgentModelResponseErrorjunjo.agent.errors.AgentOutputValidationErrorjunjo.agent.errors.AgentToolErrorjunjo.agent.errors.AgentToolInputValidationErrorjunjo.agent.errors.AgentToolOutputValidationErrorjunjo.agent.errors.AgentUnknownToolErrorjunjo.agent.errors.ModelDriverConfigurationErrorjunjo.agent.errors.ToolConfigurationError
Agent Testing
Section titled “Agent Testing”Module: junjo.agent.testing
Deterministic scripted testing support is intentionally public at junjo.agent.testing. See agent testing for scripted runtime tests and the separate live evaluation workflow.
junjo.agent.testing.ScriptedErrorjunjo.agent.testing.ScriptedModelDriverjunjo.agent.testing.ScriptedResponse
Evaluation API
Section titled “Evaluation API”Module: junjo.evaluation
Studio-connected evaluation orchestration for real application Nodes, Workflows, and Agents. Use datasets and local evaluation runs to register targets, run locked cases, and compare outcomes.
junjo.evaluation.AgentInvocationjunjo.evaluation.AgentTargetjunjo.evaluation.BooleanPredicateEvaluatorjunjo.evaluation.CallbackEvaluatorjunjo.evaluation.CaseGenerationErrorjunjo.evaluation.DirtySourceTreeErrorjunjo.evaluation.EvaluationContextjunjo.evaluation.EvaluationControlClientjunjo.evaluation.EvaluationExecutorjunjo.evaluation.EvaluationHarnessjunjo.evaluation.EvaluationResultjunjo.evaluation.EvaluationRolejunjo.evaluation.EvaluationRunClassjunjo.evaluation.EvaluationRunErrorjunjo.evaluation.EvaluationTargetjunjo.evaluation.Evaluatorjunjo.evaluation.EvaluatorContractErrorjunjo.evaluation.EvaluatorDescriptorjunjo.evaluation.EvaluatorExecutionErrorjunjo.evaluation.EvaluatorNotRegisteredErrorjunjo.evaluation.ExactMatchEvaluatorjunjo.evaluation.ExecutionServiceIdentityjunjo.evaluation.GenerateCaseRequestjunjo.evaluation.HarnessConfigurationErrorjunjo.evaluation.NodeInvocationjunjo.evaluation.NodeTargetjunjo.evaluation.PreparedEvaluationjunjo.evaluation.StructuredFieldEvaluatorjunjo.evaluation.TargetContractErrorjunjo.evaluation.TargetDescriptorjunjo.evaluation.TargetExecutionjunjo.evaluation.TargetExecutionErrorjunjo.evaluation.TargetNotRegisteredErrorjunjo.evaluation.WorkflowInvocationjunjo.evaluation.WorkflowTargetjunjo.evaluation.clean_source_revisionjunjo.evaluation.evaluation_span
Studio Client API
Section titled “Studio Client API”Module: junjo.studio
Typed, bounded evaluation-control and evidence queries for Junjo AI Studio. See datasets and local evaluation runs for client use and Junjo AI Studio for investigating the recorded evidence.
junjo.studio.AttemptDetailjunjo.studio.AttemptEvidencejunjo.studio.AttemptEvidenceBindjunjo.studio.AttemptEvidenceDiagnosticjunjo.studio.AttemptEvidenceExecutableSummaryjunjo.studio.AttemptEvidenceFailureSummaryjunjo.studio.AttemptEvidenceManifestjunjo.studio.AttemptEvidenceOperationSummaryjunjo.studio.AttemptEvidenceRelationshipsjunjo.studio.AttemptEvidenceSpanItemjunjo.studio.AttemptEvidenceSpanRequestjunjo.studio.AttemptEvidenceSpanSummaryjunjo.studio.AttemptEvidenceSpansjunjo.studio.AttemptEvidenceStoreSummaryjunjo.studio.AttemptEvidenceSubjectjunjo.studio.AttemptEvidenceTraceSummaryjunjo.studio.AttemptEvidenceUnavailablejunjo.studio.AttemptReadjunjo.studio.AttemptResultWritejunjo.studio.AttemptStatusjunjo.studio.CaseCreatejunjo.studio.CaseOriginjunjo.studio.CaseReadjunjo.studio.ConflictResponsejunjo.studio.DatasetCreatejunjo.studio.DatasetDetailjunjo.studio.DatasetListjunjo.studio.DatasetReadjunjo.studio.DatasetStatusjunjo.studio.DatasetSummaryjunjo.studio.EvaluationNameFacetjunjo.studio.EvidenceMembershipItemjunjo.studio.EvidenceMembershipListjunjo.studio.ExecutableTypejunjo.studio.ExecutionEvidencePendingjunjo.studio.ExecutionIdentityAmbiguousjunjo.studio.ExecutionResolutionConflictjunjo.studio.ExecutionResolutionReadjunjo.studio.OpenTelemetrySpanReferencejunjo.studio.OpenTelemetrySpanResolutionReadjunjo.studio.OutcomeSummaryjunjo.studio.RunCaseReadjunjo.studio.RunComparisonjunjo.studio.RunComparisonErrorjunjo.studio.RunComparisonRowjunjo.studio.RunComparisonSummaryjunjo.studio.RunComparisonTransitionjunjo.studio.RunComparisonTransitionCountsjunjo.studio.RunDetailjunjo.studio.RunListjunjo.studio.RunReadjunjo.studio.RunScopejunjo.studio.RunStartjunjo.studio.RunStatusjunjo.studio.RunSummaryjunjo.studio.SemanticExecutionReferencejunjo.studio.StudioAuthenticationErrorjunjo.studio.StudioAuthorizationErrorjunjo.studio.StudioClientjunjo.studio.StudioConflictErrorjunjo.studio.StudioContractErrorjunjo.studio.StudioDtojunjo.studio.StudioErrorjunjo.studio.StudioHealthjunjo.studio.StudioRequestErrorjunjo.studio.StudioResponseTooLargeErrorjunjo.studio.StudioTransientErrorjunjo.studio.StudioValidationErrorjunjo.studio.TargetFacetjunjo.studio.TargetKindjunjo.studio.TraceEvidenceReadjunjo.studio.project_run_comparison
OpenAI Agents Integration
Section titled “OpenAI Agents Integration”Module: junjo.plugins.openai_agents
Optional first-party OpenAI Agents SDK composition and OpenTelemetry integration.
junjo.plugins.openai_agents.AgentToolInvocationjunjo.plugins.openai_agents.OpenAIAgentsIntegrationjunjo.plugins.openai_agents.OpenAIAgentsIntegrationErrorjunjo.plugins.openai_agents.WorkflowToolInvocationjunjo.plugins.openai_agents.agent_as_tooljunjo.plugins.openai_agents.instrument_openai_agentsjunjo.plugins.openai_agents.workflow_as_tool
OpenAI Agents Evaluation
Section titled “OpenAI Agents Evaluation”Module: junjo.plugins.openai_agents.evaluation
Optional outer OpenAI Agent evaluation target with exact span evidence.
junjo.plugins.openai_agents.evaluation.OpenAIAgentInvocationjunjo.plugins.openai_agents.evaluation.OpenAIAgentTarget
Hooks API
Section titled “Hooks API”Module: junjo.hooks
junjo.hooks.AgentCancelledEventjunjo.hooks.AgentCompletedEventjunjo.hooks.AgentFailedEventjunjo.hooks.AgentStartedEventjunjo.hooks.LifecycleEventjunjo.hooks.NodeCancelledEventjunjo.hooks.NodeCompletedEventjunjo.hooks.NodeFailedEventjunjo.hooks.NodeStartedEventjunjo.hooks.RunConcurrentCancelledEventjunjo.hooks.RunConcurrentCompletedEventjunjo.hooks.RunConcurrentFailedEventjunjo.hooks.RunConcurrentStartedEventjunjo.hooks.StateChangedEventjunjo.hooks.SubflowCancelledEventjunjo.hooks.SubflowCompletedEventjunjo.hooks.SubflowFailedEventjunjo.hooks.SubflowStartedEventjunjo.hooks.WorkflowCancelledEventjunjo.hooks.WorkflowCompletedEventjunjo.hooks.WorkflowFailedEventjunjo.hooks.WorkflowStartedEvent