Event Ingestion
The events API is the primary entry point for scoring agent actions. Events are validated, persisted, and scored through the 4-layer pipeline in a single synchronous request.Endpoints
POST /events
Score a single agent event synchronously. Returns the full score response.
POST /events/batch
Submit up to 1,000 events for async processing. Returns event IDs immediately.
Event Schema
Every event must include anaction in canonical domain:scope:verb format:
Scoring Flow
- Validate API key, check rate limit by customer_id and model_tier
- Persist event as
AgentEventin PostgreSQL - Score with GraphReasoner (forward-chaining + optional GNN + optional Memgraph enrichment)
- LLM fallback if confidence < 0.8: retrieve RAG context from Memgraph, call Gemini with compliance grounding
- Save
Scorerecord with full decomposition - Return
EventResponsewith score, risk_level, violations, compliance_refs, mitigations
Data Field Classification
Data fields can be submitted as strings or classified objects:- Simple strings
- Classified objects
Classification Levels
| Classification | Description | Risk Weight |
|---|---|---|
public | Public data | 1.0× |
internal | Internal business data | 1.3× |
pii | Personal data (name, email, phone) | 2.5× |
pii_sensitive | Sensitive PII (SSN, passport, tax ID) | 2.5× |
financial | Financial data (credit card, bank account) | 2.5× |
health | Health/medical data | 2.5× |
auth | Authentication credentials | 3.5× |
legal | Legal documents | 2.5× |