Python SDK for AI agent monitoring, LLM cost tracking, benchmarking, and more. Integrates with most LLMs and agent frameworks including CrewAI, Agno, OpenAI Agents SDK, Langchain, Autogen, AG2, and CamelAI
Python agentagentopsagents-sdkaianthropicautogencost-estimationcrewaievalsevaluation-metricsgroqlangchainllmmistralollamaopenaiopenai-agents
Session stats ui (#429)
Howard Gil142e50bc2a69
diff --git a/agentops/session.py b/agentops/session.pyindex 0bc28db6..9fbf97be 100644--- a/agentops/session.py+++ b/agentops/session.py@@ -149,13 +149,14 @@ class Session:token_cost_d.quantize(Decimal("0.000001"), rounding=ROUND_HALF_UP)))+analytics = (- f"Session stats - "- f"{colored('Cost:', attrs=['bold'])} ${formatted_cost} "- f"{colored('Duration:', attrs=['bold'])} {formatted_duration} "- f"{colored('LLMs:', attrs=['bold'])} {self.event_counts['llms']} "- f"{colored('Tools:', attrs=['bold'])} {self.event_counts['tools']} "- f"{colored('Actions:', attrs=['bold'])} {self.event_counts['actions']} "+ f"Session Stats - "+ f"{colored('Duration:', attrs=['bold'])} {formatted_duration} | "+ f"{colored('Cost:', attrs=['bold'])} ${formatted_cost} | "+ f"{colored('LLMs:', attrs=['bold'])} {self.event_counts['llms']} | "+ f"{colored('Tools:', attrs=['bold'])} {self.event_counts['tools']} | "+ f"{colored('Actions:', attrs=['bold'])} {self.event_counts['actions']} | "f"{colored('Errors:', attrs=['bold'])} {self.event_counts['errors']}")logger.info(analytics)