Troubleshooting

Common errors and how to fix them.

Installation Errors

"No module named 'anthropic'" (or 'openai')

You need to install the provider SDK for models in your paths.

shell
pip install anthropic  # For Claude models
pip install openai     # For GPT models
pip install huggingface_hub  # For HuggingFace models

"Python version 3.9 is not supported"

Kalibr requires Python 3.10 or higher.

shell
python --version  # Check your version

If you're on 3.9, upgrade Python or use pyenv/conda to manage versions.

Authentication Errors

"Invalid or missing API key"

  1. Check that KALIBR_API_KEY is set correctly
  2. Make sure you copied the full key from the dashboard (click the Copy button)
  3. Verify the key is active in Dashboard → Settings
shell
echo $KALIBR_API_KEY  # Should show your key

"401 Unauthorized" on provider calls

Your provider API key is missing or invalid.

shell
echo $OPENAI_API_KEY     # For GPT models
echo $ANTHROPIC_API_KEY  # For Claude models
echo $HF_API_TOKEN       # For HuggingFace models (or $HUGGING_FACE_HUB_TOKEN)

Runtime Errors

"Outcome already reported" warning

This warning appears if you call report() more than once for the same request. It's usually harmless but indicates a logic issue in your code.

Fix: Make sure you only call report() once per completion() call.

Routing not changing after many runs

Kalibr needs ~20-50 outcomes per path before routing becomes stable. During the "Learning" phase, it explores randomly.

Check: Go to Dashboard → your agent → verify sample counts are increasing.

Dashboard Issues

Agent not appearing in dashboard

  1. Verify your KALIBR_TENANT_ID matches what's shown in Dashboard → Settings
  2. Check that report() is being called after each completion
  3. Wait 30 seconds and refresh - there may be a small delay

Dashboard shows old data

Hard refresh the page (Cmd+Shift+R on Mac, Ctrl+Shift+R on Windows).

Failure Categories & Insights

failure_category validation error

update_outcome returns 404

Insights returns insufficient_data

Still Stuck?