Quick Start
How It Works
| Registry | Module | Docs |
|---|---|---|
| Framework adapters | praisonai.framework_adapters.registry | Framework Adapter Plugins |
| Bot platforms | praisonai.bots._registry | Bot Platform Plugins |
| Sandbox backends | praisonai.sandbox._registry | Sandbox Backends |
| Search providers | praisonai.cli.features._search_registry | Search Providers |
Registry.default() or get_default_registry() unless noted.
When a SandboxConfig’s sandbox_type is unknown to the built-in list, SandboxManager now resolves it through praisonai.sandbox._registry automatically — no manual registry.resolve() call is needed for typical use.
Common Patterns
Multi-tenant isolation
Test isolation
AutoGenerator with custom registry
AutoGenerator retains the resolved adapter as self._adapter (mirroring AgentsGenerator.framework_adapter), and self.framework is derived from adapter.name — the authoritative name, not the raw constructor argument. This is a stable observable side effect; the underscore prefix marks it private-by-convention, so treat the attribute name itself as an implementation detail.
Injecting a tool-timeout executor
Likeadapter_registry=, the tool_timeout_executor= constructor parameter lets you supply a shared thread-pool instead of letting each AgentsGenerator lazily create its own.
gen.close() and exiting the with block will not shut it down. You stay responsible for shared_pool.shutdown().
Best Practices
Prefer DI in library code
Prefer DI in library code
Accept registries as parameters rather than calling defaults inside helpers:
Give each thread its own registry
Give each thread its own registry
Registry operations are thread-safe, but adapter instances may not be. Prefer one registry per worker or test case.
Use the default registry for single-tenant CLI apps
Use the default registry for single-tenant CLI apps
Custom registries add complexity. Reach for DI only when you need tenant overrides, test isolation, or sandboxed experimental adapters.
Related
Framework Adapter Plugins
Extend PraisonAI with custom execution frameworks
Bot Platform Plugins
Add custom messaging platforms via entry points

