import os from dotenv import load_dotenv from toothfairy_client import ToothFairyClient # 1. Manually load the .env file so the script can see your keys load_dotenv() # 2. Initialize the client client = ToothFairyClient() # 3. Create the Tool pulling the URL from .env ngrok_url = os.getenv("NGROK_URL") if not ngrok_url: print("❌ Error: NGROK_URL not found in .env file. Please add it and try again.") exit(1) tool_id = client.create_search_tool(ngrok_url) print(f"✅ Tool created with ID: {tool_id}") # 4. Create the Agent and attach the Tool agent_id = client.create_agent(tool_id) print(f"✅ Agent created with ID: {agent_id}")