Skip to content

azad.type_definitions Module

azad.type_definitions

Task type definitions to avoid circular dependencies.

Classes

PromptTemplateType

Bases: str, Enum

Enum defining known prompt template types.

CacheDialect

Bases: Enum

Enum defining known cache dialects.

CompressionConfig

Bases: BaseModel

Configuration for message history compression.

Attributes
enabled class-attribute instance-attribute
enabled: bool = Field(True, description='Whether to automatically compress message history when token limit is exceeded')
token_limit class-attribute instance-attribute
token_limit: int = Field(200000, description='The token limit at which to trigger compression')

TaskConfig

Bases: BaseModel

Configuration for a specific task.

Attributes
cache_dialect class-attribute instance-attribute
cache_dialect: CacheDialect | None = Field(None, description='Optional cache dialect for the task')
enable_explicit_caching class-attribute instance-attribute
enable_explicit_caching: bool | None = Field(None, description='Optional flag to enable explicit caching for gemini models')
dynamic_environment_details_block class-attribute instance-attribute
dynamic_environment_details_block: str | None = Field(None, description='Optional dynamic environment details block that will be added only to the last message')
template_keys class-attribute instance-attribute
template_keys: PromptTemplateType | None = Field(None, description='Optional template keys to be used for the task')
auto_approve class-attribute instance-attribute
auto_approve: bool = Field(False, description='Flag to auto-approve the task')
extra_params class-attribute instance-attribute
extra_params: Dict[str, Any] | None = Field(default_factory=dict, description='Extra parameters from dynamic environment details to pass to LiteLLM')

TaskParameterType

Bases: str, Enum

Enum defining known parameter types for task lifecycle operations.

ParameterMetadata

Bases: BaseModel

Metadata for a tool parameter.

ToolExample

Bases: BaseModel

System-level tool example.

Attributes
parameters instance-attribute
parameters: Dict[str, Union[str, bool, int, float, Dict[str, Any], None]]

ToolMetadata

Bases: BaseModel

System-level tool metadata.

Attributes
required_parameters instance-attribute
required_parameters: List[str]
task_lifecycle_output_keypairs class-attribute instance-attribute
task_lifecycle_output_keypairs: Optional[Dict[str, TaskParameterType]] = None
supports_parallel class-attribute instance-attribute
supports_parallel: Optional[bool] = False
requires_approval class-attribute instance-attribute
requires_approval: bool = Field(False, description='Flag indicating if this tool always requires explicit user approval, regardless of auto_approve setting')