How infantesromeroadrian/strands-agentguard works
Strands AgentGuard is a defensive harness for assessing Strands agents and MCP tool surfaces with reproducible scenarios and evidence-backed reports. The main workflow is CLI invocation, target/scenario setup, trial execution through a mediated world, trace-based evaluation, and report generation. A separate inventory workflow discovers registered MCP servers and fingerprints their tools. The graph preserves the documented real Ollama target and security-control scenarios; unsampled implementation details are represented only where the tree or README supports them.
Main entry points: runner.py Assessment Runner · cli.py CLI · inventory.py Inventory Discovery · doctor.py Health Checks
Components 22
Scenario Assessment
- Assessment Runner
src/strands_agentguard/assessment/runner.py - Scenario Catalog
src/strands_agentguard/assessment/catalog.py - Payload Sets
src/strands_agentguard/assessment/payloads.py - Scenario Worlds
src/strands_agentguard/assessment/worlds.py - Trial World
src/strands_agentguard/assessment/model.py - Reference Agent
src/strands_agentguard/assessment/agents.py - Trace Evaluator
src/strands_agentguard/assessment/evaluate.py - Assessment Reports
src/strands_agentguard/assessment/runner.py
Targets And Controls
- Target Setup
src/strands_agentguard/assessment/targets.py - Deterministic Target
src/strands_agentguard/targets/deterministic.py - Fixture Identity
src/strands_agentguard/targets/identity.py - Strands Ollama Target
src/strands_agentguard/assessment/strands_target.py
MCP Inventory
- Inventory Discovery
src/strands_agentguard/inventory.py - Server Configuration
src/strands_agentguard/servers.py - Observed Inventory
src/strands_agentguard/observed.py - Synthetic MCP Server
src/strands_agentguard/synthetic_mcp.py - Synthetic Tools
src/strands_agentguard/local_tools.py
Contracts And Validation
- Data Contracts
src/strands_agentguard/contracts.py - Health Checks
src/strands_agentguard/doctor.py
Other components
- Agent Owner
- CLI
src/strands_agentguard/cli.py - Ollama Service
Connections 31
- Agent Owner → CLI: runs commands
README.md - CLI → Assessment Runner: starts assessment
src/strands_agentguard/cli.py - CLI → Target Setup: selects target
src/strands_agentguard/cli.py - CLI → Inventory Discovery: requests inventory
src/strands_agentguard/cli.py - CLI → Health Checks: runs checks
src/strands_agentguard/cli.py - Assessment Runner → Scenario Catalog: loads scenarios
src/strands_agentguard/assessment/runner.py - Assessment Runner → Payload Sets: selects payloads
src/strands_agentguard/assessment/runner.py - Assessment Runner → Scenario Worlds: builds situations
src/strands_agentguard/assessment/runner.py - Assessment Runner → Trial World: mediates trials
src/strands_agentguard/assessment/runner.py - Assessment Runner → Reference Agent: runs agent
src/strands_agentguard/assessment/runner.py - Assessment Runner → Trace Evaluator: evaluates traces
src/strands_agentguard/assessment/runner.py - Assessment Runner → Assessment Reports: writes reports
src/strands_agentguard/assessment/runner.py - Target Setup → Fixture Identity: validates fixture
src/strands_agentguard/assessment/targets.py - Target Setup → Reference Agent: selects reference
src/strands_agentguard/assessment/targets.py - Trial World → Reference Agent: exposes tools
src/strands_agentguard/assessment/agents.py - Trial World → Trace Evaluator: records trace
src/strands_agentguard/assessment/model.py - Assessment Runner → Deterministic Target: executes supported cases
README.md - CLI → Strands Ollama Target: configures real target
src/strands_agentguard/cli.py - Strands Ollama Target → Trial World: routes tool calls
src/strands_agentguard/assessment/strands_target.py - Strands Ollama Target → Ollama Service: queries model
README.md - Agent Owner → Server Configuration: registers servers
README.md - Inventory Discovery → Server Configuration: loads allowlist
README.md - Inventory Discovery → Synthetic MCP Server: discovers tools
src/strands_agentguard/inventory.py - Synthetic MCP Server → Synthetic Tools: exposes tools
src/strands_agentguard/synthetic_mcp.py - CLI → Observed Inventory: uses inventory output
src/strands_agentguard/cli.py - Observed Inventory → Inventory Discovery: summarizes surface
src/strands_agentguard/observed.py - Assessment Runner → Data Contracts: validates result data
src/strands_agentguard/assessment/runner.py - Inventory Discovery → Data Contracts: uses data contracts
src/strands_agentguard/inventory.py - Health Checks → Data Contracts: checks schemas
src/strands_agentguard/doctor.py - Health Checks → Inventory Discovery: checks discovery
src/strands_agentguard/doctor.py - Health Checks → Deterministic Target: checks target
src/strands_agentguard/doctor.py