How abhi291712/agentshield-pa works
AgentShield is a security layer for a synthetic healthcare prior-authorization agent, not a model or decision system. A reviewer’s request reaches the Lambda handler and guarded pipeline, which checks kill switches and quota before a bounded agent session returns advisory output for human review; the pipeline audits outcomes and handles failures. Separate security capabilities cover identity, policy, tool governance, retrieval, human approval, evaluation, incident response, readiness, and secure delivery. Source excerpts show the request path and several internal calls; other capability links rely on README descriptions, and unsampled implementation details are not asserted.
Main entry points: handler.py API handler · pipeline.py Guarded pipeline · mcp.py Tool plane · audit.py Audit trail
Components 21
Request and agent
- API handler
src/handler.py - Guarded pipeline
src/pipeline.py - Agent session
src/agent.py - Direct review
src/core.py
Access and action controls
- Identity tokens
src/identity.py - Policy engine
src/policy.py - Tool plane
src/mcp.py - Human approvals
src/workflow.py
Evidence and guardrails
- Content guardrails
src/guardrails.py - Governed memory
src/memory.py - Governed retrieval
src/rag.py
Audit and operations
- Audit trail
src/audit.py - Reliability controls
src/reliability.py - Observability
src/observability.py - Incident response
src/incident.py
Assurance and governance
- Security evaluations
src/evals.py - Secure delivery
src/delivery.py - Readiness gate
src/readiness.py
Other components
- Reviewer
- Amazon Bedrock
- DynamoDB
Connections 28
- Reviewer → API handler: submits request
README.md - API handler → Guarded pipeline: routes agent request
src/handler.py - API handler → Direct review: routes review request
src/handler.py - API handler → Amazon Bedrock: invokes Converse
src/handler.py - Guarded pipeline → Agent session: runs session
src/pipeline.py - Guarded pipeline → Reliability controls: checks quota and classifies failures
src/pipeline.py - Guarded pipeline → Content guardrails: checks output
src/pipeline.py - Guarded pipeline → Audit trail: records request
src/pipeline.py - Guarded pipeline → Incident response: checks kill switch
src/handler.py - Agent session → Amazon Bedrock: requests model turns
- Agent session → Identity tokens: uses delegated identity
README.md - Agent session → Tool plane: dispatches tools
README.md - Tool plane → Policy engine: checks authorization
README.md - Tool plane → Human approvals: requires approval
README.md - Tool plane → Content guardrails: screens tool content
README.md - Tool plane → DynamoDB: uses case data
README.md - Direct review → Amazon Bedrock: sends bounded evidence
- Governed retrieval → Content guardrails: screens ingested text
src/rag.py - Governed memory → Content guardrails: uses content checks
src/memory.py - API handler → DynamoDB: reads case records
src/handler.py - API handler → Audit trail: configures audit sink
src/handler.py - Audit trail → DynamoDB: writes audit entries
src/audit.py - Observability → Audit trail: analyzes events
src/observability.py - Incident response → Audit trail: verifies audit trail
src/incident.py - Incident response → Security evaluations: adds regression cases
src/incident.py - Security evaluations → Content guardrails: evaluates defenses
README.md - Secure delivery → Direct review: checks change boundaries
src/delivery.py - Readiness gate → Secure delivery: gates readiness
README.md