Skip to content

API Service

arc-guard-service exposes the guard pipeline through a thin FastAPI layer. It owns transport, request IDs, CORS, and dashboard read routes, but the core guardrail logic still lives in the runtime package.

Primary Routes

RoutePurpose
POST /v1/chat/completionsOpenAI-compatible chat-completions guard surface
POST /v1/guardLegacy neutral guard endpoint retained as a tombstone surface
GET /eventsServer-Sent Events stream for lifecycle events
GET /requestsPaginated dashboard request explorer
GET /requests/{rid}Request workspace manifest
GET /requests/{rid}/decisionStored decision record envelope
GET /requests/{rid}/debugPaginated structured debug entries

Request Lifecycle

Service Responsibilities

  • Mint and propagate a request ID for correlation.
  • Validate transport-level payload shapes.
  • Convert transport payloads into GuardInput.
  • Stream lifecycle events to SSE clients.
  • Expose request, decision, and debug read surfaces for operators.

Settings Highlights

Setting areaExamples
Bind and portservice host and port
CORSexplicit dashboard origin allow-list
Dashboard pagingmax page sizes for request and debug views
Lifecycle capturepayload capture flags and queue capacities

CORS Posture

The service uses an allow-list model rather than wildcard origins. Dashboard reads are intentionally constrained to GET and OPTIONS, and an empty origin list means no dashboard CORS surface is opened by default.

Open source but Use responsibly 🛡️