Severity is computed shipped
Formulas over tables compute severity, scores and due dates the same way every time, on the Go VM and in SQL. The model's opinion is a field beside them; it is never the severity.
AI agents now triage alerts at machine speed, and analysts keep authority over the decisions that matter. Between the two there has to be one record of each case: what the agent found, how sure it is, what was done, who did it and what is allowed next. In FadoDB that record is a document.
Each alert or incident is one document with typed fields, Excel-style formulas, a statechart and access written as formulas. The agent writes its verdict and its evidence. The engine computes the severity, refuses a step the agent may not take alone, and records every change with who made it and when.
Every AI SOC has to decide how far its agents go on their own, and the answer changes as trust grows. Write it where it is enforced: on the transition. The same document is the channel between the agent and the analyst. The agent's reasoning ends in fields, the person's decision is a transition, and both land in one log.
This is the class, and the Go code that ran it on the released v0.6.0 with the output shown. Severity comes from the asset table, not from the model. The agent contains a workstation by itself, and every containment opens a thirty-minute review window: nobody answers, so the engine escalates the case and pages the on-call. On a production server the engine refuses the agent, names the formula, and lets the on-call analyst take the same step. Nobody outside the SOC sees a case at all.
{
"name": "SecurityIncident",
"title": "alert & \" on \" & host",
"variables": {
"alert": {"type": "text", "required": true},
"host": {"type": "text", "required": true},
"score": {"type": "int", "min": 0, "max": 100},
"tier": {"formula": "LOOKUP(Assets, tier, host = THIS.host)"},
"severity": {"formula": "IF(tier = \"production\" OR score >= 80, \"critical\", IF(score >= 50, \"high\", \"low\"))"},
"verdict": {"type": "text"},
"confidence": {"type": "decimal", "scale": 2, "min": 0, "max": 1},
"evidence": {"type": "rows", "schema": {"kind": "text", "value": "text", "source": "text"}}
},
"states": {"initial": "new", "list": ["new", "triaged", "contained", "escalated", "recovered", "closed"], "final": ["closed"]},
"transitions": [
{"name": "triage", "from": "new", "to": "triaged", "guard": "ISNOTBLANK(verdict) AND ISNOTBLANK(confidence)"},
{"name": "dismiss", "from": "triaged", "to": "closed", "guard": "verdict = \"benign\""},
{"name": "contain", "from": "triaged", "to": "contained", "guard": "verdict = \"malicious\""},
{"name": "escalate", "from": "contained", "to": "escalated", "after": "30m"},
{"name": "recover", "from": ["contained", "escalated"], "to": "recovered"},
{"name": "close", "from": "recovered", "to": "closed"}
],
"rules": [{"on": "transition", "name": "escalate",
"do": [{"action": "oncall.page", "args": {"text": "host & \" contained by \" & ENTEREDBY() & \", no review\""}}]}],
"access": {
"read": "INGROUP(\"soc-agents\") OR INGROUP(\"soc-analysts\")",
"create": "INGROUP(\"soc-agents\") OR INGROUP(\"soc-analysts\")",
"update": "INGROUP(\"soc-agents\") OR INGROUP(\"soc-analysts\")",
"delete": "FALSE",
"transition": {
"dismiss": "INGROUP(\"soc-analysts\") OR (INGROUP(\"soc-agents\") AND confidence >= 0.90 AND severity <> \"critical\")",
"contain": "INGROUP(\"soc-oncall\") OR (INGROUP(\"soc-agents\") AND tier <> \"production\")",
"recover": "INGROUP(\"soc-analysts\")",
"close": "INGROUP(\"soc-analysts\")"
}
}
}
page := func(_ context.Context, call *fado.ActionCall) (fado.Values, error) {
fmt.Println("page on-call:", call.Args["text"]) // a real one calls your pager
return nil, nil
}
db, _ := fado.Open("soc.fado", fado.Options{Now: clock.Now, // a rehearsal on our own clock
Outbox: fado.OutboxOptions{Manual: true}, Actions: map[string]fado.ActionFunc{"oncall.page": page}})
setup := fado.As(fado.Principal{ID: "soc-setup", Kind: fado.ActorService,
System: []string{fado.GroupDesigners, fado.GroupAdministrators}})
db.DefineAction(ctx, []byte(`{"name": "oncall.page", "params": {"text": {"type": "text", "required": true}}}`), setup)
db.DefineTable(ctx, []byte(`{"name": "Assets", "columns": {"host": "text", "tier": "text"}, "key": ["host"],
"access": {"read": "TRUE", "write": "INGROUP(\"designers\")"}}`), setup)
db.ImportRows(ctx, "Assets", []fado.Values{{"host": "ws-0142", "tier": "workstation"},
{"host": "db-prod-01", "tier": "production"}}, setup)
db.DefineClass(ctx, incidentJSON, setup)
agent := fado.Principal{ID: "triage-agent", Kind: fado.ActorAgent, Groups: []string{"soc-agents"}}
oncall := fado.Principal{ID: "m.kowalska", Kind: fado.ActorPerson, Groups: []string{"soc-oncall", "soc-analysts"}}
ws, _ := db.Create(ctx, "SecurityIncident", fado.Values{"alert": "Ransomware note", "host": "ws-0142",
"score": 55, "verdict": "malicious", "confidence": "0.97"}, fado.As(agent))
db.Transition(ctx, "SecurityIncident", ws.ID, "triage", nil, fado.As(agent))
ws, _ = db.Transition(ctx, "SecurityIncident", ws.ID, "contain", nil, fado.As(agent))
fmt.Println(ws.State)
// contained
clock.Advance(31 * time.Minute) // and nobody reviews it
db.Drain(ctx, setup)
// page on-call: ws-0142 contained by triage-agent, no review
ws, _ = db.Get(ctx, "SecurityIncident", ws.ID, fado.As(oncall))
fmt.Println(ws.State)
// escalated
inc, _ := db.Create(ctx, "SecurityIncident", fado.Values{"alert": "Credential dumping",
"host": "db-prod-01", "score": 72}, fado.As(agent), fado.Key("siem-alert-88121"))
fmt.Println(inc.Values["tier"], inc.Values["severity"])
// production critical
db.Set(ctx, "SecurityIncident", inc.ID, fado.Values{"verdict": "malicious",
"confidence": "0.94"}, fado.As(agent))
db.Transition(ctx, "SecurityIncident", inc.ID, "triage", nil, fado.As(agent))
_, err := db.Transition(ctx, "SecurityIncident", inc.ID, "contain", nil, fado.As(agent))
fmt.Println(err)
// triage-agent may not take contain from triaged [forbidden]
// in /access/transition/contain; the rule of contain:
// INGROUP("soc-oncall") OR (INGROUP("soc-agents") AND tier <> "production")
inc, _ = db.Transition(ctx, "SecurityIncident", inc.ID, "contain", nil, fado.As(oncall))
fmt.Println(inc.State)
// contained
db.Events on the server's incident returns four events: created, set and triage by triage-agent, an agent, then contain by m.kowalska, a person. On the workstation's, escalate is a transition with the origin timer, made as triage-agent, whose containment set the clock, and the page follows it as action_run. How many incidents sit in each state and severity is SQL over the class's table, for a caller in the analysts group: SELECT state, severity, count(*) FROM SecurityIncident GROUP BY 1, 2. The key on the create makes a retried alert the same commit, so a SIEM that sends twice opens one case.A scripted playbook breaks when an attack does not follow the script, which is why SOC teams are moving triage to AI agents that build each investigation from the evidence. The response still needs a fixed contract: who may contain what, by when, and with what proof. FadoDB leaves the agent free to reason and keeps the contract fixed in the class.
Formulas over tables compute severity, scores and due dates the same way every time, on the Go VM and in SQL. The model's opinion is a field beside them; it is never the severity.
An access formula on each transition, and rights on each field in each state. A refusal carries a stable code and the formula that refused, and the step stays open to whoever may take it.
An agent lists the transitions it may take, each enabled or not with the reason, and previews a change without committing it. It learns where the boundary is without hitting it.
Every create, change and transition is an event with its principal, its business date and its idempotency key. The post-incident review reads it, and time to contain is SQL over it.
Entering contained isolates the host through the EDR, revokes sessions at the identity provider and posts to the channel: declared HTTP actions or Go functions, sent through a transactional outbox with retries, their results written back. Secrets never sit in the class.
The review window, the containment deadline and the escalation when nobody answers are timers on the transitions, woken by the same outbox and recorded in the same log.
It is not a SIEM, a log store, a detection engine or a model. It is the place where each case is defined, computed and remembered, inside your perimeter.
fadodb mcp.Each is a sample class an agent can draft, with its states, its formulas and its guards. The full description of each is in the catalogue; the controls that hold agents in any process are in agent governance.
fadodb mcp, with a key of its own. The use cases are samples an agent could draft, not systems someone has run. If this page claims more than the roadmap does, that is a bug: open an issue.Tell us what your incident looks like, which tools the agent must reach, and which steps must stay with people. Actions shipped with v0.4.0; definitions for particular tools come with real needs.