Skip to main content
PraisonAI’s SDK provides powerful extensibility through protocol-driven design. This guide covers the key extensibility features for building production-ready AI agents.

Overview

Tool Validation

Validate tool arguments and results before/after execution

Retry & Fallback

Configure retry policies with exponential backoff and jitter

Evaluation Packages

Create distributable test suites for agent evaluation

Merge Strategies

Combine outputs from parallel multi-agent workflows

Tool Validation

Validate tool arguments before execution and results after execution using the ToolValidatorProtocol.

ValidationResult

The ValidationResult dataclass captures validation outcomes:

Custom Validator

Implement ToolValidatorProtocol to create custom validators:

Retry and Fallback

Configure robust tool execution with retry policies and fallback chains.

RetryPolicy

Configure exponential backoff with optional jitter:

FallbackChain

Define alternative tools to try if the primary fails:

Evaluation Packages

Create distributable evaluation packages to test agent performance.

Creating an EvalPackage

EvalResult and EvalReport


Merge Strategies

Combine outputs from multiple agents in parallel workflows.

Built-in Strategies

Custom Merge Strategy

Implement MergeStrategyProtocol for custom logic:

API Reference

Tools Module

Eval Module

Agents Module

All protocols are @runtime_checkable, allowing isinstance() checks for protocol compliance.