Put an agent behind Gateway.
Connect a coding agent in a few minutes, or route your own agent's calls through SecureSpace Gateway. Sign up free; agents and keys are created in the console.
curl -X POST https://gateway.securespace.club/v1/proxy/crm/contacts \
-H "x-securespace-api-key: $SECURESPACE_API_KEY" \
-H "content-type: application/json" \
-d '{"name": "Ada", "email": "ada@example.com"}'Four ways in.
All start with a free account, and the same rules apply to each. Your organisation begins with starter rules: force-pushes, wiping the disk, and system files are blocked, fake links are stopped, and secrets need a person's approval.
A coding agent
Claude Code, Codex, Grok Build, GitHub Copilot, Gemini CLI, or Cursor. Install the plugin or hooks, sign the machine in, and approve the code in the console.
/plugin marketplace add securespace-dev/securespace-plugin
/plugin install securespace@securespacenpx @securespace-club/cli install-hooks --platform copilot
# or: --platform gemini-cli, --platform cursornpx @securespace-club/cli loginYour own agent
- 1. Register a destination on the console's Upstreams page, for example crm.
- 2. Create an agent on the Agents page, and a key for it. The key is shown once.
- 3. Send its calls through Gateway with the key, by plain HTTP or an SDK.
npm install @securespace-club/sdk-node
pip install securespacecurl -X POST https://gateway.securespace.club/v1/proxy/crm/contacts \
-H "x-securespace-api-key: $SECURESPACE_API_KEY" \
-H "content-type: application/json" \
-d '{"name": "Ada", "email": "ada@example.com"}'Claude, ChatGPT and Grok
Add SecureSpace as a custom connector, sign in, and choose Allow. There is no key to copy. The assistant can then check links, fetch pages safely, ask a person for approval, and read your rules.
https://api.securespace.club/mcp- Claude: Settings, Connectors, Add custom connector.
- ChatGPT: Settings, Apps and Connectors, developer mode, create a connector.
- Grok: grok.com/connectors, add a custom connector.
The browser
Coming to Chrome and EdgeThe SecureSpace extension checks every page a person, or an AI agent browsing for them, opens: lookalike sites are stopped before anything is typed, and a secret pasted into ChatGPT, Claude, Gemini or Grok is caught first, on the device.
- Works without an account; signed in, your organisation's rules apply.
- Admins can install it on every browser by policy and stop it being paused.
- Pasted text is never sent anywhere.
Four ideas to understand first.
Gateway is a service you call
Your agent sends requests to Gateway's URL. Nothing is injected into your process, so there is no in-process enforcement to bypass.
Destinations are names, not URLs
Your organisation registers each destination once (for example crm). Agents then address it by name. A request cannot name a host you did not register.
Gateway classifies the action
The recorded verb reflects what the request does. You may declare a verb with x-securespace-verb; it can raise the classification, never lower it.
A block is a result
A refused request returns a structured response your code can branch on. The SDKs return it as a value rather than throwing.
Node and Python.
Both SDKs are thin clients over the HTTP contract below and depend on nothing outside the standard library. Any language can call Gateway directly.
import { SecureSpaceClient } from "@securespace-club/sdk-node";
const ss = new SecureSpaceClient({
baseUrl: "https://gateway.securespace.club",
apiKey: process.env.SECURESPACE_API_KEY!,
});
// "crm" is a destination your organisation registered.
const res = await ss.post("crm", "/contacts", { name: "Ada" });
if (res.blocked) {
console.error(`blocked: ${res.errorCode} (${res.decision.action})`);
} else {
console.log(res.body);
}import os
from securespace import SecureSpaceClient
ss = SecureSpaceClient(
"https://gateway.securespace.club",
os.environ["SECURESPACE_API_KEY"],
)
res = ss.post("crm", "/contacts", {"name": "Ada"})
if res.blocked:
print(f"blocked: {res.error_code} ({res.decision.action})")
else:
print(res.body)Guard your agent's own tools.
Wrap a tool and SecureSpace decides before it runs. A refused call throws instead of running, and frameworks hand that to the model as a tool error. Only a hash of the arguments is sent; once a person approves, the identical call runs once.
import { guardTool } from "@securespace-club/sdk-node";
// SecureSpace decides before the tool runs. Use refund as the tool's body in
// the OpenAI Agents SDK, LangGraph.js or the Vercel AI SDK.
const refund = guardTool(
{
gatewayUrl: "https://gateway.securespace.club",
apiKey: process.env.SECURESPACE_API_KEY!,
namespace: "billing",
},
{ name: "refund", declaredVerb: "transfer" },
async (orderId: string, amount: number) => payments.refund(orderId, amount),
);import os
from agents import function_tool # or LangChain's @tool, CrewAI's @tool
from securespace import Guard
guard = Guard(
"https://gateway.securespace.club",
os.environ["SECURESPACE_API_KEY"],
namespace="billing",
)
@function_tool
@guard.tool(declared_verb="transfer")
def refund(order_id: str, amount: int) -> str:
"""Refund an order."""
return payments.refund(order_id, amount)The request.
ANY /v1/proxy/:upstream/<path>?<query>| Header | Required | Meaning |
|---|---|---|
| x-securespace-api-key | Required | The agent's API key. |
| x-securespace-verb | Optional | Your claim about the action. Raises the classification only. |
| content-type | With a body | Required when sending a request body. |
:upstream is a destination name your organisation registered: lower-case letters, digits, dots, underscores, and hyphens, up to 63 characters. The path segment is authoritative and cannot be overridden by a header.
The response.
The destination's status, body, and most headers are returned as-is. Gateway adds the headers below. Set-Cookie from the destination is not relayed.
| Header | Meaning |
|---|---|
| x-securespace-action-id | The recorded action. Quote it when asking about a decision. |
| x-securespace-decision-id | The decision that was enforced. |
| x-securespace-action | The verb Gateway classified. |
| x-securespace-upstream-called | false when Gateway refused before contacting the destination. |
| x-securespace-redirect-not-followed | true when a redirect was returned rather than followed. |
One error shape, nine codes.
Errors are always JSON. Retrying control_plane_unavailable is reasonable, and rate_limited after its Retry-After. Retrying policy_denied is not: it is a decision.
{ "error": { "code": "policy_denied", "message": "..." } }| Status | Code | Meaning |
|---|---|---|
| 401 | unauthenticated | Missing, wrong, revoked, or expired key. |
| 400 | invalid_request | Missing destination name or unreadable body. |
| 404 | upstream_not_registered | That name is not configured for your organisation. |
| 403 | policy_denied | Your policy refused the request. The destination was not contacted. |
| 403 | approval_required | A rule asks a person first. The x-securespace-approval-id header names the request; once it is approved in the console, the identical retry runs once. |
| 429 | rate_limited | A limit or budget rule is used up. Retry-After says when to try again. |
| 403 | upstream_blocked | A network-safety control refused the destination. |
| 502 | control_plane_unavailable | No decision could be obtained, so the request was refused. |
| 502 | upstream_unreachable | The request was allowed; the destination then failed. |
Behaviour that may surprise you.
- Redirects are returned to you, not followed. A redirect target has not been checked.
- Neither Gateway nor the SDKs retry. A refusal is a decision, not a transient error.
- Your API key never reaches the destination. It is removed before forwarding.
- Request and response bodies are buffered, so Gateway is not suited to large file transfers.
- Remote MCP servers are reached through a separate endpoint over Streamable HTTP. Local servers a coding agent launches go through the CLI's bridge (securespace mcp-bridge).
Ready to route your first agent?
Sign up, then connect a coding agent or create a key for your own. Running agents in production across a team? We can help you set it up.