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

added error name type

reibsc24c3e4e3360
diff --git a/agentops/client.py b/agentops/client.py
index 7107c257..a843a9ae 100644
--- a/agentops/client.py
+++ b/agentops/client.py
@@ -171,7 +171,7 @@ class Client:
# Record the event after the function call
self.record(Event(event_type=event_name,
params=arg_values,
- returns=str(e),
+ returns={f"{type(e).__name__}: {str(e)}"},
result='Fail',
action_type='action',
init_timestamp=init_time,
@@ -215,7 +215,7 @@ class Client:
# Record the event after the function call
self.record(Event(event_type=event_name,
params=arg_values,
- returns=str(e),
+ returns={f"{type(e).__name__}: {str(e)}"},
result='Fail',
action_type='action',
init_timestamp=init_time,