Skip to main content
Managed backend plugins let third-party packages register new HostedAgent(provider=...) runtimes — like e2b, modal, or flyio — without editing PraisonAI core.
The user installs a plugin entry point; HostedAgent resolves the provider and runs the agent on that backend.

Quick Start

1

Simple — Programmatic Registration

Register a backend class directly at runtime (ideal for testing or single-project use):
2

With Entry Point — pip-installable Plugin

Create a Python package with a praisonai.managed_backends entry point so your backend is automatically available after pip install:
After installation:

How It Works

HostedAgent.__new__ acts as a factory for non-Anthropic backends. When the resolved backend class is different from HostedAgent, Python’s __new__ returns the backend instance directly — __init__ is skipped. Callers receive the real backend’s methods without any AnthropicManagedAgent-inherited state:
The builtin anthropic backend is pre-registered in ManagedBackendRegistry — it resolves to AnthropicManagedAgent.

Configuration Options

ManagedBackendRegistry API Reference

Complete API reference for ManagedBackendRegistry

Common Patterns

Custom Hosted Runtime

Selecting Between Multiple Registered Backends

Graceful Unavailable-Backend Handling


Best Practices

Use the provider name as the entry-point key — lowercase, no hyphens. The key becomes the value passed to provider=:
Always implement is_available() with a fast, cached check. The registry calls it during startup probing:
Never do heavy imports inside is_available() — it is called on every registry probe.
Include helpful hints in your error messages so users know what to install:
Implement resource cleanup if your backend opens connections or sandbox environments:

Framework Adapter Plugins

Add new execution frameworks via entry points

Hosted Agent

Run agent loops on managed cloud runtimes