Skip to main content

Thread Safety CLI

Commands for testing and verifying thread-safe operations in PraisonAI Agents.

Verification Commands

Run Thread Safety Tests

Run the built-in thread safety tests:
Output:

Quick Thread Safety Check

Verify thread safety with a quick Python command:

Lite Agent Thread Safety Check

Testing Concurrent Access

With Real API

Test concurrent API calls (requires OPENAI_API_KEY):

Lock Verification

Check Agent Locks

Check LiteAgent Locks

Verify re-entrant locking

Verify async lock requires an event loop

CI/CD Integration

Add thread safety checks to your CI pipeline: