agentaccess

package
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 25, 2026 License: Apache-2.0 Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package agentaccess correlates observed agent runtime / tool-call events with the static AI-agent inventory Identrail already discovered (declared agents, their backing runtime role, and their declared tools). The output ties observed behavior back to agent identity, backing role, tool, target resource, and outcome so an operator can answer, per (agent, tool) pair:

  • confirmed: the agent and tool are declared in the inventory AND a tool-call was observed. Behavior matches the discovered agent surface.
  • observed_without_declaration: a tool-call was observed for an agent that is not in the inventory (a shadow agent) or for a tool the agent does not declare (an undeclared tool). Treated as a caveat, never a silent success.
  • declared_unused: the agent declares the tool but no tool-call was observed in the window. Carries a missing-event caveat because agent tool-call telemetry is not guaranteed to be complete; absence is not proof the tool was never used.

On top of the inventory join, the correlation flags when the observed backing role differs from the agent's declared runtime role (privilege drift) and surfaces failed tool-call outcomes.

Safety boundary: the engine is metadata-only. It never reads, logs, or persists prompts, completions, tool inputs/outputs, browser pages, code-interpreter output, or any other customer payload — only the already-redacted runtime-event and agent-inventory metadata. Every emitted correlation re-stamps the redaction boundary.

Index

Constants

View Source
const (
	StatusConfirmed                  = "confirmed"
	StatusObservedWithoutDeclaration = "observed_without_declaration"
	StatusDeclaredUnused             = "declared_unused"
)

Correlation statuses.

View Source
const (
	OutcomeSucceeded = "succeeded"
	OutcomeFailed    = "failed"
	OutcomeUnknown   = "unknown"
)

Tool-call outcomes.

View Source
const (
	// CollectorName tags every diagnostic and result the correlator
	// emits so the API layer can scope diagnostics by collector.
	CollectorName = "aws_agent_runtime_access"

	// RedactionBoundary documents that the correlator only ever crossed
	// the metadata boundary — no prompts, completions, or tool payloads.
	RedactionBoundary = "metadata_only_no_prompts_no_completions_no_tool_payloads"
)
View Source
const (
	CaveatDataEventCoverage    = "agent_tool_telemetry_may_be_incomplete"
	CaveatAgentNotInInventory  = "agent_not_in_inventory"
	CaveatToolNotDeclared      = "tool_not_declared_by_agent"
	CaveatBackingRoleMismatch  = "observed_backing_role_differs_from_declared"
	CaveatToolCallFailed       = "observed_tool_call_failed"
	CaveatLineageUnresolved    = "session_lineage_unresolved"
	CaveatInventoryUnavailable = "agent_inventory_unavailable_for_confirmation"
)

Caveat codes attached to individual correlations or the result.

Variables

This section is empty.

Functions

This section is empty.

Types

type CorrelateRequest

type CorrelateRequest struct {
	AccountID string
	Region    string
	Observed  []ObservedToolCall
	Declared  []DeclaredTool
	// KnownAgentNodeIDs is the set of agent node ids present in the
	// inventory (including agents that declare no tools). It lets the
	// engine distinguish a shadow agent (agent_not_in_inventory) from a
	// known agent invoking an undeclared tool (tool_not_declared).
	KnownAgentNodeIDs []string
	// InventoryAvailable reports whether the AI-agent inventory was
	// actually available for this correlation pass. When false (e.g. the
	// inventory could not be loaded in live mode), an observed tool-call
	// is surfaced with a neutral "inventory unavailable" caveat rather
	// than being mislabeled as a shadow agent, since absence of the
	// inventory is not evidence the agent is undeclared.
	InventoryAvailable bool
	// DataEventCoverageUnknown marks that the observed set comes from a
	// runtime source that does not guarantee agent tool-call telemetry is
	// complete. When true, declared_unused correlations and the result
	// carry the missing-event caveat.
	DataEventCoverageUnknown bool
}

CorrelateRequest configures one correlation pass.

type Correlation

type Correlation struct {
	CorrelationID           string
	AgentNodeID             string
	AgentID                 string
	AgentName               string
	AgentType               string
	RuntimeVersion          string
	ToolName                string
	ToolTargetRef           string
	AccountID               string
	Region                  string
	Status                  string
	Confidence              float64
	ObservedCount           int
	ObservedEventIDs        []string
	BackingRoleARNs         []string
	BackingRoleNodeIDs      []string
	DeclaredBackingRole     string
	DeclaredBackingRoleNode string
	TargetResourceARNs      []string
	TargetResourceNodeIDs   []string
	Outcomes                []string
	SessionIDs              []string
	FirstObservedAt         time.Time
	LastObservedAt          time.Time
	DeclaredInInventory     bool
	Caveats                 []string
	EvidenceRefs            []string
	RedactionBoundary       string
}

Correlation is one (agent, tool) correlation record.

type DeclaredTool

type DeclaredTool struct {
	AgentNodeID       string
	AgentID           string
	AgentName         string
	AgentType         string
	RuntimeVersion    string
	ToolName          string
	ToolTargetRef     string
	BackingRoleARN    string
	BackingRoleNodeID string
	AccountID         string
	Region            string
	Confidence        float64
	EvidenceRef       string
}

DeclaredTool is one declared (agent, tool) pair from the AI-agent inventory. A tool name of "" represents an agent that declares no tools (so the agent itself can still be surfaced as declared_unused).

type ObservedToolCall

type ObservedToolCall struct {
	EventID              string
	AgentNodeID          string
	AgentID              string
	AgentType            string
	RuntimeVersion       string
	ToolName             string
	ToolTargetRef        string
	BackingRoleARN       string
	BackingRoleNodeID    string
	TargetResourceARN    string
	TargetResourceNodeID string
	Outcome              string
	SessionID            string
	AccountID            string
	Region               string
	LineageStatus        string
	ObservedAt           time.Time
	EvidenceRef          string
}

ObservedToolCall is one metadata-only agent runtime / tool-call event projected from the runtime-event contract.

type Result

type Result struct {
	Correlations                []Correlation
	Caveats                     []string
	ConfirmedCount              int
	ObservedWithoutDecl         int
	DeclaredUnusedCount         int
	ShadowAgentCount            int
	UndeclaredToolCount         int
	BackingRoleMismatchCount    int
	FailedToolCallCount         int
	AgentCount                  int
	ToolCount                   int
	ObservedToolCallsConsidered int
	DeclaredToolsConsidered     int
}

Result is the bounded outcome of one correlation pass.

func Correlate

func Correlate(request CorrelateRequest) Result

Correlate joins observed tool-calls with the declared agent inventory and returns one correlation per (agent, tool) pair. It never returns an error: documented gaps surface as caveats so the API layer can return a stable response.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL