Skip to main content
POST
/
api
/
v1
/
tasks
/
{task_id}
/
detect
Run Detection
curl --request POST \
  --url https://api.tracelm.ai/api/v1/tasks/{task_id}/detect

Path Parameters

  • task_id (UUID)
Runs four detectors:
  1. Tool result matching
  2. Loop detection
  3. Tool failure detection
  4. Context failure detection

Response

{
  "task_id": "...",
  "tool_matching": {
    "total_tool_calls": 5,
    "matched": 4,
    "unmatched": 1,
    "orphaned_results": 0
  },
  "loops": {
    "detected": true,
    "patterns": 1,
    "highest_severity": "medium"
  },
  "failures": {
    "explicit": 1,
    "semantic": 0,
    "silent": 0,
    "status_mismatches": 0
  },
  "context": {
    "total": 1,
    "forgotten_preferences": 0,
    "repeated_questions": 0,
    "contradicted_facts": 0,
    "violated_constraints": 0,
    "lost_context": 1,
    "highest_severity": "medium"
  },
  "loop_detected": true,
  "tool_failure_count": 1,
  "context_failure_count": 1
}