From e521f891c63d1940b66108ace56a455eb1e52428 Mon Sep 17 00:00:00 2001 From: Daniel Hashmi <151331476+DanielHashmi@users.noreply.github.com> Date: Fri, 27 Jun 2025 11:50:13 +0500 Subject: [PATCH 1/4] Duplicate Classifier in pyproject.toml Issue: "Intended Audience :: Developers" appears twice in the classifiers list. Line Number 20 and Line Number 26 Fix: Removed the duplicate classifier entry --- pyproject.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 75e714768..6c0bbe9f1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,7 +23,6 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", - "Intended Audience :: Developers", "Operating System :: OS Independent", "Topic :: Software Development :: Libraries :: Python Modules", "License :: OSI Approved :: MIT License", From 09479afe3b5cc2c3acfed034bfa2121e9a4660c2 Mon Sep 17 00:00:00 2001 From: Daniel Hashmi <151331476+DanielHashmi@users.noreply.github.com> Date: Fri, 27 Jun 2025 12:24:45 +0500 Subject: [PATCH 2/4] Import Path Inconsistency - There's an inconsistent import style in the tracing module where one import uses an absolute path in line number 3 while all others use relative imports --- src/agents/tracing/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/agents/tracing/__init__.py b/src/agents/tracing/__init__.py index 64b0bd71f..c33fc5be9 100644 --- a/src/agents/tracing/__init__.py +++ b/src/agents/tracing/__init__.py @@ -1,6 +1,6 @@ import atexit -from agents.tracing.provider import DefaultTraceProvider, TraceProvider +from .provider import DefaultTraceProvider, TraceProvider from .create import ( agent_span, From 17614011a138c9f280d0a4ced16427f65199cc22 Mon Sep 17 00:00:00 2001 From: Daniel Hashmi <151331476+DanielHashmi@users.noreply.github.com> Date: Fri, 27 Jun 2025 19:29:48 +0500 Subject: [PATCH 3/4] Fixed the ordering issue of imports --- src/agents/tracing/__init__.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/agents/tracing/__init__.py b/src/agents/tracing/__init__.py index c33fc5be9..b45c06d75 100644 --- a/src/agents/tracing/__init__.py +++ b/src/agents/tracing/__init__.py @@ -1,7 +1,5 @@ import atexit -from .provider import DefaultTraceProvider, TraceProvider - from .create import ( agent_span, custom_span, @@ -20,6 +18,7 @@ ) from .processor_interface import TracingProcessor from .processors import default_exporter, default_processor +from .provider import DefaultTraceProvider, TraceProvider from .setup import get_trace_provider, set_trace_provider from .span_data import ( AgentSpanData, From 9841c5e4422eef6aef6649e14b016fbd3ed1efd6 Mon Sep 17 00:00:00 2001 From: Daniel Hashmi <151331476+DanielHashmi@users.noreply.github.com> Date: Thu, 3 Jul 2025 10:22:20 +0500 Subject: [PATCH 4/4] Added runtime validation for Agent name field --- src/agents/agent.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/agents/agent.py b/src/agents/agent.py index 6c87297f1..751f50015 100644 --- a/src/agents/agent.py +++ b/src/agents/agent.py @@ -187,6 +187,10 @@ class Agent(Generic[TContext]): """Whether to reset the tool choice to the default value after a tool has been called. Defaults to True. This ensures that the agent doesn't enter an infinite loop of tool usage.""" + def __post_init__(self): + if not isinstance(self.name, str): + raise TypeError(f"Agent name must be a string, got {type(self.name).__name__}") + def clone(self, **kwargs: Any) -> Agent[TContext]: """Make a copy of the agent, with the given arguments changed. For example, you could do: ```