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

Fix Runtime is opt-in

The Fix Runtime module is available for explicit initialization. Automatic fix application at the SDK level requires calling init_runtime() separately — it is not started by risicare.init() by default. See Fix Runtime for setup.

from risicare import init_runtime, FixRuntimeConfig
 
# Explicitly initialize the fix runtime
runtime = init_runtime(config=FixRuntimeConfig(
    api_endpoint="https://app.risicare.ai",
    api_key="rsk-...",
))

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/api/v1/fixes" \
  -H "Authorization: Bearer rsk-..."
 
# Create fix
curl -X POST "https://app.risicare.ai/api/v1/fixes" \
  -H "Authorization: Bearer rsk-..." \
  -d '{"type": "retry", "config": {...}}'
 
# Rollback fix
curl -X DELETE "https://app.risicare.ai/api/v1/fixes/{fix_id}" \
  -H "Authorization: Bearer rsk-..."

Next Steps

Select a fix type to learn more: