Step-by-step debug
Enable debug=True for a trace of every call: provider/model, params,
retries, fallback, tokens, cost and duration — per agent.
from jangada_ai import LLM
llm = LLM("openai", "gpt-4o-mini", debug=True, name="extractor")
llm.complete("...")The Debugger records the chain's events:
start— provider, model and params of the attemptretry— error, attempt number and backoff delayfallback— which provider/model it fell through toend— resultingCompletionand duration in mserror— normalized error when the candidate exhausts its attempts
The name= parameter labels the agent in the trace, useful when there are several
different LLMs in the same orchestration (Flow/Graph).
Related: Retry and fallback, Cost and tokens, Errors.
Example
examples/debug_params_example.py — runnable script.
Response cache
Cache LLM responses to save tokens and latency — exact (ExactCache) and semantic (SemanticCache, by embedding similarity). Plugged via LLM(..., cache=...).
Tutorial: getting started (from zero to fallback)
A ~10-minute walkthrough: install, make your first call, switch providers without changing your code, use templates, and make everything resilient with fallback. Every block is...