Skip to content

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

change printline (#427)

Alex Reibmanc6706c5eef73
diff --git a/agentops/session.py b/agentops/session.py
index f5722af4..0bc28db6 100644
--- a/agentops/session.py
+++ b/agentops/session.py
@@ -149,15 +149,14 @@ class Session:
token_cost_d.quantize(Decimal("0.000001"), rounding=ROUND_HALF_UP)
)
)
-
analytics = (
- f"Analytics for this run - "
- f"LLM calls: {self.event_counts['llms']} | "
- f"Tool calls: {self.event_counts['tools']} | "
- f"Actions: {self.event_counts['actions']} | "
- f"Errors: {self.event_counts['errors']} | "
- f"Duration: {formatted_duration} | "
- f"Cost: ${formatted_cost}"
+ 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"{colored('Errors:', attrs=['bold'])} {self.event_counts['errors']}"
)
logger.info(analytics)