Skip to content

API Reference

Complete API documentation for dapr-agents-oas-adapter.

Core Classes

Loaders

Class Description
DaprAgentSpecLoader Main loader for OAS to Dapr conversion
AsyncDaprAgentSpecLoader Async version of the loader
CachedLoader Loader wrapper with caching
StrictLoader Loader with schema validation

Exporter

Class Description
DaprAgentSpecExporter Export Dapr configs to OAS format

Validation

Class/Function Description
OASSchemaValidator Validate OAS input dicts
WorkflowValidator Validate workflow structure
validate_oas_dict Convenience validation function
validate_workflow Convenience workflow validation

Caching

Class Description
InMemoryCache In-memory cache backend
CacheBackend Abstract cache interface
CacheStats Cache statistics

Logging

Function Description
get_logger Get the current logger instance
set_logger Inject a custom logger

Types

Class Description
DaprAgentConfig Agent configuration model
WorkflowDefinition Workflow definition model
WorkflowTaskDefinition Task definition model
WorkflowEdgeDefinition Edge definition model

Utilities

Class/Function Description
IDGenerator Deterministic ID generation
run_sync Run async code synchronously

Exceptions

Exception Description
ConversionError Raised on conversion failures
OASSchemaValidationError Invalid OAS schema
WorkflowValidationError Invalid workflow structure

Public API

All public exports are available from the main module:

from dapr_agents_oas_adapter import (
    # Loaders
    DaprAgentSpecLoader,
    AsyncDaprAgentSpecLoader,
    CachedLoader,
    StrictLoader,

    # Exporter
    DaprAgentSpecExporter,

    # Validation
    OASSchemaValidator,
    OASSchemaValidationError,
    WorkflowValidator,
    WorkflowValidationError,
    ValidationResult,
    validate_oas_dict,
    validate_workflow,

    # Caching
    CacheBackend,
    CacheStats,
    InMemoryCache,

    # Logging
    get_logger,
    set_logger,

    # Utilities
    IDGenerator,
    run_sync,
)