Repository navigation
v0.13.0
OpenIntent Python SDK v0.13.0
Release Date: February 14, 2026
This release adds server-enforced governance to the OpenIntent protocol. Governance policies are now evaluated on every mutation endpoint — the server returns 403 with structured error details when rules are violated. Agents resume automatically via SSE when approval gates clear. Builds on the human escalation and approval request primitives introduced in v0.12.1.
Highlights
- Server-Enforced Governance (RFC-0013) — Declarative
GovernancePolicywith server-side enforcement, 403 rejections, and structured error details - Approval Gates — Approve/deny resolution endpoints for pending approval requests, completing the approval lifecycle started in v0.12.1
- SSE Resume-After-Approval — Governance events broadcast via SSE so agents resume without polling
- Governance Lifecycle Decorators —
@on_governance_blocked,@on_approval_granted,@on_approval_denied self.governanceProxy — Convenient governance operations directly on agent instances- MCP Governance Tools — 4 new tools bringing the total to 62 (reader=21, operator=38, admin=62)
What's New Since v0.12.1
Server-Enforced Governance
GovernancePolicymodel — Declarative policy withcompletion_mode(auto/require_approval/quorum),write_scope(any/assigned_only),allowed_agents,max_cost,quorum_threshold, andrequire_status_reason- Server enforcement — All mutation endpoints (patch_state, update_status, assign_agent, record_cost) evaluate the governance policy and return 403 with structured error details when rules are violated
- Three enforcement pillars:
- Status gates —
require_approvalblocks completion until an approved ApprovalRequest exists;quorumrequires a threshold of assigned agent approvals - Scoped writes —
assigned_onlyrestricts mutations to agents assigned to the intent - Cost ceiling —
max_costrejects cost records that would exceed the budget
- Status gates —
- Fully backward compatible — Intents without a governance policy behave exactly as before (defaults:
completion_mode='auto',write_scope='any')
Governance Policy Endpoints
PUT /api/v1/intents/:id/governance— Set governance policy (with optimistic concurrency viaIf-Match)GET /api/v1/intents/:id/governance— Get effective governance policyDELETE /api/v1/intents/:id/governance— Remove policy (returns to permissive defaults)
Approval Resolution
POST /api/v1/intents/:id/approvals/:id/approve— Approve a pending approval requestPOST /api/v1/intents/:id/approvals/:id/deny— Deny a pending approval request
These resolve the approval gates created by the v0.12.1 request_approval endpoint.
SSE Resume-After-Approval
governance.approval_granted,governance.approval_denied,governance.policy_set, andgovernance.policy_removedevents broadcast via SSE- Agents subscribe automatically and resume when governance gates clear — zero polling
Governance Lifecycle Decorators
@on_governance_blocked— Fired when a mutation is rejected by governance policy. Receives the intent, violated rule, and error detail.@on_approval_granted— Resume hook fired via SSE when an approval is granted. Agents can retry the previously blocked operation.@on_approval_denied— Fired when an approval is denied. Agents can escalate or adjust strategy.governance_policyparameter on@Agent()and@Coordinator()decorators for declarative policy attachment at creation time
self.governance Proxy
set_policy(),get_policy(),remove_policy()— Manage governance policiesrequest_approval(),approve(),deny()— Approval lifecycle operations
MCP Governance Tools
4 new tools added to the MCP server:
set_governance_policy(admin)get_governance_policy(reader)approve_approval(admin)deny_approval(admin)
Updated totals: 62 tools (was 58), reader=21 (was 20), operator=38 (was 37), admin=62 (was 58)
New Event Types
governance.policy_set— Policy attached or updatedgovernance.policy_removed— Policy removedgovernance.approval_granted— Approval gate clearedgovernance.approval_denied— Approval deniedgovernance.violation— Mutation rejected by governance enforcementGOVERNANCE_APPROVAL_ENFORCED— Governance gate satisfied, blocked action proceeds
Breaking Changes
None. All changes are backward compatible.
Installation
pip install openintent==0.13.0
# With server
pip install "openintent[server]==0.13.0"
# With LLM provider
pip install "openintent[openai]==0.13.0"
# Everything
pip install "openintent[all]==0.13.0"Quick Start
from openintent import Agent, on_assignment, on_governance_blocked, on_approval_granted
@Agent("deploy-bot", governance_policy={
"completion_mode": "require_approval",
"write_scope": "assigned_only",
"max_cost": 500.0,
})
class DeployAgent:
@on_assignment
async def deploy(self, intent):
result = await run_deployment(intent)
# Attempt completion — governance returns 403 if not approved
await self.async_client.set_status(
intent.id, "completed", version=intent.version
)
@on_governance_blocked
async def blocked(self, intent, rule, detail):
if rule == "completion_mode":
await self.governance.request_approval(
intent.id, "complete", "Deployment successful, requesting sign-off"
)
# Agent waits — SSE subscription is automatic
@on_approval_granted
async def resume(self, intent, approval):
# Fired via SSE when approval is granted — retry completion
if approval["action"] == "complete":
await self.async_client.set_status(
intent.id, "completed",
version=intent.version,
reason="Approved by coordinator"
)Testing
- 720+ tests passing across all 21 RFCs
- 31 new governance enforcement tests
- All linters passing:
ruff check(0 errors),black --check(all files unchanged)
Full Changelog
See CHANGELOG.md for the complete version history.