Patterns
Implementation Guide
Guardrails ACS / Implementation Guide

Step-by-Step Implementation Guide

This sequence assumes you’re retrofitting guardrails onto an existing agent estate rather than starting greenfield β€” that’s the more common (and harder) enterprise case.


Step 1 β€” Inventory Your Agent Environment

Before instrumenting anything, map what your agents actually touch.

Use the AOS Environment Model

AOS’s own environment model is a useful checklist:

ComponentExamplesLocalRemoteRelated Protocol
UserChat UI, Slack, emailβœ“βœ“β€”
TriggerSchedules, webhooks, inbound notificationsβœ“βœ“β€”
Other agentsSub-agents, peer agentsβœ“βœ“A2A
MemorySession history, long-term storeβœ“βœ“β€”
KnowledgeFiles, RAG indexes, external sourcesβœ“βœ“MCP
PromptsSaved prompt templatesβœ“βœ—MCP
API/OS toolsREST calls, function calls, OS-level actionsβœ“βœ“/βœ—MCP
LLMDirect model calls for reasoning or sub-tasksβœ“βœ“β€”

Output of This Step

A component list per agent, each tagged with:

  • Whether it’s local or remote
  • Which protocol (if any) governs it

This becomes your:

  • Instrumentation checklist for Step 2
  • Seed data for your AgBOM in Step 9

Step 2 β€” Prioritize Hook Coverage Against Your Risk Profile

Don’t instrument everything at once.

Run the Risk Mapping

Use the Section 5 mapping table against your actual agent estate:

  • Which ASI risks are most plausible given what your agents do?
  • An agent with no code-execution tool doesn’t need to prioritize ASI05 mitigations on day one
  • An agent that writes to shared memory should prioritize ASI06 immediately

Output

A ranked list of hooks to instrument first, based on:

  • Risk exposure β€” which risks are most likely for your agents
  • Business impact β€” which failures would be most damaging
  • Implementation complexity β€” which hooks are easiest to add first

Step 3 β€” Instrument the Input and Output Boundary First

Start with the User Message and Agent Response hooks.

Why Start Here

  • Cheapest integration point β€” every agent has exactly one inbound and one outbound boundary
  • Quick wins β€” gives you your first working Guardian Agent policy quickly
  • High leverage β€” catches the crudest attacks immediately

Minimal Policy Example

A minimal policy check at this stage might look like:

hook: message (role=user)
policy: reject-known-injection-patterns, reject-out-of-scope-topics
verdict-on-match: deny (respond with a safe refusal template)
verdict-on-clean: allow

Watch Out For

Treating this as sufficient. Input/output filtering alone:

  • Catches the crudest attacks
  • Does nothing about poisoned tool results
  • Does nothing about compromised sub-agents
  • That’s why the next steps matter

Step 4 β€” Instrument the Tool-Call Boundary

The Tool Call Request and Tool Call Result hooks are the highest-leverage control point.

Why Tool Calls Matter

Almost every consequential action routes through a tool call:

  • Database writes
  • Email sends
  • Payments
  • File deletions

Wire Both Request and Result

hook: toolCallRequest
context: { tool: "send_email", params: {...}, reasoning: "..." }
policy: cost-control, data-protection, destructive-action-review
verdict: allow | deny | modify(params)

hook: toolCallResult
context: { tool: "database_query", result: {...} }
policy: pii-redaction, result-size-limit
verdict: allow | deny | modify(result)

Watch Out For

Policies that only inspect the tool name and not the parameters:

  • A deny on “any database_query” is safe but useless
  • A policy that inspects the query text for SELECT * or unscoped access is the actual control

Step 5 β€” Stand Up the Guardian Agent as a Real Policy Engine

By this point you need a proper enforcement point, not ad hoc checks scattered across hook handlers.

Guardian Agent Requirements

A Guardian Agent β€” a service (or SDK-embedded component) that:

  1. Receives hook events over the standardized method calls (see Appendix A)
  2. Evaluates them against declarative policy β€” start with data-protection, cost-control, and destructive-action categories
  3. Returns a verdict object with a reason string β€” the reason is what makes your later audit trail actually explainable, not just a log of allow/deny flags

Output

A single, testable enforcement point that every future policy change goes through, instead of a policy check duplicated across every agent.


Step 6 β€” Extend into Memory and Knowledge Hooks

Add Memory Context Retrieval, Knowledge Retrieval, and Memory Store hooks.

Addressing ASI06 (Memory & Context Poisoning)

This is where you address memory poisoning directly:

  • Gate what gets written to memory (so an attacker can’t plant instructions for a future session)
  • Gate what gets read back into context (so stale or poisoned entries don’t silently resurface)

Watch Out For

Only gating the write path:

  • Poisoned content that entered memory before you had this control is still sitting there
  • The read-path gate is what catches it going forward
  • You may need a one-time memory audit as well

Step 7 β€” Extend into MCP and A2A Protocol Traffic

If your agents call remote MCP servers or delegate to other agents over A2A, instrument the protocol-level hooks.

Protocol-Level Hooks

  • MCP Outbound/Inbound β€” for Model Context Protocol traffic
  • A2A task-delegation, cancellation, and status hooks β€” for inter-agent communication

Addressing ASI04 and ASI07

This is where:

  • ASI04 (Supply Chain) gets addressed β€” allow-listed set of MCP servers
  • ASI07 (Insecure Inter-Agent Communication) gets addressed β€” authenticated, policy-checked A2A handoffs rather than implicit trust between agents

Step 8 β€” Wire Up Trace

Emit OpenTelemetry spans with agent-specific attributes for every hook firing from Steps 3–7.

Trace Attributes

For every hook, emit spans with:

  • Session ID β€” track interactions across time
  • Agent name β€” identify which agent performed the action
  • Reasoning steps β€” understand agent decision-making
  • Tools called β€” see what actions the agent attempted

Map to OCSF

Map the security-relevant subset of those events to OCSF and forward them to whatever SIEM your security team already operates.

Goal

An incident responder should be able to reconstruct a multi-agent workflow’s full decision chain without needing bespoke tooling per agent framework.


Step 9 β€” Generate and Maintain a Dynamic AgBOM

Using your Step 1 inventory as a starting point, generate an initial AgBOM.

Initial AgBOM

Generate in CycloneDX or SPDX format capturing:

  • Every model per agent
  • Every tool per agent
  • Every knowledge source per agent

Make It Dynamic

Wire AgBOM regeneration into your capability-discovery events:

  • New MCP server connected
  • New tool registered
  • Model switched

Output

A living inventory you can diff against policy β€” “this agent just gained access to a new tool; is that tool approved?”


Step 10 β€” Layer in Tier 3 Enterprise Classifiers

Bring your organization’s own detectors into the Guardian Agent.

Enterprise Classifier Examples

  • PII/PHI detectors β€” data sensitivity classification
  • Cost control β€” budget monitoring and alerting
  • Jurisdiction-specific rules β€” data residency requirements
  • Industry-specific rules β€” sector-specific regulations

This is the Tier where…

  • Financial services bring a data-sensitivity model
  • Healthcare brings PHI detection
  • You bring whatever security tooling you already trust

Step 11 β€” Map Controls to Regulatory Requirements

Build an explicit crosswalk from your instrumented hooks to the compliance language your legal and risk teams need.

EU AI Act Article 14 (Human Oversight)

  • Requirement: Natural persons can monitor, understand, intervene in, and halt high-risk AI systems
  • ACS Mapping: The deny/modify verdict at any hook plus the Trace audit record

NIST AI RMF MEASURE/MANAGE Functions

  • Requirement: Continuous monitoring and the demonstrated capacity to disengage an autonomous system operating outside acceptable parameters
  • ACS Mapping: Runtime hook evaluation + trace-based monitoring + deny verdict as disengagement

Output

This crosswalk is what turns your implementation into audit-ready evidence rather than an engineering exercise nobody outside the team understands.


Step 12 β€” Establish an Ongoing Governance Cadence

Guardrails aren’t a one-time build. At minimum:

Regular Review

  • Review Guardian Agent verdict logs on a fixed cadence (weekly for new deployments, monthly once stable)
  • Tune policy thresholds based on false-positive/false-negative rates

Testing

  • Red-team new and changed agents against the ASI01–ASI10 scenarios from Section 5 before they go to production

Maintenance

  • Re-check the AgBOM against your approved-component list whenever an agent’s capabilities change

Community Contribution

  • Feed what you learn back into the open standard β€” ACS and AOS are both actively soliciting implementation feedback, and issues found in production are exactly what a public-preview spec needs

Implementation Timeline Considerations

Phased Approach

Don’t try to implement all 12 steps at once:

  • Phase 1 (Weeks 1-4): Steps 1-3 β€” inventory, prioritization, input/output hooks
  • Phase 2 (Weeks 5-8): Steps 4-6 β€” tool hooks, Guardian Agent, memory hooks
  • Phase 3 (Weeks 9-12): Steps 7-9 β€” protocol hooks, trace, AgBOM
  • Phase 4 (Weeks 13-16): Steps 10-12 β€” enterprise classifiers, compliance mapping, governance

Success Metrics

Define what success looks like at each phase:

  • Phase 1: Input/output filtering catching obvious attacks
  • Phase 2: Tool misuse prevention working reliably
  • Phase 3: Full observability and inventory established
  • Phase 4: Compliance requirements met and governance cadence established

Key Takeaways

  1. Start with inventory β€” you can’t govern what you don’t know exists
  2. Prioritize based on risk β€” focus on highest-impact hooks first
  3. Begin with input/output β€” cheapest integration point with quick wins
  4. Build the Guardian Agent early β€” centralize policy enforcement
  5. Make it dynamic β€” AgBOM and policies should update automatically
  6. Map to compliance β€” connect technical controls to regulatory requirements
  7. Establish governance β€” guardrails require ongoing maintenance and review

Next Steps

  • Reference Architecture β€” see the complete system design
  • Governance Checklist β€” assess your implementation maturity