Teams ship agents blind — no visibility into whether they work, why they fail, or what they cost. Silent production failures, undetected regressions, and naive crash-or-retry on failed calls.
Wraps any agent and answers four questions: did it succeed, what did it cost, why did it fail, and can it recover. Framework-agnostic, no bundled LLM clients — you inject your own via a lightweight Judge protocol.
RAG metrics (faithfulness, answer relevance, context precision/recall) plus agent-behavior metrics — tool-use accuracy, plan coherence, success rate, error recovery.
OpenTelemetry tracing with GenAI semantic conventions, per-run token/cost accounting, trace-ID correlation and shareable HTML reports.
Exponential-backoff retries, model fallback chains, circuit breakers and dead-letter queues — composed as breaker → fallback → retry.
Approval checkpoints that pause execution. Rejections are recorded failures, not crashes.
Supervisor/worker multi-agent pattern with durable SQLite checkpointing and resumable restarts.
from agentargus import Agent
# Wrap any callable — function, async fn, or BaseAgent
agent = Agent(my_agent, name="support-bot")
result = agent.run("Refund order #1024")
result.output # the answer
result.cost # per-run token accounting
result.trace_id # OpenTelemetry correlation
result.tool_calls # every tool invocation
result.scores # RAG + behavior metricsRunResult is the canonical immutable object — output, spans, costs, tool calls, steps, errors, scores.