-
Notifications
You must be signed in to change notification settings - Fork 55
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Summary
Every toolkit consumer implements the same try/except import pattern for graceful degradation when toolkit packages are optional:
try:
from agent_os_kernel import PolicyEvaluator
_TOOLKIT_AVAILABLE = True
except ImportError:
_TOOLKIT_AVAILABLE = False
This pattern appears in 5+ files in ai-native-team daemon (trust.py, reliability.py, authority.py, governance.py, conversation_guardian.py).
Proposal
The toolkit should provide:
- governance.available() -> bool — check if toolkit is installed
- No-op fallback implementations that pass-through without enforcement
- A single import: from agent_governance_toolkit import get_policy_evaluator (returns real or no-op)
- Optional dependency marker so consumers can pip install agent-governance-toolkit[full] or agent-governance-toolkit[minimal]
Why This Matters
Graceful degradation is essential for tools that work both with and without the full governance stack. But each consumer reimplements identical try/except blocks, leading to inconsistent fallback behavior and boilerplate.
Real-World Evidence
ai-native-team daemon has this exact pattern in 5 files, each with slightly different fallback behavior. A toolkit-native solution would standardize this.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request