Fully hosted gateway and runs
Most teams keep the agent in their own environment and use the SDK. For teams that would rather not run anything, Guard has two fully hosted options.
| SDK (the default) | Managed gateway | Hosted runs | |
|---|---|---|---|
| What you do | Install the SDK or run the MCP proxy | Point your MCP client, model base URL or HTTP calls at a gateway, with a dedicated credential | Submit a container image, its arguments, the task input and the files you want back |
| Where calls run | Your environment | A gateway machine we run, one per deployment | A machine we run, one per run, in a non-root container |
| What Guard covers | The tools, MCP servers and HTTP calls you connected | Calls through the gateway's registered routes. Files, processes and direct requests on your own machines are outside it | The run's temporary workspace, container permissions, and its tool and network exits |
| What we handle | Redacted events only | The requests and responses on those routes, and your upstream credentials | The task input, results and logs |
Because the hosted options handle your data, they need your explicit consent. Every gateway deployment and every hosted run is refused without the "consent" box ticked (data_hosting_consent).
The console pages are "Gateways", "Hosted runs" and "Credentials". Policies and approvals stay where they are, on "Policy" and "Approvals".
Managed gateway
- Publish a policy in Enforce mode. The gateway refuses traffic under Observe or Suggest.
- On "Gateways", create a deployment with your public HTTPS upstreams. A route can be:
- A fixed HTTP route.
- A model endpoint:
/v1/chat/completions,/v1/responsesor/v1/embeddings. Only function tools that your application runs are supported, not tools or background tasks the provider runs. - An MCP server over Streamable HTTP or SSE. Each allowed tool needs an approved manifest. Nothing is approved on first sight.
- Save upstream credentials (an
Authorizationvalue, an OAuth client secret, a registry credential) on "Credentials". The browser encrypts them before upload. Then refer to them bysecret_idin a new configuration version. - Create a gateway credential and download the client configuration. The credential is shown once. It holds no upstream secret, executor credential or cloud identity, and you can rotate or revoke it.
- Call the routes, or change your model or MCP client's address.
python
import uuid, httpx
# Read credential from your own secret manager.
response = httpx.post(endpoint + '/request',
headers={'Authorization': 'Bearer ' + credential,
'Idempotency-Key': str(uuid.uuid4())},
json={'route': 'business', 'payload': {'query': 'finance summary'}})- Write routes need an
Idempotency-Key. Sending the same key and arguments again returns the recorded state. The upstream isn't called twice. - When a call needs approval, the gateway keeps the original arguments as an encrypted snapshot. After a reviewer approves, fetch your pending calls with
GET /pendingand resume one withPOST /pending/{id}/resume. Only the saved arguments are used. - A call that may or may not have reached the upstream (a restart, a transport error, a failure after it started) ends as "Check the business result". Check your system before you try again.
- For MCP upstreams with OAuth, the project owner authorizes from the console. Access and refresh tokens stay in that gateway's encrypted vault. Pre-registered OAuth clients only.
- A project can have up to 5 gateways.
Hosted runs
A hosted run is one-off: a linux/amd64 container image named by digest (@sha256:…) and an argument list. Guard never builds a shell command for you.
- The container runs as UID/GID 10001 with a read-only root file system, no capabilities, no sudo, no Docker socket and no host folders.
- The input is
/run/guard/task.json(read-only)./workspaceis a writable temporary folder. The run must write/workspace/result.json. List any other files you want back as artifacts. Symlinks and paths outside the workspace are refused. - The agent reaches only a fixed forwarder on its internal network, which adds the run's credentials.
OPENAI_BASE_URL,MCP_GATEWAY_URLandGUARD_HTTP_URLare set for it;OPENAI_API_KEYis a placeholder, because the forwarder does the authentication. The agent gets no control-plane, upstream or cloud credentials. - Submitting needs an
Idempotency-Key.
| Limit | Value |
|---|---|
| Runs per project | 1 running at a time, at most 30 queued or running in total |
| Time | 900 seconds by default, at most 3,600 |
| Container | 2 CPUs, 4 GiB, 128 processes |
| Input / result / artifacts / logs | 1 MiB / 3 MiB / 100 MiB in total / 1 MiB |
- Known platform credentials and common secret fields are masked when logs are collected.
- Cancelling, a timeout or a lost machine revokes the run's access and deletes the machine. No new run is started for you.
- The workspace is deleted when the machine ends. Results are encrypted. A download link works once and for 5 minutes. After 7 days downloads are refused and the results are deleted. You can delete them earlier.
Limits
- The gateway protects only what goes through its routes.
- Clients connect with a dedicated bearer credential. Client sign-in, general OAuth client discovery and dynamic client registration aren't supported.
- MCP sessions must reconnect after a gateway update. Calls in progress are not replayed.