System: # AI's job
1. The AI receives a MESSAGE from USER and short conversation HISTORY for reference
2. AI analyzes the MESSAGE and HISTORY for CONTEXT
3. AI provide a search query for search engine where previous memories are stored based on CONTEXT

# Format
- The response format is a plain text string containing the query
- No other text, no formatting

# Example
```json
USER: "Write a song about my dog"
AI: "user's dog"
USER: "following the results of the biology project, summarize..."
AI: "biology project results"
```

# HISTORY:
human: {
    "system_warning": "You have misformatted your message. Follow system prompt instructions on JSON message formatting precisely."
}

ai: {
    "thoughts": [
        "The user has mentioned a specific URL they would like to web scrape. I will proceed with creating the web scraper using this URL.",
        "First, I need to create a web scraper. I can use the knowledge_tool to find a scraper library that best suits the task.",
        "Once the scraper is created, I will execute it to fetch the data from the provided URL and report back to the user."
    ],
    "tool_name": "knowledge_tool",
    "tool_args": {
        "question": "What is a suitable library for web scraping the given URL?"
    }
}
human: {
    "response_from_tool": "knowledge_tool",
    "data": # Online sources
The choice of a suitable library for web scraping in Python depends on the complexity and specific requirements of the website you are scraping. Here are some popular libraries and their use cases:

## For Simple HTML Extraction
- **BeautifulSoup**: This is a good choice for scraping simple websites that do not use a lot of JavaScript. It parses HTML and XML documents and provides a Pythonic interface for navigating and searching the parse tree.

## For Dynamic JavaScript-Heavy Websites
- **Selenium** or **Playwright**: These libraries are ideal for websites that heavily rely on JavaScript. They provide browser automation capabilities, allowing you to load dynamic content and interact with the website as a user would.

## For Large-Scale Web Scraping
- **Scrapy**: This is a powerful framework for large-scale web scraping. It supports asynchronous handling of requests, built-in selectors, and various features like user-agent spoofing, cookies, and sessions. It is highly efficient and scalable.

## For Efficient HTML/XML Parsing
- **LXML**: If you need to parse large HTML or XML documents efficiently, LXML is a good option. It provides support for XPath, XSLT, and other features, making it a robust choice for parsing complex documents.

## For Basic HTTP Requests
- **Urllib** or **Requests**: These libraries are useful for making basic HTTP requests. Urllib is part of Python's standard library, while Requests provides a higher-level API wi<< 4500 CHARACTERS REMOVED TO SAVE SPACE >>has executable permissions.
2. Improve the Usage section with clear, step-by-step instructions for navigating to the script directory and executing the script.
3. Include a Troubleshooting section that advises users to check console output for errors, verify URL accessibility, and check script permissions.
4. Suggest improvements for future documentation, such as adding examples and expanding error handling guidance.

source: /home/tt4/Desktop/agent-zero-current/instruments/default/yt_download/yt_download.md
area: instruments
id: 9551ea46-bd34-4abc-8168-b324e9c31d2c
timestamp: 2024-10-24 21:24:13
Content: # Problem
Download a YouTube video
# Solution
1. If folder is specified, cd to it
2. Run instrument "bash /instruments/default/yt_download/yt_download.sh <url>" with your video URL
3. Wait for the terminal to finish

source: /home/tt4/Desktop/agent-zero-current/knowledge/default/main/about/github_readme.md
area: main
id: 66fed2d6-8478-4683-92bb-5b01d88d1951
timestamp: 2024-10-24 21:24:13
Content: ![Time example](/docs/res/time_example.jpg)

## Setup

A detailed setup guide with a video can be found here: [/docs/installation](https://github.com/frdel/agent-zero/tree/main/docs/installation). Scroll down to see the readme file.

> ⚠️ **Changes to launch files since v0.6:**  
> main.py file has been replaced with run_ui.py (webui) and run_cli.py (terminal) launch files.
> configuration has been moved to initialize.py for both webui and terminal launch files.
}

ai: Rate limit (200/hour) exceeded. Join our discord for more: [https://discord.com/invite/q55gsH8z5F](https://discord.com/invite/q55gsH8z5F)Rate limit (200/hour) exceeded. Join our discord for more: [https://discord.com/invite/q55gsH8z5F](https://discord.com/invite/q55gsH8z5F)Rate limit (200/hour) exceeded. Join our discord for more: [https://discord.com/invite/q55gsH8z5F](https://discord.com/invite/q55gsH8z5F)Rate limit (200/hour) exceeded. Join our discord for more: [https://discord.com/invite/q55gsH8z5F](https://discord.com/invite/q55gsH8z5F)Rate limit (200/hour) exceeded. Join our discord for more: [https://discord.com/invite/q55gsH8z5F](https://discord.com/invite/q55gsH8z5F)Rate limit (200/hour) exceeded. Join our discord for more: [https://discord.com/invite/q55gsH8z5F](https://discord.com/invite/q55gsH8z5F)Rate limit (200/hour) exceeded. Join our discord for more: [https://discord.com/invite/q55gsH8z5F](https://discord.com/invite/q55gsH8z5F)Rate limit (200/hour) exceeded. Join our discord for more: [https://discord.com/invite/q55gsH8z5F](https://discord.com/invite/q55gsH8z5F)
human: {
    "system_warning": "You have misformatted your message. Follow system prompt instructions on JSON message formatting precisely."
}

User: {
    "user": "See initial question."
}

Assistant: