### Configuring Agent Task Notes - YAML Source: https://github.com/samuelschmidgall/agentlaboratory/blob/main/README.md Example YAML configuration snippet illustrating how to provide specific instructions and notes to the agents for different workflow phases (e.g., plan-formulation, data-preparation). This allows users to guide the agents' behavior and inform them about constraints or resources. ```yaml task-notes: plan-formulation: - 'You should come up with a plan for only ONE experiment aimed at maximizing performance on the test set of MATH using prompting techniques.' - 'Please use gpt-4o-mini for your experiments' - 'You must evaluate on the entire 500 test questions of MATH' data-preparation: - 'Please use gpt-4o-mini for your experiments' - 'You must evaluate on the entire 500 test questions of MATH' - 'Here is a sample code you can use to load MATH\nfrom datasets import load_dataset\nMATH_test_set = load_dataset(\"HuggingFaceH4/MATH-500\")[\"test\"]' ... ``` -------------------------------- ### Installing pdflatex for LaTeX Compilation - Bash Source: https://github.com/samuelschmidgall/agentlaboratory/blob/main/README.md Optional command to install the 'pdflatex' package using apt. This enables the agents to compile LaTeX source files into PDFs, which might be used during report writing. ```bash sudo apt install pdflatex ``` -------------------------------- ### Installing pdflatex for LaTeX Compilation (Bash) Source: https://github.com/samuelschmidgall/agentlaboratory/blob/main/readme/README-japanese.md Installs the 'pdflatex' command-line utility, which is necessary for compiling LaTeX source files into PDF documents generated by the agents. This step is optional and requires root privileges (`sudo`) on Debian/Ubuntu-based systems. If not installed, you must disable LaTeX compilation when running the script. ```bash sudo apt install pdflatex ``` -------------------------------- ### Installing Python Dependencies - Bash Source: https://github.com/samuelschmidgall/agentlaboratory/blob/main/README.md Command to install all required Python packages listed in the 'requirements.txt' file using pip. This step ensures all necessary libraries for Agent Laboratory are installed in the activated virtual environment. ```bash pip install -r requirements.txt ``` -------------------------------- ### Installing Python Dependencies (Bash) Source: https://github.com/samuelschmidgall/agentlaboratory/blob/main/readme/README-japanese.md Installs all required Python packages listed in the 'requirements.txt' file into the currently active virtual environment using pip. Ensure the virtual environment is activated before running this command. Requires pip and the 'requirements.txt' file. ```bash pip install -r requirements.txt ``` -------------------------------- ### OpenAI API Inference Code Example (Python) Source: https://github.com/samuelschmidgall/agentlaboratory/blob/main/readme/README-japanese.md This Python snippet, intended for inclusion within a task note, demonstrates how to perform inference using the OpenAI API (v1+ client). It shows setting the API key and calling the chat completions endpoint. This provides agents with a specific method for interacting with the LLM. ```python from openai import OpenAI os.environ["OPENAI_API_KEY"] = "{api_key}" client = OpenAI() completion = client.chat.completions.create( model="gpt-4o-mini-2024-07-18", messages=messages) answer = completion.choices[0].message.content ``` -------------------------------- ### Configuring Agent Language - YAML Source: https://github.com/samuelschmidgall/agentlaboratory/blob/main/README.md Example YAML configuration snippet to specify the operating language for the agents. This allows users to interact with the system and receive outputs in a preferred language, although support might vary. ```yaml language: "中文" ``` -------------------------------- ### Cloning Agent Laboratory GitHub Repository (Bash) Source: https://github.com/samuelschmidgall/agentlaboratory/blob/main/readme/README-japanese.md Clones the Agent Laboratory source code repository from the specified GitHub URL to your local machine. This is the first step to obtain the project files. Requires Git to be installed on your system. ```bash git clone git@github.com:SamuelSchmidgall/AgentLaboratory.git ``` -------------------------------- ### Running Agent Laboratory Script (Bash) Source: https://github.com/samuelschmidgall/agentlaboratory/blob/main/readme/README-japanese.md Executes the main Agent Laboratory script (`ai_lab_repo.py`) to start the autonomous research workflow. It requires your API key, the desired LLM backend model, and your research topic as command-line arguments. Ensure your virtual environment is activated. ```bash python ai_lab_repo.py --api-key "API_KEY_HERE" --llm-backend "o1-mini" --research-topic "YOUR RESEARCH IDEA" ``` -------------------------------- ### Setting up Python Virtual Environment (Bash) Source: https://github.com/samuelschmidgall/agentlaboratory/blob/main/readme/README-japanese.md Creates a isolated Python virtual environment named 'venv_agent_lab' and activates it. This helps manage project dependencies without interfering with the global Python installation. Requires Python with the `venv` module. ```bash python -m venv venv_agent_lab source venv_agent_lab/bin/activate ``` -------------------------------- ### Running Agent Laboratory Without LaTeX Compilation (Bash) Source: https://github.com/samuelschmidgall/agentlaboratory/blob/main/readme/README-japanese.md Executes the Agent Laboratory script, explicitly disabling the automatic compilation of LaTeX output to PDF. Use this command if you were unable to install 'pdflatex' on your system. Requires API key, LLM backend, and research topic. ```bash python ai_lab_repo.py --api-key "API_KEY_HERE" --llm-backend "o1-mini" --research-topic "YOUR RESEARCH IDEA" --compile_latex=False ``` -------------------------------- ### Disabling LaTeX Compilation Flag - Command Line Source: https://github.com/samuelschmidgall/agentlaboratory/blob/main/README.md Command-line flag used when running the main script to disable LaTeX compilation. Set this flag to 'false' if 'pdflatex' is not installed or sudo access is unavailable, allowing the system to run without PDF generation. ```bash --compile-latex "false" ``` -------------------------------- ### Cloning Agent Laboratory Repository - Bash Source: https://github.com/samuelschmidgall/agentlaboratory/blob/main/README.md Command to clone the Agent Laboratory GitHub repository to your local machine. This is the initial step required to obtain the project files. ```bash git clone git@github.com:SamuelSchmidgall/AgentLaboratory.git ``` -------------------------------- ### Running Agent Laboratory Main Script - Bash Source: https://github.com/samuelschmidgall/agentlaboratory/blob/main/README.md Command to execute the main Agent Laboratory script 'ai_lab_repo.py'. The '--yaml-location' flag specifies the path to the configuration file that defines the experiment parameters and tasks. ```bash python ai_lab_repo.py --yaml-location "experiment_configs/MATH_agentlab.yaml" ``` -------------------------------- ### Citing Agent Laboratory Project - BibTeX Source: https://github.com/samuelschmidgall/agentlaboratory/blob/main/readme/README-italian.md Provides the standard BibTeX entry for citing the Agent Laboratory project. It includes details like title, authors, and year for a preprint publication. Researchers can copy and paste this entry into their bibliography files for easy citation. ```bibtex @preprint{schmidgall2025AgentLaboratory,\n title={Agent Laboratory: Using LLM Agents as Research Assistants},\n author={Schmidgall, Samuel and Su, Yusheng and Wang, Ze and Sun, Ximeng and Wu, Jialian and Yu, Xiadong and Liu, Jiang, Liu, Zicheng and Barsoum, Emad},\n year={2025}\n} ``` -------------------------------- ### Configuring LLM Task Notes (Python) Source: https://github.com/samuelschmidgall/agentlaboratory/blob/main/readme/README-japanese.md Defines a Python list of dictionaries (`task_notes_LLM`) used to provide specific instructions or context to the LLM agents during different phases of the research workflow (e.g., plan formulation, running experiments). Notes can include details about experiments, API keys, desired outputs, and available computational resources. ```python task_notes_LLM = [ {"phases": ["plan formulation"], "note": f"You should come up with a plan for TWO experiments."}, {"phases": ["plan formulation", "data preparation", "running experiments"], "note": "Please use gpt-4o-mini for your experiments."}, {"phases": ["running experiments"], "note": f"Use the following code to inference gpt-4o-mini: \nfrom openai import OpenAI\nos.environ[\"OPENAI_API_KEY\"] = \"{api_key}\"\nclient = OpenAI()\ncompletion = client.chat.completions.create(\nmodel=\"gpt-4o-mini-2024-07-18\", messages=messages)\nanswer = completion.choices[0].message.content\n"}, {"phases": ["running experiments"], "note": f"You have access to only gpt-4o-mini using the OpenAI API, please use the following key {api_key} but do not use too many inferences. Do not use openai.ChatCompletion.create or any openai==0.28 commands. Instead use the provided inference code."}, {"phases": ["running experiments"], "note": "I would recommend using a small dataset (approximately only 100 data points) to run experiments in order to save time. Do not use much more than this unless you have to or are running the final tests."}, {"phases": ["data preparation", "running experiments"], "note": "You are running on a MacBook laptop. You can use 'mps' with PyTorch"}, {"phases": ["data preparation", "running experiments"], "note": "Generate figures with very colorful and artistic design."} ] ``` -------------------------------- ### Creating Python Virtual Environment - Bash Source: https://github.com/samuelschmidgall/agentlaboratory/blob/main/README.md Command to create a new Python virtual environment named 'venv_agent_lab'. Using a virtual environment helps manage project dependencies and avoids conflicts with system-wide packages. ```bash python -m venv venv_agent_lab ``` -------------------------------- ### Activating Python Virtual Environment - Bash Source: https://github.com/samuelschmidgall/agentlaboratory/blob/main/README.md Command to activate the Python virtual environment 'venv_agent_lab' on Linux/macOS. After activation, subsequent Python commands will use the interpreter and libraries within this environment. ```bash source venv_agent_lab/bin/activate ``` -------------------------------- ### Agent Laboratory Bibtex Citation (Bibtex) Source: https://github.com/samuelschmidgall/agentlaboratory/blob/main/readme/README-japanese.md Provides the recommended Bibtex format for citing the Agent Laboratory preprint in academic papers or documents. This entry includes author names, title, and expected publication year. ```bibtex @preprint{schmidgall2025AgentLaboratory, title={Agent Laboratory: Using LLM Agents as Research Assistants}, author={Schmidgall, Samuel and Su, Yusheng and Wang, Ze and Sun, Ximeng and Wu, Jialian and Yu, Xiadong and Liu, Jiang, Liu, Zicheng and Barsoum, Emad}, year={2025} } ``` -------------------------------- ### Running Agent Laboratory in Non-English Language (Bash) Source: https://github.com/samuelschmidgall/agentlaboratory/blob/main/readme/README-japanese.md Executes the Agent Laboratory script, specifying the desired language for the research process using the '--language' flag. This allows the agents to conduct research and generate output in a language other than English. Replace '中文' with the appropriate language code and ensure the research topic is also in the target language. ```bash python ai_lab_repo.py --api-key "API_KEY_HERE" --research-topic "YOUR RESEARCH IDEA (in your language)" --llm-backend "o1-mini" --language "中文" ``` -------------------------------- ### Providing BibTeX Citation for Research Paper (BibTeX) Source: https://github.com/samuelschmidgall/agentlaboratory/blob/main/readme/README-portugues.md This snippet contains the standard BibTeX format for citing the "Agent Laboratory: Using LLM Agents as Research Assistants" preprint. It lists the authors, title, and year, and is typically used by bibliography management tools (like BibTeX or BibLaTeX) in conjunction with document preparation systems (like LaTeX) to automatically generate citations and bibliographies. ```bibtex @preprint{schmidgall2025AgentLaboratory, title={Agent Laboratory: Using LLM Agents as Research Assistants}, author={Schmidgall, Samuel and Su, Yusheng and Wang, Ze and Sun, Ximeng and Wu, Jialian and Yu, Xiadong and Liu, Jiang, Liu, Zicheng and Barsoum, Emad}, year={2025} } ``` -------------------------------- ### AgentRxiv BibTeX Citation Source: https://github.com/samuelschmidgall/agentlaboratory/blob/main/README.md BibTeX entry for citing the research paper associated with the AgentRxiv framework. AgentRxiv enables autonomous research agents to collaborate and build upon each other's work. ```bibtex @misc{schmidgall2025agentrxiv, title={AgentRxiv: Towards Collaborative Autonomous Research}, author={Samuel Schmidgall and Michael Moor}, year={2025}, eprint={2503.18102}, archivePrefix={arXiv}, primaryClass={cs.AI}, url={https://arxiv.org/abs/2503.18102}, } ``` -------------------------------- ### Resuming Agent Laboratory from Saved State (Bash) Source: https://github.com/samuelschmidgall/agentlaboratory/blob/main/readme/README-japanese.md Executes the Agent Laboratory script and attempts to load a previously saved state from the specified path. This allows you to resume a workflow if it was interrupted or needs to be continued later. Ensure the save state file exists at the provided path. ```bash python ai_lab_repo.py --api-key "API_KEY_HERE" --research-topic "YOUR RESEARCH IDEA" --llm-backend "o1-mini" --load-existing True --load-existing-path "save_states/LOAD_PATH" ``` -------------------------------- ### Agent Laboratory BibTeX Citation Source: https://github.com/samuelschmidgall/agentlaboratory/blob/main/README.md BibTeX entry for citing the research paper associated with the Agent Laboratory project. Use this format when referencing the project in academic work or publications. ```bibtex @misc{schmidgall2025agentlaboratoryusingllm, title={Agent Laboratory: Using LLM Agents as Research Assistants}, author={Samuel Schmidgall and Yusheng Su and Ze Wang and Ximeng Sun and Jialian Wu and Xiaodong Yu and Jiang Liu and Zicheng Liu and Emad Barsoum}, year={2025}, eprint={2501.04227}, archivePrefix={arXiv}, primaryClass={cs.HC}, url={https://arxiv.org/abs/2501.04227}, } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.