Skip to main content
GitHub

Fix Types

The 7 types of automatic fixes.

Risicare can generate 7 types of declarative fixes.

Overview

Fix Structure

All fixes share a common structure:

{
  "fix_id": "fix-abc123",
  "type": "retry",
  "target": {
    "error_codes": ["TOOL.EXECUTION.TIMEOUT"],
    "agents": ["researcher"],
    "tools": ["search_api"]
  },
  "config": {
    // Type-specific configuration
  },
  "rollback_strategy": {
    "type": "immediate",
    "trigger": "error_rate > baseline * 1.1"
  },
  "metadata": {
    "created_at": "2024-01-15T10:00:00Z",
    "diagnosis_id": "diag-xyz789",
    "confidence": 0.85
  }
}

Targeting

Fixes can target specific:

TargetDescription
error_codesSpecific error codes
agentsNamed agents
toolsSpecific tools
modelsLLM models
environmentsdev/staging/prod

Rollback Strategies

StrategyDescription
immediateInstant rollback on trigger
gradualRamp down over time
manualRequire human approval

Fix Precedence

When multiple fixes match:

  1. Most specific target wins
  2. Higher confidence wins
  3. Most recent wins

SDK Integration

The SDK automatically applies fixes:

import risicare
 
risicare.init()
 
# Fixes loaded from API and cached locally
# Applied automatically to matching operations
 
response = client.chat.completions.create(...)

Managing Fixes

Via Dashboard

  1. Navigate to Healing → Fixes
  2. View active, testing, graduated fixes
  3. Edit, pause, or rollback fixes

Via API

# List fixes
curl -X GET "https://app.risicare.ai/v1/fixes" \
  -H "Authorization: Bearer rsk-..."
 
# Create fix
curl -X POST "https://app.risicare.ai/v1/fixes" \
  -H "Authorization: Bearer rsk-..." \
  -d '{"type": "retry", "config": {...}}'
 
# Rollback fix
curl -X DELETE "https://app.risicare.ai/v1/fixes/{fix_id}" \
  -H "Authorization: Bearer rsk-..."

Next Steps

Select a fix type to learn more: