diff --git a/agentops/__init__.py b/agentops/__init__.py index c0e0f3c95..979e121b8 100755 --- a/agentops/__init__.py +++ b/agentops/__init__.py @@ -4,6 +4,7 @@ end_session, track_agent, track_tool, + record_function, end_all_sessions, Session, ToolEvent, @@ -260,6 +261,7 @@ def end_trace( "configure", "get_client", "record", + "record_function", "start_trace", "end_trace", "start_session", diff --git a/agentops/instrumentation/__init__.py b/agentops/instrumentation/__init__.py index 11f7b6331..c751aa702 100644 --- a/agentops/instrumentation/__init__.py +++ b/agentops/instrumentation/__init__.py @@ -92,7 +92,7 @@ class InstrumentorConfig(TypedDict): "class_name": "CrewAIInstrumentor", "min_version": "0.56.0", }, - "autogen": {"module_name": "agentops.instrumentation.ag2", "class_name": "AG2Instrumentor", "min_version": "0.3.2"}, + "ag2": {"module_name": "agentops.instrumentation.ag2", "class_name": "AG2Instrumentor", "min_version": "0.1.0"}, "agents": { "module_name": "agentops.instrumentation.openai_agents", "class_name": "OpenAIAgentsInstrumentor", diff --git a/agentops/legacy/__init__.py b/agentops/legacy/__init__.py index 5f77800d2..a8e8e9fe2 100644 --- a/agentops/legacy/__init__.py +++ b/agentops/legacy/__init__.py @@ -263,6 +263,17 @@ def noop(f: Any) -> Any: return noop +@deprecated("Use @tool decorator instead.") +def record_function(*args: Any, **kwargs: Any) -> Any: + """@deprecated Use @tool decorator instead. Wraps the @tool decorator for backward compatibility.""" + from agentops.sdk.decorators import tool + + if not args or not callable(args[0]): + return tool(*args, **kwargs) + else: + return tool(args[0], **kwargs) + + __all__ = [ "start_session", "end_session", @@ -271,6 +282,7 @@ def noop(f: Any) -> Any: "ActionEvent", "track_agent", "track_tool", + "record_function", "end_all_sessions", "Session", "LLMEvent",