Actions
Actions are APM's workflow system for managing approvals, reviews, and decisions in AI-augmented work.
What are Actions?
Actions capture moments when human judgment is needed:
- Approve an AI-generated implementation
- Review a code change
- Validate data accuracy
- Assign to a more experienced teammate
Action Types
π
Implementation Plans
Review and approve AI-generated task plans
β¨
Task Enhancements
Approve modifications to existing tasks
π§
Custom Actions (coming soon)
Define your own approval workflows
Priority Levels
- π΄ Critical - Immediate attention required
- π High - Important, address soon
- π‘ Medium - Standard priority
- π’ Low - Can wait
Creating Actions via MCP
Actions are created through the createAction MCP tool when human approval or review is needed:
# Create an implementation plan review
action = mcp_client.call_tool("createAction", {
type: "implementation_plan",
title: "Review database migration plan",
priority: "high",
requester_id: "ai_agent_123",
assignee_id: "user_456",
payload: {
task_id: "task_789",
proposed_plan: <<~PLAN
1. Backup current database to S3
2. Run migration scripts in transaction
3. Verify data integrity with checksums
4. Update schema version in metadata
PLAN
}
})
# Create a deployment approval
action = mcp_client.call_tool("createAction", {
type: "deployment_approval",
title: "Deploy v2.3.1 to production",
priority: "critical",
requester_id: "deploy_bot",
assignee_id: "ops_lead",
payload: {
version: "2.3.1",
changes: ["Fixed auth bug", "Added rate limiting"],
rollback_plan: "Revert to v2.3.0 if issues detected"
}
})
Updating Actions
Use the updateAction tool to process actions:
# Approve an action
mcp_client.call_tool("updateAction", {
action_id: "action_123",
status: "approved",
resolution_notes: "Plan looks good, proceed with migration"
})
# Reject with feedback
mcp_client.call_tool("updateAction", {
action_id: "action_123",
status: "rejected",
resolution_notes: "Missing rollback procedure, please add"
})
# Mark as in progress
mcp_client.call_tool("updateAction", {
action_id: "action_123",
status: "in_progress",
assignee_id: "user_789" # Reassign if needed
})
Querying Actions
The getActions tool provides filtering capabilities:
# Get all pending actions for a user
my_actions = mcp_client.call_tool("getActions", {
assignee_id: "user_456",
status: ["pending", "in_progress"]
})
# Get critical actions across all projects
urgent = mcp_client.call_tool("getActions", {
priority: "critical",
status: "pending"
})
# Get actions for a specific project
project_actions = mcp_client.call_tool("getActions", {
project_id: "proj_123",
include_resolved: false
})
Action Events
APM broadcasts these action-related events (coming soon):
apm_action_created- New action requires attentionapm_action_updated- Action status or properties changedapm_action_approved- Action was approvedapm_action_rejected- Action was rejectedapm_action_expired- Action timed out without resolution
Automation Patterns
Auto-Escalation
def on_action_created(event)
action = event["action"]
# Escalate critical actions via other channels
if action["priority"] == "critical"
notify_slack(
"π¨ Critical action needs approval: #{action['title']}"
)
end
end
Conditional Approval
def on_action_created(event)
action = event["action"]
# Auto-approve low-risk changes
if action["type"] == "config_change"
risk_score = analyze_risk(action["payload"])
if risk_score < 0.3
mcp_client.call_tool("updateAction", {
action_id: action["id"],
status: "approved",
resolution_notes: "Auto-approved: Low risk change"
})
end
end
end
Best Practices
- Clear Titles - Action titles should immediately convey what needs approval
- Appropriate Priority - Use critical sparingly, for truly urgent items
- Rich Payloads - Include all context needed for informed decisions
