@agentgatepkg/client
v0.1.0
Published
AgentGate client SDK — browser-based AI agent verification with fingerprinting, telemetry, and challenge solving
Maintainers
Readme
@agentgatepkg/client
Browser SDK for AgentGate — AI agent verification with fingerprinting, telemetry, and challenge solving.
Install
npm install @agentgatepkg/clientQuick Start
import { AgentGateClient } from "@agentgatepkg/client";
const client = new AgentGateClient({
endpoint: "http://localhost:8080",
});
const result = await client.verify();
console.log(result.isAgent); // true
console.log(result.agentScore); // 0.94
console.log(result.token); // JWT for authenticated requestsHow It Works
- Fingerprinting — Collects browser fingerprint (canvas, WebGL, fonts, navigator)
- Telemetry — Records mouse, keyboard, and scroll behavior patterns
- Challenge — Requests and solves a machine-oriented challenge from the server
- Scoring — Submits all data for multi-factor agent/human scoring
- Verdict — Returns verification result with JWT token if verified
Configuration
const client = new AgentGateClient({
endpoint: "https://your-agentgate-server.com", // Required
apiKey: "ag_xxxxx", // Optional: API key for auth
autoVerify: true, // Auto-verify on init (default: true)
telemetry: true, // Collect behavioral telemetry (default: true)
fingerprint: true, // Collect browser fingerprint (default: true)
onVerified: (result) => {}, // Callback on successful verification
onRejected: (result) => {}, // Callback on rejection
onError: (error) => {}, // Callback on error
});
await client.init(); // Start collection + auto-verify
client.destroy(); // CleanupAPI
| Method | Description |
|--------|-------------|
| init() | Initialize client, start telemetry, auto-verify |
| verify() | Run the full verification flow manually |
| destroy() | Stop telemetry and cleanup resources |
Requirements
- AgentGate backend running (setup guide)
Links
License
MIT
