agentic-ai-engineering/course/labs/L2-multi-tool/starter.py

26 lines
647 B
Python

"""
Lab 2.8: Multi-Tool Agent
Add file operations AND web search to your agent from Lab 1.
"""
TOOLS = [
# TODO: Define a read_file tool
# TODO: Define a search_web tool
# TODO: Define a write_file tool
]
def execute_tool(tool_name: str, tool_args: dict) -> str:
"""Execute tool and return results."""
# TODO: Implement all three tools
pass
def run_agent(prompt: str) -> str:
"""Run multi-tool agent loop."""
pass # TODO
if __name__ == "__main__":
import sys
prompt = " ".join(sys.argv[1:]) if len(sys.argv) > 1 else "Search for recent AI news and save results to a file"
print(run_agent(prompt))