Bot detection
This server flow scores every incoming event for bot and AI-agent traffic before it reaches your destinations. The Express source forwards the request user agent, the bot transformer reads it, and a demo destination logs the annotated events. Nothing is dropped: scoring is annotation, and you filter downstream.
{
"version": 4,
"flows": {
"default": {
"config": {
"platform": "server",
"bundle": {
"packages": {
"@walkeros/collector": {},
"@walkeros/server-source-express": {},
"@walkeros/server-transformer-bot": {},
"@walkeros/destination-demo": {}
}
}
},
"sources": {
"express": {
"package": "@walkeros/server-source-express",
"config": {
"settings": { "port": 8080 },
"ingest": {
"map": {
"userAgent": { "key": "headers.user-agent" }
}
}
}
}
},
"transformers": {
"bot": {
"package": "@walkeros/server-transformer-bot"
}
},
"destinations": {
"console": {
"package": "@walkeros/destination-demo",
"config": {
"settings": { "name": "Event Logger" }
}
}
},
"collector": { "run": true }
}
}
}Run it
Save the config as flow.json and push an event through the built flow with the destination mocked. Nothing is sent anywhere:
npx walkeros push flow.json -e '{"name":"page view"}' --simulate destination.consoleYou should see:
success: true
Duration: 42msWhat you get
Every event now carries user.botScore and user.agentScore (0-99, higher means more bot). In production the demo destination logs each annotated event; a request from GPTBot looks like this (from the transformer's examples):
[demo] {
"name": "page view",
"user": {
"botScore": 95,
"agentScore": 95
},
...
}Offline runs have no user agent, so simulated events score the missing-UA baseline of 70. To act on the scores, add a mapping condition on your real destinations that drops or segments events where botScore exceeds 50. See Bot detection for the full filtering recipes.
Next steps
- Bot detection transformer: Scores, AI-agent map, and filtering recipes
- Bundled mode: Build and run the flow with the CLI