Jobs, Workflows & Detection
Relata ships a unified extension + job + report framework — six extension kinds (Connector, Detector, Enricher, Scorer, Job, Report) sharing one signed Manifest, one ACL/principal/audit contract, and one scheduler plane. This page covers the detection/analysis surface: pattern-detection jobs, the detection-rules engine, governance-aware workflows, intelligence feeds, and the domain packs that bundle them.
Pattern detection
Four typed continuous Job extensions run on a schedule, scan ingested data for investigation-significant patterns, and emit typed AlertEvent records with full PROV-O provenance. Each runs under the BATCH scheduler class (yields to interactive), writes alerts that inherit the strictest classification of the data that triggered them, and is validated by ExtensionShakedown against a GoldenDataset before promotion from shadow to live.
| Job | Schedule | Scans | Detects |
|---|---|---|---|
C2BeaconDetectJob | hourly | NetFlowEvent, DnsQueryEvent | Periodic outbound traffic (coefficient-of-variation < 0.15, small dest-IP set, consistent payload) → C2_BEACON |
ConvoyDetectJob | every 30 min | MovementEvent, CellAttachEvent | ≥3 entities within 500 m moving together ≥15 min → CONVOY |
TransactionRingDetectJob | hourly | transaction graph (WireTransferHop, UpiTxn, ImpsTxn, CryptoTxn) | Circular flow A→B→C→A (depth ≤6, ≥ tenant threshold) → TRANSACTION_RING |
ContradictionDetectJob | daily | entity/link/event assertions | Same (entity, property) with conflicting values from reliable sources, not explained by bi-temporal succession → CONTRADICTION |
Jobs are discoverable via SUGGEST_EXTENSIONS() and surface in the MCP list_jobs / job_status / schedule_job tools. The detection algorithms live in crates/relata-jobs/src/pattern_detection/.
Detection rules engine
A lightweight detection-rules engine complements the typed pattern-detection jobs. Rules are continuously evaluated against new data; each is defined in SQL or Sigma-compatible YAML.
# Register a detection rule (SQL condition against a target type)
curl -X POST http://localhost:9090/rules \
-H "Authorization: Bearer $RELATA_BEARER_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "large-transfer-flag",
"trigger": {
"type": "Transaction",
"condition": "amount > 100000 AND currency = '\''USD'\''"
},
"action": "flag"
}'Sigma rule import
Sigma is the vendor-neutral signature format for SIEM detection rules. Import Sigma YAML directly:
relata import-sigma rules/suspicious_dns.yamlRules must pass a precision/recall gate against a golden dataset before promotion from shadow to live.
Rule lifecycle
| Endpoint | Method | Description |
|---|---|---|
/rules | GET / POST | List / create rules |
/rules/:id | DELETE | Disable/delete rule |
/rules/:id/snooze | POST | Temporarily disable |
/rules/:id/suppress | POST | Suppress alerts |
/rules/:id/exceptions | POST | Add exception |
/rules/:id/tuning | GET | Tuning suggestions |
/alerts/list | GET | List fired alerts |
/alerts/update/:id | PATCH | Update alert status |
Rule conditions are validated at create + eval time (rejects ;, --, /* */; rejects UNION/INTERSECT/EXCEPT adjacent to punctuation; 2048-byte length cap) to prevent SQL injection through rule text.
Detection modes
live— alerts fire immediately when data matchesshadow— alerts are logged but not surfaced (for validation before promotion)disabled— rule is inactive
Workflows (governance-aware DAGs)
Workflows are DAGs of steps that automate multi-stage analysis:
curl -X POST http://localhost:9090/workflows \
-H "Authorization: Bearer $RELATA_BEARER_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "fraud-investigation",
"steps": [
{"name": "detect", "type": "rule", "rule": "large-transfer-flag"},
{"name": "enrich", "type": "lookup", "table": "sanctions_list"},
{"name": "report", "type": "report", "template": "sars-template"}
]
}'| Endpoint | Method | Description |
|---|---|---|
/workflows | GET / POST | List / register workflows |
/workflows/:name | GET | Get definition |
/workflows/:name/run | POST | Trigger a run |
/workflows/runs/:run_id | GET | Check run status |
Governance: every workflow step inherits the tenant context, PURPOSE, and ACL of the triggering request. Steps that would violate governance are blocked — workflows cannot bypass policy.
The crates behind it
| Crate | Role |
|---|---|
relata-jobs | The Job/Report extension framework + 42 built-in jobs across 7 categories (storage hygiene, correctness, retention/compliance, audit/integrity, performance, cluster, egress) + the typed pattern-detection jobs |
relata-intelligence | Incident clustering, anomaly detection, LLM interpretation of alert clusters, detection-rule tuning suggestions |
The MCP surface (job_status, list_jobs, schedule_job, list_workflows, run_workflow, workflow_status, list_rules, create_rule, import_sigma) mirrors these endpoints for tool-calling agents.
RIFN — Relata Intelligence Feed Network
RIFN is Relata's signed, bi-temporal intelligence dissemination network: publishers push knowledge fragments to a Feed Broker over HTTPS + mTLS; the broker authenticates, re-signs the envelope, and exposes them as append-only, cursor-addressed channels; subscribers (a local Relata deployment) pull diffs and apply them to their ontology-graph via SmartIngest + EVIDENCE_INTAKE. Every feed entry is a typed, signed FeedEntry with 14 payload kinds covering the full ontological surface (object/link assertions, events, ontology extensions, enrichment rules, job definitions, governance policies, reference data, identity bindings, revocations…).
- The implementation lives in the
relata-feed+relata-feed-brokercrates. - Subscribers ingest via a typed
FeedSyncJobon a schedule — not a daemon — applying signedFeedEntryvalues through SmartIngest. Content-hash-addressed entries deduplicate across publishers automatically;RevokeEntryhandles retractions first-class. - The broker is the licensed component; the engine and subscriber-side
FeedSyncJobare open core. A deployment may self-host a private broker for internal agency dissemination. - Progressive bootstrap: a new subscriber consumes reference-data and ontology layers first (layers 0–3), then live intelligence (layers 4–7); subscribers track a high-water mark per channel.
Domain packs
Packs bundle a domain's ontology types, detectors, jobs, reports, and detection rules into a signed, versioned unit. The repo ships ~20 domain packs + ~25 jurisdiction packs; the portal's use-cases map onto them:
| Use-case | Pack | Detection content |
|---|---|---|
| Financial intelligence / AML | finint | Sanctions/PEP screening, wire/crypto tracing, transaction-ring detection |
| Cyber threat intel | cyber | C2 beacon detection, Sigma rules, IOC ingest |
| Counter-terrorism | counter_terror | Convoy detection, co-location / network analysis |
| Law-enforcement telco | lea | CDR analysis, ANPR trace, tower-dump |
| Maritime | maritime | AIS, dark-fleet detection |
| OSINT identity fusion | counter_intel | Identity resolution, persona-cluster detection |
| Counter-intelligence / narcotics / border / defense | counter_intel / narcotics / border / defense | Domain pattern sets |
| Regional / sectoral | gcc_mena, india, geopolitics, health, aml + jurisdiction-<cc> (25) | Per-jurisdiction legal type sets |
relata-pack-stub demonstrates the pack layout for authoring new packs.
Jobs
Background jobs (storage hygiene, correctness, retention/compliance, audit/integrity, performance, cluster, egress) run maintenance tasks:
relata jobs # list all jobs
relata jobs status indexer # check a specific job| Endpoint | Method | Description |
|---|---|---|
/jobs | GET | List jobs |
/jobs/:name | GET | Job status |
See also
- Security — governance and policy enforcement
- Connectors & Extensions — the extension framework + Connector trait
- Observability — monitoring detection alerts
- Ingestion — ingest pipelines that feed detection