-
Notifications
You must be signed in to change notification settings - Fork 4
Task Tools
8 MCP tools for task coordination, plus 5 consensus tools for high-stakes task approval.
Create a new task for an agent type with optional drift detection and consensus checking.
Input:
{
"agentType": "coder",
"input": "Implement JWT validation",
"sessionId": "session-id",
"parentTaskId": "parent-task-uuid",
"riskLevel": "medium"
}Output:
{
"success": true,
"task": {
"id": "uuid",
"agentType": "coder",
"status": "pending",
"parentTaskId": "parent-task-uuid",
"riskLevel": "medium",
"depth": 1
},
"drift": {
"isDrift": false,
"highestSimilarity": 0.45,
"action": "allowed"
}
}New Parameters:
-
parentTaskId: Link to parent task for drift detection -
riskLevel:low|medium|highfor consensus checking
Note: If drift is detected with prevent behavior or consensus is required, task creation may be blocked.
Assign task to specific agent.
Input:
{
"taskId": "task-id",
"agentId": "agent-id"
}Mark task as completed.
Input:
{
"taskId": "task-id",
"output": "Implementation completed",
"status": "completed"
}List tasks with filters.
Input:
{
"sessionId": "session-id",
"status": "pending"
}Get task details.
Input:
{
"taskId": "task-id"
}Check if a task description would trigger drift detection against ancestor tasks.
Input:
{
"taskInput": "Implement payment processing",
"taskType": "coder",
"parentTaskId": "parent-task-uuid"
}Output:
{
"success": true,
"result": {
"isDrift": true,
"highestSimilarity": 0.97,
"mostSimilarTaskId": "ancestor-uuid",
"mostSimilarTaskInput": "Original task description...",
"action": "warned",
"checkedAncestors": 3
},
"config": {
"enabled": true,
"threshold": 0.95,
"warningThreshold": 0.85,
"behavior": "warn"
}
}Required: taskInput, taskType
Get relationships for a task (parent/child, dependencies).
Input:
{
"taskId": "task-uuid",
"direction": "both"
}Output:
{
"success": true,
"count": 3,
"relationships": [
{
"id": "rel-uuid",
"fromTaskId": "parent-uuid",
"toTaskId": "task-uuid",
"relationshipType": "parent_of",
"createdAt": "2026-01-29T10:00:00Z"
}
]
}Direction Options: outgoing | incoming | both
Get drift detection metrics and statistics.
Input:
{
"since": "2026-01-01T00:00:00Z"
}Output:
{
"success": true,
"metrics": {
"totalEvents": 150,
"allowedCount": 120,
"warnedCount": 25,
"preventedCount": 5,
"averageSimilarity": 0.65
},
"recentEvents": [
{
"id": "event-uuid",
"taskId": "task-uuid",
"taskType": "coder",
"ancestorTaskId": "ancestor-uuid",
"similarityScore": 0.96,
"actionTaken": "warned",
"createdAt": "2026-01-29T10:00:00Z"
}
],
"config": {
"enabled": true,
"threshold": 0.95,
"warningThreshold": 0.85,
"ancestorDepth": 3,
"behavior": "warn"
}
}Consensus checkpoints provide human-in-the-loop approval for high-risk task creation.
Check if a task would require consensus before creation.
Input:
{
"agentType": "coder",
"input": "Deploy to production",
"parentTaskId": "parent-uuid",
"riskLevel": "high"
}Output:
{
"success": true,
"requiresConsensus": true,
"reason": "Risk level 'high' at depth 2 requires consensus",
"riskLevel": "high",
"depth": 2,
"config": {
"enabled": true,
"requireForRiskLevels": ["high", "medium"],
"maxDepth": 5
}
}List pending consensus checkpoints awaiting approval.
Input:
{
"limit": 10,
"offset": 0
}Output:
{
"success": true,
"count": 2,
"checkpoints": [
{
"id": "checkpoint-uuid",
"taskId": "task-uuid",
"parentTaskId": "parent-uuid",
"riskLevel": "high",
"status": "pending",
"reviewerStrategy": "adversarial",
"subtaskCount": 3,
"createdAt": "2026-01-29T10:00:00Z",
"expiresAt": "2026-01-29T10:05:00Z"
}
]
}Get a consensus checkpoint by ID.
Input:
{
"checkpointId": "checkpoint-uuid"
}Output:
{
"success": true,
"checkpoint": {
"id": "checkpoint-uuid",
"taskId": "task-uuid",
"parentTaskId": "parent-uuid",
"proposedSubtasks": [
{
"id": "subtask-uuid",
"agentType": "coder",
"input": "Implement feature X",
"estimatedRiskLevel": "medium"
}
],
"riskLevel": "high",
"status": "pending",
"reviewerStrategy": "adversarial",
"createdAt": "2026-01-29T10:00:00Z",
"expiresAt": "2026-01-29T10:05:00Z"
}
}Approve a consensus checkpoint.
Input:
{
"checkpointId": "checkpoint-uuid",
"reviewedBy": "user-123",
"feedback": "Approved after security review"
}Output:
{
"success": true,
"checkpoint": {
"id": "checkpoint-uuid",
"status": "approved",
"decidedAt": "2026-01-29T10:02:00Z"
}
}Required: checkpointId, reviewedBy
Reject a consensus checkpoint (fully or partially).
Input:
{
"checkpointId": "checkpoint-uuid",
"reviewedBy": "user-123",
"feedback": "Security concerns with subtask 2",
"rejectedSubtaskIds": ["subtask-uuid-2"]
}Output:
{
"success": true,
"checkpoint": {
"id": "checkpoint-uuid",
"status": "rejected",
"decidedAt": "2026-01-29T10:02:00Z"
}
}Required: checkpointId, reviewedBy
Optional: rejectedSubtaskIds for partial rejection
Drift detection prevents semantic drift - when subtasks gradually deviate from the original task scope.
- When a task is created with
parentTaskId, the system generates an embedding of the task input - The embedding is compared against ancestor tasks up to
ancestorDepthlevels - If similarity exceeds
threshold, drift is detected
{
"driftDetection": {
"enabled": true,
"threshold": 0.95,
"warningThreshold": 0.85,
"ancestorDepth": 3,
"behavior": "warn",
"asyncEmbedding": true
}
}| Behavior | Action |
|---|---|
warn |
Log warning but allow task creation |
prevent |
Block task creation if drift detected |
Consensus checkpoints ensure human approval before high-risk operations.
- Task risk level in
requireForRiskLevels(default:high,medium) - Task depth within
maxDepth(default: 5) - Task has a parent (root tasks don't require consensus)
Risk is automatically estimated based on:
-
Agent type:
coder,devops,security-auditor→ high risk - Input patterns: "delete", "production", "credentials" → high risk
-
Configurable: Custom patterns via
highRiskPatterns,mediumRiskPatterns
| Strategy | Description |
|---|---|
adversarial |
Spawn adversarial agent to review |
different-model |
Use different LLM for review |
human |
Require human approval |
Related:
Getting Started
Core Concepts
Agent Guides
- Overview
- Coder
- Researcher
- Tester
- Reviewer
- Adversarial
- Architect
- Coordinator
- Analyst
- DevOps
- Documentation
- Security Auditor
MCP Tools
- Overview
- Agent Tools
- Memory Tools
- Task Tools
- Session Tools
- System Tools
- GitHub Tools
- Review Loop Tools
- Identity Tools
Recipes
- Index
- Code Review
- Doc Sync
- Multi-Agent
- Adversarial Testing
- Full-Stack Feature
- Memory Patterns
- GitHub Integration
Advanced
- Plugin Development
- Custom Agent Types
- Workflow Engine
- Vector Search Setup
- Web Dashboard
- Programmatic API
- Resource Monitoring
Reference