Documentation
¶
Overview ¶
Package runtime implements attack-path execution detection: observed agent actions are matched against the graph's known attack paths, and alerts fire when an agent's behavior advances along a dangerous path (PRD section 68 - "EDR for AI agents").
Index ¶
Constants ¶
const ( LevelHigh = "HIGH" LevelCritical = "CRITICAL" LevelComplete = "COMPLETE" )
Alert levels.
Variables ¶
This section is empty.
Functions ¶
func FormatAlert ¶
FormatAlert renders one alert in the PRD section 68 style.
Types ¶
type Alert ¶
type Alert struct {
Level string `json:"level"`
PathID string `json:"path_id"`
Agent string `json:"agent"`
Target string `json:"target"`
Stages int `json:"stages_observed"`
Total int `json:"total_stages"`
NextNode string `json:"next_node,omitempty"`
Risk int `json:"risk"`
Severity string `json:"severity"`
Timestamp time.Time `json:"timestamp"`
}
Alert is raised when observed events advance an attack path.
type Detector ¶
type Detector struct {
// contains filtered or unexported fields
}
Detector matches event streams against known attack paths.
type Event ¶
type Event struct {
Timestamp time.Time `json:"timestamp"`
Agent string `json:"agent"`
Action string `json:"action,omitempty"` // tool_call, mcp_call, ...
Tool string `json:"tool,omitempty"` // tool or MCP server name
Target string `json:"target,omitempty"` // target node id or name
Detail map[string]any `json:"detail,omitempty"`
}
Event is one observed agent action (e.g. from an MCP gateway log, audit log, or agent telemetry).