praisonai.compute entry-point group — run_on=, compute=, and tools_run_on= pick it up with no change to the main repo.
Quick Start
1
Declare the entry point
Point the
praisonai.compute group at a class in your package.2
Implement the protocol
Satisfy
ComputeProviderProtocol. Set an optional display_name for a friendly phrase.3
Use it like a built-in
After
pip install, the name resolves anywhere a compute place is accepted.How It Works
Providers are discovered from the entry-point group and loaded on demand — only when a caller names one.Built-in names are protected. The sandbox and managed-backend registries subclass the base
PluginRegistry, so since PraisonAI PR #4176 an entry point whose name (case-insensitive) matches a built-in provider (docker, local, e2b, …) is skipped and the built-in is kept (a DEBUG line notes the collision). This matters most here because these loaders decide where user code executes — a pip-installed package cannot silently take over docker — the same guard now applies whether the sandbox registry comes from praisonai-code (via PR #4176) or from a standalone praisonai-sandbox install (via PR #4184). Use runtime register(...) for a deliberate override. See Plugin Precedence.Protocol Reference
Implement these on your provider class.display_name is optional; the rest are required.
run_on= hosts the whole loop on a compute place, while tools_run_on= moves only the tools. A contributed provider works with both, plus per-agent compute=. See Placement.The seven built-in providers (
local, docker, e2b, modal, daytona, flyio, tenki) ship in the praisonai-sandbox package as reference implementations behind the same praisonai.compute entry-point group your plugin registers under (PR #4092). See the sandbox-package page for their canonical import locations.Best Practices
Set display_name for readable explanations
Set display_name for readable explanations
A bare provider name reads awkwardly in
where_does_it_run(). Set display_name = "a Runpod cloud sandbox" on the class so the phrase reads naturally everywhere the place is described.Make is_available cheap and honest
Make is_available cheap and honest
is_available is checked before your provider runs. Return False when a required key or SDK is missing rather than raising — the caller gets a clear “unavailable” instead of a stack trace.Keep imports lazy
Keep imports lazy
Import heavy SDK dependencies inside your methods, not at module top level. Providers load on demand, so a missing optional dependency should fail only when the provider is actually used.
Ship the extra alongside the entry point
Ship the extra alongside the entry point
Declare an optional install extra for your provider’s SDK so users can
pip install your-package[runpod]. This keeps the base install light and the failure mode obvious.Related
Placement
Where the whole agent, its tools, and its code calls run.
Sandbox Backends
The sibling
praisonai.sandbox entry-point group for Agent(sandbox=…).Managed Backend Plugins
Register a hosted agent runtime under
praisonai.managed_backends.Reclaim Stray Sandboxes
managed ps lists contributed places automatically.
