Enrichment kit for Cloudflare: context added to a signal, in optional layers
Status: in development. Nothing here is released or deployed.
The Enrichment kit takes a signal and adds the context a person needs to decide. It has layers, and each is optional.
Purpose
A signal says that something looked wrong. Enrichment answers what it is, how bad it is and what it touches, and records that in a case. Its agent may cause a block to be proposed, but it holds no write credential, and a person approves any block in Respond.
What it deploys on Cloudflare
- A Worker that consumes the
edge-response-signalsqueue, with a dead-letter queue (edge-response-signals-dead) beside it. Enrichment's stack creates both, because Enrichment is the consumer; Detect only binds to the first by name, so deploy Enrichment before switching Detect's signals queue on. It is declared in Alchemy's plain-module form; see How kits join. - A D1 database for cases, a monthly call counter, the spend ledger and the stop switch.
- A Workers KV namespace that caches lookups per indicator.
- Optionally, Workers AI called through one AI Gateway that you create, with day, month and per-run spend limits.
The layers:
- Automation, with no model. A signal joins the open case with the same dedupe key, or the same entity in the same zone within an hour. Otherwise a case opens.
- Asset context. A lookup of the signal's host in the Asset map. Without the Asset map, the case gets a note.
- Threat intelligence. Cloudflare's Intel APIs and Radar are read once per indicator, cached, and held under a monthly call budget with a read-only token.
- Triage agent. One model call that may answer only propose a block, note, escalate or close. Event text is fenced as untrusted data. When it says to propose a block, code builds the request from the recorded host and zone and the zone's level. The model never supplies a target.
Capability entrypoints
CaseReadlets a peer list cases (listCases) and read one (getCase).EnrichmentOperatorlets a console stop the agent (stopAgents) and resume it in two steps (proposeAgentResume,confirmAgentResume). Each call carries the raw Access assertion and Enrichment verifies it.
The default entrypoint has no such methods. Enrichment itself calls two other kits, through bindings you add: AssetRead on the Asset map and RespondPropose on Respond.
HTTP routes
Behind Cloudflare Access apart from health, same-origin JSON of at most 1 KB with strict fields.
GET /health.GET /v1/casesandGET /v1/cases/{id}. A service token may read.POST /v1/agents/stop,POST /v1/agents/resume/proposeandPOST /v1/agents/resume/confirm.
How a person approves things
Enrichment approves nothing and applies nothing. A recommendation to block goes to Respond as a proposal, and a person answers it there. See Respond.
Stop switches
The agent has a stop switch that starts stopped: the agent does not run until an administrator resumes it. Stopping is immediate for any operator (POST /v1/agents/stop). Resuming is two steps by the same administrator, 60 to 600 seconds apart (/v1/agents/resume/propose, then /v1/agents/resume/confirm). Resuming clears only this kit's flag. A stop in another product stays.
Peers
All optional and off by default. With no Asset map, no Respond, no AI binding and no intelligence token, Enrichment still opens and updates cases, and every layer it skips leaves a note on the case. It reads signals from Detect, looks up assets in the Asset map and sends proposals to Respond.