runOn / backend) or only its tools (toolsRunOn).
Quick Start
1
A custom backend runs the whole agent
2
Only the tools run elsewhere
3
Run a tool inside Docker
The two axes
ManagedBackendLike and ToolPlaceLike are exported interfaces. The default place, LOCAL_TOOL_PLACE, runs a tool unchanged in this process.
Exclusion rules
The two axes are disjoint, so naming two places for the same thing is a typo worth catching. Any of these throws at construction: Before this change a mis-typed name survived construction and only surfaced on the first model turn — after the prompt was built and, for a real run, after the API spend. Validation now happens at the call site.Registering hosts
A hosted runtime and a remote tool place are provider integrations that do not ship in the package. A host fills the registries:runOn: 'my-runtime' and toolsRunOn: 'my-sandbox' resolve by name. unregisterManagedRuntime / unregisterToolPlace undo a registration (local cannot be removed).
registerComputeProvider('e2b', …) now also registers a matching placement entry, so new Agent({ toolsRunOn: 'e2b' }) works after a single call — a caller no longer has to remember two registrations. The two move together.
Where a tool call goes
A tool runs on the provider only when it declares acommand template; a tool without one runs locally and says so, rather than implying isolation it does not have.
The shorthand toolsRunOn: 'docker' builds a ComputeToolPlace for you, but with no command templates — so every tool falls through to its local implementation. That fallback warns via console.warn, once per tool name on each place (a hot loop can’t spam it), so a caller who asked for a real sandbox ('docker', 'e2b', …) gets a visible signal instead of a silent downgrade. A 'local' place skips the warning — running on the host is what 'local' means, so a warning there would be noise:
ComputeToolPlace with the command template as in the Quick Start (or call setCommand(name, template)).
Compute providers behind toolsRunOn
toolsRunOn is powered by the compute-provider registry. praisonai-ts ships two providers — 'local' and 'docker' — via LocalCompute and DockerCompute.
listComputeProviders() returns what’s available in this build; registerComputeProvider(name, factory) adds a remote one without touching the SDK. The 'local' and 'docker' tool places resolve automatically on first use via ensureBuiltinToolPlaces() — no import step is needed at all for those names to work. new Agent({ toolsRunOn: 'local' }) and new Agent({ toolsRunOn: 'docker' }) both work out of the box; the placement registry’s toolPlaceNames() returns ['docker', 'local'] in a stock build. An unknown name (for example 'e2b') still raises rather than silently running on the host. See Compute Providers (TypeScript).
Reading the resolved placement
Team-wide toolsRunOn
An AgentTeam can share one sandbox across every member — one ToolPlace instance for the whole team, not one per member.
toolsRunOn of its own adopts the team’s place, so state a tool leaves persists between members’ tool calls in the same sandbox. A member’s own toolsRunOn wins — it keeps its place. An unknown place name throws at team construction.
TeamTask.agent) or built lazily from agentConfig — an agent that never appeared in the agents array at construction. It joins the same shared sandbox on first use.
Agent.adoptToolPlace(place) on each member. It returns false when the agent already has its own place (its own toolsRunOn or one adopted earlier — a safe no-op), and true when adopted. The call is idempotent, so a member that already has a place is never overridden. See AgentTeam for the full team-level option list.
Related
Runtime
Delegate the whole turn
Sandbox
Where code runs
Compute Providers (TS)
LocalCompute, DockerCompute, and the registry

