Skip to content

Commit 933f14b

Browse files
authored
Fix agent_name assignment in log_tool_usage function (#1027)
1 parent 25987cb commit 933f14b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎docs/context/index.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ You'll frequently need to read information stored within the context.
449449
from google.adk.tools import ToolContext
450450

451451
def log_tool_usage(tool_context: ToolContext, **kwargs):
452-
agent_name = tool_context.agent_nameSystem.out.println("Found temporary result from last tool: " + lastToolResult);
452+
agent_name = tool_context.agent_name
453453
inv_id = tool_context.invocation_id
454454
func_call_id = getattr(tool_context, 'function_call_id', 'N/A') # Specific to ToolContext
455455

0 commit comments

Comments
 (0)