Quick Start
What’s Measured
Import Time
Measures cold start import time:- Core Import: Just the Agent class (no AI SDK)
- AI SDK Import: Loading the
aipackage - 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:| Metric | Without AI SDK | With AI SDK | Overhead |
|---|---|---|---|
| Core Import | ~25ms | ~25ms | 0ms |
| AI SDK Import | N/A | ~35ms | +35ms |
| Full Import | ~30ms | ~60ms | +30ms |
| Backend Resolution | ~1ms | ~5ms | +4ms |
| Memory (Agent) | ~2MB | ~3MB | +1MB |
Key Findings
- AI SDK adds ~35ms import overhead - Only when actually loaded
- Lazy loading works - AI SDK not loaded until needed
- Memory overhead minimal - ~1MB additional
- 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
Related
Benchmarks CLI
Run benchmarks from the terminal
AI SDK
Optional AI SDK backend
Agent
Agent runtime

