# Hosted runtime

Understand how an authenticated request becomes a durable agent turn.

Salambo operates the model loop in a trusted hosted worker and gives the agent constrained execution capabilities in a managed sandbox.

```mermaid
flowchart LR
  Request[API or integration] --> Admission[Authentication and admission]
  Admission --> Worker[Trusted hosted worker]
  Worker --> Provider[Model provider]
  Worker --> Sandbox[Managed sandbox]
  Sandbox --> Workspace[Run-owned workspace]
  Workspace --> Checkpoint[Durable checkpoint]
  Worker --> Evidence[Turn output and diagnostics]
```

## Ownership

| Component  | Owns                                                       | Does not own                          |
| ---------- | ---------------------------------------------------------- | ------------------------------------- |
| Client     | Request, user experience, cancellation decisions           | Model loop or sandbox lifecycle       |
| Deployment | Immutable behavior and runtime configuration               | Mutable run files                     |
| Worker     | Model loop, turns, provider calls, cancellation, run state | Customer shell or extension execution |
| Sandbox    | Workspace, hands commands, extension processes             | Trusted worker memory                 |
| Run        | Pi session, turns, workspace, applied deployment           | Permanent compute                     |

## Admission

Before execution, Salambo checks authentication and scope, account ownership, active agent and deployment readiness, billing eligibility, provider configuration, and runtime configuration. An admission failure does not start agent work.

## Execution

The worker calls the model provider and routes tool work to the sandbox. Built-in file and terminal tools operate on the exposed workspace. Hosted extensions execute through the authenticated sandbox extension host.

## Completion

When workspace durability is required, a turn is not complete until its
workspace changes are checkpointed. The run page connects the turn to its
deployment, sandbox lifecycle, events, files, and cleanup evidence.

Continue with [sandbox isolation](/docs/architecture/sandbox-isolation) and [lifecycle and checkpointing](/docs/architecture/lifecycle-checkpointing).
