Integration Registry enables third-party developers to add custom CLI tools, managed agents, and agent backends to PraisonAI through a centralized plugin system.Documentation Index
Fetch the complete documentation index at: https://docs.praison.ai/llms.txt
Use this file to discover all available pages before exploring further.
Quick Start
How It Works
Before PR #1763,praisonai/integrations/__init__.py had a 70-line if/elif ladder in __getattr__ that mapped attribute names to lazy imports. After #1763, the ladder is replaced by a 4-line dispatch backed by INTEGRATIONS_REGISTRY. The registry:
- Subclasses the generic
PluginRegistry[T]frompraisonai._registry - Loads built-in integrations lazily (CLI tools, managed agents, sandboxed agents, hosted/local agent backends, registry helpers)
- Supports third-party integrations via the new entry-point group
praisonai.integrations— distribute a pip package, no code changes to praisonai - Exposes a
get_by_attr(module_name, attr_name)helper that raisesAttributeError(notValueError) so the dispatch slots into module-level__getattr__
Configuration / API
| Method | Parameters | Description |
|---|---|---|
INTEGRATIONS_REGISTRY.register_lazy(name, loader, *, aliases=None) | name: str, loader: () -> Any, aliases: list[str] | None | Register a lazily-loaded integration |
INTEGRATIONS_REGISTRY.resolve(name) | name: str → Any | Materialize an integration; ValueError if unknown |
INTEGRATIONS_REGISTRY.get_by_attr(module, attr) | module: str, attr: str → Any | Same as resolve but raises AttributeError (for use inside __getattr__) |
Built-in Integrations
The registry includes these built-in integrations with lazy loading:CLI Tools
ClaudeCodeIntegration— Claude Code CLI integrationGeminiCLIIntegration— Gemini CLI toolsCodexCLIIntegration— Codex CLI interfaceCursorCLIIntegration— Cursor CLI integrationBaseCLIIntegration— Base class for CLI toolsCLIExecutionError— CLI execution error class
Managed Agents
ManagedAgent(alias:ManagedAgentIntegration) — Managed agent interfaceAnthropicManagedAgent— Anthropic-specific managed agentManagedConfig(alias:ManagedBackendConfig) — Managed agent configuration
Local & Sandboxed Agents
LocalManagedAgent— Local managed agentLocalManagedConfig— Local agent configurationSandboxedAgent— Sandboxed agent executionSandboxedAgentConfig— Sandboxed agent configuration
Agent Backends
HostedAgent— Hosted agent backendHostedAgentConfig— Hosted agent configurationLocalAgent— Local agent backendLocalAgentConfig— Local agent configuration
Registry Functions
get_available_integrations— List available integrationsExternalAgentRegistry— External agent registryget_registry— Get integration registryregister_integration— Register new integrationcreate_integration— Create integration instance
Advanced Usage
Build Your Own Namespace
Usecreate_lazy_getattr(registry) from praisonai._registry for plugin authors who want to give their own package the same lazy-loading + entry-point dispatch behaviour:
Common Patterns
Override a Built-in
Override a Built-in
Multiple Aliases
Multiple Aliases
Multi-tenant Isolation
Multi-tenant Isolation
IntegrationRegistry() for per-tenant registration that doesn’t leak.Best Practices
Always Use Lazy Loading
Always Use Lazy Loading
Always use a
_loader function, never import the integration at module top-level — that defeats the lazy-loading:Use Canonical Names
Use Canonical Names
Names are case-insensitive; pick the canonical form (matching the class name) for the registration key:
Avoid Internal Imports
Avoid Internal Imports
Don’t bypass the registry to import internal integration modules directly — those paths are not part of the public API:
Related
Framework Adapter Plugins
Plugin system for multi-agent frameworks
Persistence Backend Plugins
Add custom storage backends

