Documentation

Quick Start & API Reference

Quick Start

One-Command Setup

$ git clone https://github.com/secure-mind-live/agnostic-security-releases.git
$ cd agnostic-security-releases
$ pip install -e .
$ as-init
Detected: Claude Code, VS Code, Cursor
Configured protections for all tools

Start the Gateway

$ source .venv/bin/activate
$ uvicorn main:app --port 8000
Dashboard: http://localhost:8000/unified
API docs: http://localhost:8000/docs

API Reference

Smart Routing

MethodEndpointDescription
GET/routing/modelsList all 14 models with capabilities, costs, speed, coding/reasoning scores
GET/routing/statsPer-provider request counts, latency (avg/p95), cost, failure rates
GET/routing/configCurrent routing strategy (auto/cheapest/fastest/best_quality/local_only)
POST/routing/config?strategy=XChange routing strategy
GET/routing/explain?prompt=XDry run — shows which model would be selected and why

Privacy Mode

MethodEndpointDescription
GET/privacyGet current privacy mode, cloud_llm_blocked, allowed_providers
POST/privacy?mode=XSet mode: full_privacy, balanced, permissive. Returns 400 on invalid.

Shadow AI

MethodEndpointDescription
GET/shadow-aiScan for AI tools — returns detected tools, approved vs unauthorized

Knowledge Graph

MethodEndpointDescription
GET/graph/statsNode/edge/event counts, nodes by type

Block Rules

MethodEndpointDescription
GET/block-rulesList all block rules
POST/block-rulesAdd a new block rule (keyword or regex)
DELETE/block-rules/{id}Remove a block rule

Taxonomy Configuration

MethodEndpointDescription
GET/config/taxonomyGet active breach taxonomy
GET/config/taxonomy/templateGet default template for customization
PUT/config/taxonomyUpdate taxonomy (severity levels, breach types, detection hints)

Admin Console

MethodEndpointDescription
GET/api/v1/policiesList all policies with version history
POST/api/v1/policiesCreate or update a policy (auto-versioned)
POST/api/v1/agents/registerRegister a new agent (returns enrollment token)
POST/api/v1/agents/{id}/approveApprove a pending agent
POST/api/v1/agents/{id}/revokeRevoke an agent's access
GET/api/v1/eventsQuery cross-agent event stream
GET/api/v1/dashboardOrg-wide summary aggregation

Enterprise Privacy

MethodEndpointDescription
GET/privacy/effectiveGet effective privacy mode for a team (resolves org → team hierarchy)
POST/privacy/orgPush org-wide privacy policy with per-team overrides
GET/privacy/auditQuery privacy policy change audit trail
POST/privacy/scheduleSchedule privacy mode changes (cron + timezone)

Ingress Guard

MethodEndpointDescription
GET/ingress/statsIngress guard stats — blocked, throttled, allowed counts, top risk IPs

Gateway Core

MethodEndpointDescription
POST/v1/chat/completionsSecure chat completions proxy (OpenAI-compatible). Use model: "auto" for smart routing.
GET/healthLiveness probe
GET/v1/auditQuery audit log entries

956 Tests

# v4.22.0 modules (956 tests across 26 suites)
$ python3 scripts/test_privacy_mode.py # 28 PASS
$ python3 scripts/test_knowledge_graph.py # 33 PASS
$ python3 scripts/test_vuln_scanner.py # 45 PASS
$ python3 scripts/test_code_fingerprint.py # 35 PASS
$ python3 scripts/test_shadow_ai.py # 60 PASS
$ python3 scripts/test_ingress_guard.py # 54 PASS (6-layer external agent defense)

# Smart routing + admin (104 tests)
$ python3 scripts/test_smart_router.py # 53 PASS
$ python3 scripts/test_admin_console.py # 51 PASS

# Core + red team (216 tests)
$ python3 scripts/smoke_test.py # 31 PASS
$ python3 scripts/test_red_team.py # 52 PASS (adversarial, 274 attack techniques)
$ ... and 10 more test suites + 55-agent Docker red-team harness

Service Ports

ServicePortStart Command
API Gateway + Dashboard8000uvicorn main:app --port 8000
LLM Proxy18790python3 llm/llm_proxy.py --port 18790
Breach Engine8081uvicorn breach_intel.main:app --port 8081