Put Edge in front of your routes, inside your app.
Install the SDK for Node.js, Python, Go or Java, add two lines, and see which agents, crawlers and bots use your site. Nothing is refused until you choose.
import express from "express";
import { createEdge } from "@securespace-club/edge";
const app = express();
const edge = createEdge(); // reads SECURESPACE_EDGE_KEY
app.use(edge.middleware());From sign-up to your first report.
- 01
Sign up and choose Edge
One account covers Gateway and Edge.
- 02
Add a site
Name it, list its paths, and set rules per path in the console under Sites.
- 03
Create an Edge key
Shown once. Put it in SECURESPACE_EDGE_KEY on your servers.
- 04
Install the SDK and add two lines
Your site now reports in monitor mode: nothing is refused.
- 05
Watch, then enforce
Read Activity and the heat map. Turn on enforcement when you are ready.
Four languages, one decision engine.
Every SDK runs the same shared decision engine, checked against the same test cases, so a rule decides identically in each. None adds a framework dependency to your app.
npm install @securespace-club/edgepip install securespace-edgego get securespace.club/edge<dependency>
<groupId>club.securespace</groupId>
<artifactId>securespace-edge</artifactId>
<version>0.1.0</version>
</dependency>Wire it into the framework you run.
Add Edge first, before your routes and authentication, so it sees every request. Express is shown in the quickstart above.
const edge = createEdge();
app.addHook("onRequest", edge.fastify());import { createEdge } from "@securespace-club/edge";
const edge = createEdge();
export default edge.wrap(async (request) => handle(request));app.use("*", edge.hono());http.createServer(async (req, res) => {
if (await edge.protect(req, res)) return; // Edge already answered
handle(req, res);
});MIDDLEWARE = [
"securespace_edge.django.EdgeMiddleware", # first
# ... your other middleware
]from securespace_edge.flask import protect
app = Flask(__name__)
protect(app) # reads SECURESPACE_EDGE_KEYfrom securespace_edge import SecureSpaceEdge, EdgeASGI
app.add_middleware(EdgeASGI, edge=SecureSpaceEdge())import "securespace.club/edge/edgegin"
e := edge.New(edge.Options{})
router.Use(edgegin.Middleware(e))import "securespace.club/edge/edgeecho"
e := edge.New(edge.Options{})
app.Use(edgeecho.Middleware(e))@Bean
FilterRegistrationBean<EdgeFilter> edgeFilter() {
var bean = new FilterRegistrationBean<>(new EdgeFilter(new Edge(new Edge.Options())));
bean.setOrder(Ordered.HIGHEST_PRECEDENCE);
return bean;
}servletContext
.addFilter("securespace-edge", new EdgeFilter(new Edge(new Edge.Options())))
.addMappingForUrlPatterns(null, false, "/*");Environment variables.
Behind a load balancer or CDN, tell Edge which header carries the real client address (trustedIpHeader, trusted_ip_header or TrustedIPHeader).
| Variable | Purpose |
|---|---|
| SECURESPACE_EDGE_KEY | The site's Edge key, from the console. |
| SECURESPACE_EDGE_HASH_KEY | Your own hashing key. Addresses and cookies are hashed with it before leaving your server; SecureSpace never sees it. |
| SECURESPACE_EDGE_MODE=off | Kill switch: pass every request through, with no network at all. |
| SECURESPACE_EDGE_URL | Only for testing against a non-production scoring service. |
Monitor, enforce, off.
| Mode | When | What the SDK does |
|---|---|---|
| monitor | Default, and the free plan | Works out every decision and records what it would do. Always serves the request. |
| enforce | Paid plans | Applies the decision. A new or changed rule still starts log-only, so turning enforcement on never makes a brand-new rule refuse anyone. |
| off | Kill switch | Passes everything through. Set in the console (within 60 seconds) or by environment variable (at start-up). |
Four answers, each with a way forward.
The ladder only goes up: a rule or a model can move a visitor towards block, never back. For people's browsers you can render your own page instead of JSON.
| Decision | Status | Body and headers |
|---|---|---|
| allow | Your handler runs | Nothing is added. |
| throttle | 429 | Retry-After in seconds, and a JSON body with reason and retryAfter. |
| raise | 401 | WWW-Authenticate: SecureSpace-Agent, and a JSON body listing the ways to identify: a signed request, an agent token, or a proof of work. |
| block | 403 | A JSON body with a reason code and a support reference, never the rule itself. |
{
"error": "identify_required",
"message": "This site lets AI agents in when they identify themselves.",
"ways": [
{ "kind": "signed_request", "spec": "web-bot-auth" },
{ "kind": "agent_token", "issuer": "https://you.example/.well-known/agent-auth" },
{ "kind": "proof_of_work", "challenge": "<opaque>", "difficulty": 18 }
],
"policy": "https://you.example/.well-known/agent-policy.json",
"reference": "edg_7Qm2..."
}Let your users' agents in by name.
Your own login issues agent tokens (JWTs) for the agents your users connect. Edge verifies them locally against your keys and knows which agent it is and which person it acts for. A 24-hour pause stops that agent only; the person stays signed in.
- Agents that sign requests with Web Bot Auth are verified without any setup.
- Your rules are published at /.well-known/agent-policy.json for agents to read.
- An anonymous script can pass a raise by solving the proof of work it was sent.
const edge = createEdge({
agentTokens: {
issuers: [
{
issuer: "https://you.example",
audience: "https://you.example/api",
jwksUrl: "https://you.example/.well-known/jwks.json",
},
],
},
});Check an agent's purchase when you charge.
Set purchase routes, a ceiling and a currency per site in the console. Edge cannot read a request body, so your checkout handler passes the amount. An agent needs a purchase claim in its token: true, or a limit such as { "max": 5000, "currency": "INR" }. Without it, or over a limit, the agent is asked to step up, never refused.
// In your checkout handler, at the moment of charging:
const answer = edge.checkPurchase(req, { amount: 4200, currency: "INR" });
if (!answer.allowed && answer.refusal) {
const { status, headers, body } = answer.refusal; // asks the agent to step up
return res.writeHead(status, headers).end(body);
}What leaves your server, and what never does.
Edge sends request metadata: method, path pattern, timing, header names and a few header values. Addresses, cookies and user identifiers are hashed with your key first. Request and response bodies are never read.
Behaviour that may surprise you.
- If SecureSpace is slow or unreachable, Edge serves the request. Protection drops; your site does not.
- Edge refreshes its signed rules every 60 seconds and keeps the last good set if a refresh fails.
- People's browsers below 8 requests a minute are not watched at all, and cost no memory.
- Verified crawlers and signed-in agents are never scored as strangers.
- Errors inside Edge are reported to SecureSpace and never reach your visitors.
Ready to see who visits?
Sign up, choose Edge, and we will set up your first site with you in monitor mode.