How ACGP Works¶
This page explains the complete ACGP governance flow from agent decision to intervention outcome.
The Big Picture¶
ACGP provides real-time governance for AI agents through continuous behavioral evaluation. Every agent action is evaluated before execution, with proportionate interventions based on risk.
graph LR
Agent[Agent Makes Decision] --> Trace[Emit Cognitive Trace]
Trace --> Steward[Governance Steward]
Steward --> Evaluate[Evaluate CTQ]
Evaluate --> Decision{Risk Level?}
Decision -->|Low| OK[ OK - Proceed]
Decision -->|Minor| Nudge[ Nudge - Suggest]
Decision -->|Medium| Escalate[ Escalate - Review]
Decision -->|High| Block[ Block - Deny]
Decision -->|Critical| Halt[ Halt - Stop All]
Step-by-Step Flow¶
1. Agent Makes a Decision¶
Your AI agent decides to take an action (e.g., issue a refund, modify data, send an email).
# Agent decides to issue a refund
action = "issue_refund"
parameters = {"amount": 150, "reason": "defective_product"}
reasoning = "Customer reported defective item, standard refund policy applies"
2. Emit Cognitive Trace¶
Before executing, the agent creates a Cognitive Trace - a structured record of its reasoning and intended action.
from acgp import CognitiveTrace
trace = CognitiveTrace(
reasoning=reasoning,
action=action,
parameters=parameters,
context={
"customer_id": "C12345",
"order_id": "O67890",
"agent_id": "refund-agent-v2"
}
)
Key components:
- Reasoning - Why the agent chose this action
- Action - What the agent wants to do
- Parameters - Specific details of the action
- Context - Relevant metadata
3. Governance Steward Evaluation¶
The Governance Steward receives the trace and evaluates it against:
- Governance Contracts - Performance SLAs and evaluation requirements
- Reflection Blueprints - Policy rules and constraints
- Tripwires - Hard limits (e.g., max refund amount)
- Historical Behavior - Trust score and past performance
from acgp import GovernanceSteward
steward = GovernanceSteward(
acl_tier="ACL-2", # Moderate autonomy
blueprint="customer-service-v1",
tripwires={"max_refund": 500}
)
result = steward.evaluate(trace)
4. CTQ (Cognitive Trace Quality) Assessment¶
The steward calculates a CTQ score based on:
- Reasoning quality - Is the logic sound?
- Policy compliance - Does it follow rules?
- Risk level - What could go wrong?
- Context appropriateness - Is it suitable for the situation?
5. Intervention Decision¶
Based on the CTQ score and ACL tier, the steward decides on an intervention:
| CTQ Score | ACL-2 Intervention | Meaning |
|---|---|---|
| 90-100 | OK | Proceed without interruption |
| 70-89 | Nudge | Suggestion to reconsider |
| 50-69 | Escalate | Request human review |
| 20-49 | Block | Deny this specific action |
| 0-19 | Halt | Stop agent completely |
# Result from evaluation
print(result.intervention) # "OK"
print(result.ctq_score) # 92
print(result.message) # "Approved - standard refund policy"
6. Agent Response¶
The agent receives the intervention and responds accordingly:
if result.intervention == "OK":
# Execute the action
issue_refund(amount=150, reason="defective_product")
log_success(result)
elif result.intervention == "NUDGE":
# Log suggestion but proceed
log_warning(result.message)
issue_refund(amount=150, reason="defective_product")
elif result.intervention == "ESCALATE":
# Request human review
create_review_ticket(trace, result)
notify_human_reviewer()
elif result.intervention == "BLOCK":
# Don't execute, inform user
notify_agent(result.message)
log_blocked_action(trace)
elif result.intervention == "HALT":
# Stop all operations
shutdown_agent()
alert_administrators()
7. Audit & Learning¶
All traces and interventions are logged for:
- Compliance auditing - Regulatory requirements
- Performance monitoring - Track agent behavior
- Trust building - Improve CTQ scores over time
- Policy refinement - Tune governance rules
# Audit log entry
{
"timestamp": "2026-01-08T10:30:45Z",
"agent_id": "refund-agent-v2",
"trace_id": "tr_abc123",
"action": "issue_refund",
"intervention": "OK",
"ctq_score": 92,
"latency_ms": 45,
"acl_tier": "ACL-2"
}
Example Scenarios¶
Scenario 1: Approved Action (OK)¶
Situation: Customer requests $50 refund for defective item
trace = CognitiveTrace(
reasoning="Customer reported defective item, within return window",
action="issue_refund",
parameters={"amount": 50}
)
result = steward.evaluate(trace)
# → intervention: "OK", ctq_score: 95
# → Action proceeds immediately
Outcome: Refund issued in 12ms total latency
Scenario 2: Suspicious Activity (Block)¶
Situation: Bulk refund request for $50,000
trace = CognitiveTrace(
reasoning="Processing bulk refund request",
action="issue_refund",
parameters={"amount": 50000}
)
result = steward.evaluate(trace)
# → intervention: "BLOCK", ctq_score: 15
# → Tripwire triggered: exceeds max_refund
Outcome: ⊗ Action blocked, administrator notified
Scenario 3: Edge Case (Escalate)¶
Situation: Unusual refund pattern detected
trace = CognitiveTrace(
reasoning="Customer requests refund for all recent orders",
action="issue_refund",
parameters={"amount": 450}
)
result = steward.evaluate(trace)
# → intervention: "ESCALATE", ctq_score: 55
# → Pattern anomaly detected
Outcome: ⬆ Human review requested, customer notified of delay
ACL Tiers & Autonomy¶
Different ACL (Access Control Level) tiers provide different levels of oversight:
| ACL Tier | Autonomy | Evaluation Depth | Latency | Use Case |
|---|---|---|---|---|
| ACL-0 | Minimal | Basic checks | ~10ms typical, <50ms max | Read-only bots |
| ACL-1 | Low | Simple rules | ~20ms typical, <100ms max | Scripted agents |
| ACL-2 | Moderate | Policy evaluation | ~50ms typical, <150ms max | Customer service |
| ACL-3 | High | Deep analysis | ~100ms typical, <200ms max | Financial decisions |
| ACL-4 | Very High | Multi-layer checks | ~200ms typical, <350ms max | Critical systems |
| ACL-5 | Maximum | Consensus required | ~500ms typical, <1000ms max | Regulated industries |
Higher ACL tiers = more oversight = higher latency = safer operations
Governance Contracts¶
Governance Contracts define performance SLAs and evaluation requirements:
governance_contract:
performance_sla:
max_latency_ms: 100
min_ctq_score: 80
evaluation_tiers:
eval_tier_0: # Fast path
conditions: ["action in ['read', 'query']"]
checks: ["basic_validation"]
eval_tier_1: # Standard
conditions: ["action in ['update', 'create']"]
checks: ["policy_compliance", "risk_assessment"]
eval_tier_2: # Deep
conditions: ["amount > 1000"]
checks: ["full_evaluation", "multi_validator"]
Learn about Governance Contracts
Key Benefits¶
1. Real-Time Prevention¶
Catch problems before they happen, not after.
2. Proportionate Response¶
Not everything is a crisis - use Nudge for minor issues, Block for serious ones.
3. Transparent Reasoning¶
Every decision is explained and auditable.
4. Gradual Autonomy¶
Build trust over time - start strict, relax as agents prove themselves.
5. Framework Agnostic¶
Works with any agent framework (LangChain, AutoGPT, custom).
Architecture Layers¶
ACGP operates in three layers:
flowchart TB
subgraph Layer1["RISK ASSESSMENT"]
direction LR
L1A[Calculate ARS] --> L1B[Assign ACL Tier]
end
subgraph Layer2["POLICY CONFIGURATION"]
direction LR
L2A[Define Blueprints] -.-> L2B[Set Contracts] -.-> L2C[Configure Tripwires]
end
subgraph Layer3["RUNTIME GOVERNANCE"]
direction LR
L3A[Evaluate Traces] --> L3B[Calculate CTQ] --> L3C[Issue Interventions]
end
Layer1 ==> Layer2 ==> Layer3
style Layer1 fill:#e3f2fd,stroke:#1976d2,stroke-width:2px
style Layer2 fill:#f3e5f5,stroke:#7b1fa2,stroke-width:2px
style Layer3 fill:#fff3e0,stroke:#f57c00,stroke-width:2px
Common Questions¶
How much latency does ACGP add?¶
10-500ms depending on ACL tier (typical latency; maximums are ~2x typical). Most production systems use ACL-2 (~50ms typical, <150ms maximum).
Can agents override interventions?¶
No. Interventions are enforced by the Governance Steward. Agents cannot bypass governance.
What if the steward fails?¶
Fail-safe mode: If the steward is unavailable, agents default to their configured fallback behavior (typically BLOCK or HALT).
How do I tune policies?¶
Start strict, monitor interventions, gradually relax rules as trust builds. Use audit logs to identify false positives.
Next Steps¶
-
Try It Now
Build your first governed agent in 5 minutes.
-
Deep Dive
Understand the ARI framework in detail.
-
Implement
Follow step-by-step implementation guides.
-
Read the Spec
Complete technical specification.
Related Concepts¶
- ARI Framework - Agent-Reflection-Intervention architecture
- ACL Tiers - Access control levels explained
- Interventions - Five-level response system
- Cognitive Traces - Transparent reasoning trails
- Governance Contracts - Performance SLAs and evaluation