|
| 1 | +from agno.agent import Agent |
| 2 | +from agno.models.openai import OpenAIChat |
| 3 | +from agno.tools.duckduckgo import DuckDuckGoTools |
| 4 | +from agno.tools.firecrawl import FirecrawlTools |
| 5 | +from agno.tools.playwright import PlaywrightTools |
| 6 | + |
| 7 | +agent = Agent( |
| 8 | + model=OpenAIChat(id="gpt-4o"), |
| 9 | + tools=[ |
| 10 | + DuckDuckGoTools(), |
| 11 | + PlaywrightTools(headless=False, timeout=6000), |
| 12 | + FirecrawlTools(), |
| 13 | + ], |
| 14 | + instructions="""You are an Advanced Sales Research Agent for the alcohol industry. |
| 15 | +
|
| 16 | + Your goal: Conduct comprehensive supplier research with detailed COLA registry analysis. |
| 17 | +
|
| 18 | + ## Advanced COLA Registry Workflow: |
| 19 | +
|
| 20 | + ### Step 1: Initial Search |
| 21 | + - Navigate to: https://www.ttbonline.gov/colasonline/publicSearchColasBasic.do |
| 22 | + - Fill search form and fill in company name |
| 23 | + * input[name="searchCriteria.productOrFancifulName"] (brand name) |
| 24 | + - Submit with: input[type="submit"] |
| 25 | + - WAIT after submission: The form will auto-redirect to the results page |
| 26 | + * Wait for results table to load completely before proceeding |
| 27 | + * Verify you're on the results page by checking the URL or page content |
| 28 | +
|
| 29 | + ### Step 2: Results Analysis |
| 30 | + - Wait for the results table to load using selector: table (or tr containing TTB IDs) |
| 31 | + - Extract all the links from the first column TTB ID column of the search results table |
| 32 | +
|
| 33 | + ### Step 3: FIREcrawl Search |
| 34 | + - Use the Firecrawl tool the COLA link extracted from step 2 |
| 35 | + - Extract all the data |
| 36 | + """, |
| 37 | + markdown=True, |
| 38 | + # show_tool_calls=True, |
| 39 | + debug_mode=True, |
| 40 | + add_datetime_to_instructions=True, |
| 41 | +) |
| 42 | +if __name__ == "__main__": |
| 43 | + company_name = "Sazerac" |
| 44 | + agent.print_response("Search for: " + company_name) |
0 commit comments