Skip to main content

get_stats

Method
This is a method of the AgentScheduler class in the agent_scheduler module.
Get execution statistics.

Signature

Returns

Dict[str, Any]
Dictionary with execution stats. Fields:
  • is_running (bool) — Whether the scheduler is currently running.
  • total_executions (int) — Total number of execution attempts.
  • successful_executions (int) — Number of successful executions.
  • failed_executions (int) — Number of failed executions.
  • success_rate (float) — Success percentage (0–100).
  • total_cost_usd (float) — Running total cost in USD (4 dp).
  • remaining_budget (float | None) — max_cost - total_cost_usd, or None if max_cost is disabled.
  • runtime_seconds (float) — Seconds since start() was called.
  • cost_per_execution (float) — total_cost_usd / total_executions, rounded to 4 dp.
  • delivered_deliveries (int) — Runs whose delivery reached the target (PR #4476).
  • undelivered_deliveries (int) — Runs whose delivery failed and was surfaced via on_failure (PR #4476).

Source

View on GitHub

praisonai/agent_scheduler.py at line 242