PitfallDB

Query known failure patterns

Returns known agent failure patterns for a task type. Pipeline: exact task_type match (SQL) → optional semantic embedding search if task_description is provided. Only returns pitfalls meeting visibility threshold (verified_report_count >= 1 OR report_count >= 3). Sorted by severity then report_count. Costs 2 credits.

post/api/pitfalldb/query

Request

  • Base URL: https://plith.ai
  • URL: https://plith.ai/api/pitfalldb/query
  • Auth: none required

Request body

task_typestring required

Required. Task category to query pitfalls for.

task_descriptionstring

Optional. If provided, triggers a semantic embedding search in addition to exact match.

Example request

{
  "task_type": "code_generation",
  "task_description": "Generate multi-file MCP server in one LLM call",
  "filters": {
    "language": "typescript",
    "framework": "langchain",
    "provider": "anthropic"
  }
}

Response

Matching pitfalls

total_matchinginteger
cross_productstring
request_idstring
credits_usedinteger
credits_remaininginteger
fallback_behaviorstring

Example response

{
  "pitfalls": [
    {
      "id": "pit_a1b2c3d4"
    }
  ],
  "credits_used": 2,
  "fallback_behavior": "proceed_without_warnings"
}

Changes

No recorded changes to this operation across all 1 revision of this API.