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
dont create multiple sessions on partner frameworks (#299)
Braelyn Boynton2bedb6ec4cec
diff --git a/agentops/__init__.py b/agentops/__init__.pyindex c3a1d66a..5fcefb9c 100755--- a/agentops/__init__.py+++ b/agentops/__init__.py@@ -96,8 +96,9 @@ def init()# handle auto_start_session here so we can get the session object to return rather than client above+ # if the client automatically starts a session from a partner framework don't start a secondsession = None- if auto_start_session:+ if auto_start_session and len(c.current_session_ids) == 0:session = c.start_session(tags=tags, config=c.config, inherited_session_id=inherited_session_id)