Skip to content

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 gatewayHosted runs
What you doInstall the SDK or run the MCP proxyPoint your MCP client, model base URL or HTTP calls at a gateway, with a dedicated credentialSubmit a container image, its arguments, the task input and the files you want back
Where calls runYour environmentA gateway machine we run, one per deploymentA machine we run, one per run, in a non-root container
What Guard coversThe tools, MCP servers and HTTP calls you connectedCalls through the gateway's registered routes. Files, processes and direct requests on your own machines are outside itThe run's temporary workspace, container permissions, and its tool and network exits
What we handleRedacted events onlyThe requests and responses on those routes, and your upstream credentialsThe 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 ​

  1. Publish a policy in Enforce mode. The gateway refuses traffic under Observe or Suggest.
  2. 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/responses or /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.
  3. Save upstream credentials (an Authorization value, an OAuth client secret, a registry credential) on "Credentials". The browser encrypts them before upload. Then refer to them by secret_id in a new configuration version.
  4. 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.
  5. 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 /pending and resume one with POST /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). /workspace is 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_URL and GUARD_HTTP_URL are set for it; OPENAI_API_KEY is a placeholder, because the forwarder does the authentication. The agent gets no control-plane, upstream or cloud credentials.
  • Submitting needs an Idempotency-Key.
LimitValue
Runs per project1 running at a time, at most 30 queued or running in total
Time900 seconds by default, at most 3,600
Container2 CPUs, 4 GiB, 128 processes
Input / result / artifacts / logs1 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.