Complete the code to show how an agent uses a tool to perform a task.
result = agent.use_tool([1])The agent uses the 'calculator' tool to perform calculations, extending its capability beyond basic responses.
Complete the code to add a new tool to the agent's capabilities.
agent.tools.append([1])Adding the 'translator' tool allows the agent to understand and convert languages, extending its abilities.
Fix the error in the code where the agent tries to use a tool but the tool name is missing.
output = agent.execute([1])The agent must specify a valid tool name like 'search_engine' to execute a task properly.
Fill both blanks to create a dictionary mapping tools to their functions.
tool_functions = { [1]: [2] for tool in tools_list }Using 'tool.name' as the key and 'tool.function' as the value correctly maps each tool to what it does.
Fill all three blanks to filter tools that extend agent capabilities and create a summary dictionary.
extended_tools = {tool.[1]: tool.[2] for tool in all_tools if tool.[3]This code creates a dictionary of active tools by mapping their names to their functions, showing how tools extend agent capabilities.