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
Added options to docstring and changed end_state_reason message
Howard Gil2cc3b85c4c3c
diff --git a/agentops/client.py b/agentops/client.pyindex c047915e..6808d037 100644--- a/agentops/client.py+++ b/agentops/client.py@@ -230,7 +230,7 @@ class Client(metaclass=MetaClient):End the current session with the AgentOps service.Args:- end_state (str): The final state of the session.+ end_state (str): The final state of the session. Options: Success, Fail, or Indeterminate.end_state_reason (str, optional): The reason for ending the session.video (str, optional): The video screen recording of the session"""@@ -290,7 +290,8 @@ class Client(metaclass=MetaClient):# Then call the default excepthook to exit the programsys.__excepthook__(exc_type, exc_value, exc_traceback)- atexit.register(lambda: cleanup(end_state="Indeterminate", end_state_reason="Process exited normally"))+ atexit.register(lambda: cleanup(end_state="Indeterminate",+ end_state_reason="Process exited without calling end_session()"))signal.signal(signal.SIGINT, signal_handler)signal.signal(signal.SIGTERM, signal_handler)sys.excepthook = handle_exception