Skip to content

Commit 7bf5202

Browse files
authored
Update agent.py
1 parent 87f88e3 commit 7bf5202

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/agents/agent.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -222,12 +222,11 @@ def as_tool(
222222
description_override=tool_description or "",
223223
)
224224
async def run_agent(context: RunContextWrapper, input: str) -> str:
225-
from .run import Runner
226-
from .tracing.scope import Scope
225+
from .run import Runner, get_current_run_config
227226

228227
# Get the current run_config from context if available
229228
run_config = None
230-
current_run_config = Scope.get_current_run_config()
229+
current_run_config = get_current_run_config()
231230
if current_run_config and current_run_config.pass_run_config_to_sub_agents:
232231
run_config = current_run_config
233232

0 commit comments

Comments
 (0)