Agent, AgentTeam, and AgentFlow can tell you — in plain English — where its thinking and tools actually run.
Quick Start
1
Ask a plain agent
Print the agent and it tells you where it runs.
2
Ask a workflow with a shared sandbox
A workflow with
run_on= shows the shared container every step uses.3
Ask a team
A team reports the same shared-sandbox detail across its agents.
How It Works
Bothrepr() and where_does_it_run() read the same source of truth: run_on=, backend=, and sandbox=.
How the answer is picked
Each input maps to a plain-English place. These phrases come straight from the SDK — they are the exact words the object prints. Arun_on= on a team or workflow sets tools_run_on to a shared sandbox:
A
sandbox= on an agent adds a code_runs_on place — where code you run yourself with execute_code() runs:
Public sandbox aliases resolve to the backend that actually runs:
native becomes a locked-down process, and local becomes a separate process. An unknown provider name is printed back as-is.
Common Patterns
Print the location at the top of your script before running untrusted code.run_on=, the explanation ends with a line about visibility between steps.
Best Practices
Print the repr in code review
Print the repr in code review
A reviewer can tell “local vs container vs cloud” from one printed line, without opening the docs or tracing
run_on=.Trust the boundary warning
Trust the boundary warning
If
where_does_it_run() says “not a security boundary”, it isn’t. Under a separate process the network is still reachable and your files are still readable. Use run_on="docker" or a cloud provider for untrusted code.The warning fires for subprocess / local only — never for sandlock / native, docker, or any hosted provider. Since PR #4107, native (an alias for sandlock: Landlock + seccomp + scrubbed env + deny-all networking) is correctly excluded from the warning, so tools_run_on="native" and tools_run_on="sandlock" no longer give opposite advice for the same backend.Use where_does_it_run() in beginner tutorials
Use where_does_it_run() in beginner tutorials
It is written for a non-developer — no “harness”, “provision”, “runtime”, or “topology” appears in its output.
Never parse the repr
Never parse the repr
The phrases are for humans and may be re-worded in later releases. For machine-readable data, call
describe(obj) — it returns a dict[str, str].Related
Execution
Where and how agents run their work.
Agents
Build the agents you can introspect.

