Skip to main content
PraisonAI includes a benchmark suite to measure performance with and without AI SDK loaded.

Quick Start

1

Simple Usage

2

With Configuration

What’s Measured

Import Time

Measures cold start import time:
  • Core Import: Just the Agent class (no AI SDK)
  • AI SDK Import: Loading the ai package
  • Full Import: Complete praisonai module

Memory Usage

Measures heap memory after:
  • Module import
  • Agent creation
  • First LLM call

Latency

Measures time for:
  • Backend resolution
  • First API call (with real keys)
  • Streaming throughput

Embedding Throughput

Measures vectors per second for batch embeddings.

Running Benchmarks

Programmatic

Benchmark Script

Create a benchmark script:

Benchmark Results

Typical results on modern hardware:

Key Findings

  1. AI SDK adds ~35ms import overhead - Only when actually loaded
  2. Lazy loading works - AI SDK not loaded until needed
  3. Memory overhead minimal - ~1MB additional
  4. No runtime penalty - After initial load, performance is identical

Zero Impact Guarantee

PraisonAI guarantees zero performance impact when AI SDK is not used:

Verification

Environment Control

Force Native Backend

Force AI SDK

Auto Selection (Default)

CI/CD Integration

GitHub Actions

Benchmark in Tests

Benchmarks CLI

Run benchmarks from the terminal

AI SDK

Optional AI SDK backend

Agent

Agent runtime