Approvals
Manage approval workflows for agents and teams via the AgentOS Control Panel.
Approve, reject, and audit tool executions that require human authorization directly from AgentOS.
1from kern.agent import Agent2from kern.approval import approval3from kern.db.postgres import PostgresDb4from kern.models.openai import OpenAIChat5from kern.os import AgentOS6from kern.tools import tool78db = PostgresDb(db_url="postgresql+psycopg://ai:ai@localhost:5532/ai")910@approval11@tool(requires_confirmation=True)12def delete_user_data(user_id: str) -> str:13 """Permanently delete all data for a user. Requires admin approval."""14 return f"All data for user {user_id} has been deleted."1516agent = Agent(17 id="data-manager",18 model=OpenAIChat(id="gpt-4o-mini"),19 tools=[delete_user_data],20 instructions=["You help users manage data operations."],21 db=db,22)2324app = AgentOS(25 agents=[agent],26 db=db,27).get_app()Approval Flow
When a user triggers a tool decorated with @approval, the run pauses and a pending record is persisted to the database. An admin resolves the request via the AgentOS Control Panel or the API, and the run resumes.
Managing Approvals
View and resolve pending approvals from the AgentOS Control Panel. Each entry shows the agent, tool, arguments, and requesting user.

Review details, approve or reject, and track resolution history.

Approval Types
| Type | Behavior | Use Case |
|---|---|---|
@approval (default) | Blocking. Run pauses until an admin approves or rejects. | Deletions, payments, bulk operations |
@approval(type="audit") | Non-blocking. Run continues; an audit record is created after resolution. | Compliance logging, activity auditing |
Approvals API
| Operation | Endpoint |
|---|---|
| List approvals | GET /approvals |
| Get approval | GET /approvals/{approval_id} |
| Get approval status | GET /approvals/{approval_id}/status |
| Get approval count | GET /approvals/count |
| Resolve approval | POST /approvals/{approval_id}/resolve |
| Delete approval | DELETE /approvals/{approval_id} |
Next Steps
| Task | Guide |
|---|---|
| Blocking approval basics | Approval basic |
| List and resolve workflow | Approval list and resolve |
| Audit-style approvals | Audit approval |
| Team-level approvals | Team approval |
| API reference | Approval API schemas |