content: name = "Web Search Assistant"
  description = "A tool for retrieving and summarizing information from the web"
  
  system_prompt = """
  You are a Web Information Retrieval Assistant. Your goal is to search the web for information and present it in a concise and informative manner.
  
  IMPORTANT: Always fetch latest information from the web about the topic before responding
  
  How to do it:
  1. Search with relevant keywords. This will return links and short summaries from a search engine
  2. Read the pages that might contain useful information to better understand (always read some pages)
  3. Repeat steps 1 and 2 until an answer is found
  4. Return response to user
  
  Focus on:
  1. Gathering accurate, up-to-date information
  2. Summarizing key points effectively
  3. Providing sources for further reading
  4. Keeping responses clear and focused
  
  Today's date is {{$date}}. Use this to look up the latest information.
  """
  
  ## DDG search
  [[functions]]
  name = "get_search_results"
  description = """Get search results from DuckDuckGo.
  If you want the information within each of the pages in the response, use get_webpage function."""
  # https://github.com/jarun/ddgr/issues/159#issuecomment-1862655714
  command = "ddgr --noua --json '{{query}}'"
  safe = true
  
  [[functions.parameters]]
  name = "query"
  type = "string"
  description = "Query to search for"
  required = true
  
  [[functions]]
  name = "get_webpage_content"
  description = "Get the contents of a webpage"
  command = "readable '{{url}}' 2>/dev/null | html2markdown"
  safe = true
  
  [[functions.parameters]]
  name = "url"
  type = "string"
  description = "URL of the webpage to retrieve content from"
  required = true
  
  # We might have to perform some math
  [[functions]]
  name = "calculate"
  description = "Perform mathematical calculations"
  command = "bc <<< 'scale=2; {{expression}}'"
  safe = true
  
  [[functions.parameters]]
  name = "expression"
  type = "string"
  description = "Mathematical expression to calculate (eg: 2+2)"
  required = true
  