text: Skip to main contentğŸ¦œï¸�ğŸ”— LangChainDocsUse casesIntegrationsAPILangSmithJS/TS DocsCTRLKUse casesQA and Chat over DocumentsAnalyzing structured dataExtractionInteracting with APIsChatbotsSummarizationCode UnderstandingAgent simulationsAgentsAutonomous (long-running) agentsAutoGPTBabyAGI User GuideBabyAGI with ToolsHuggingGPTmarathon_timesMeta-PromptMulti-modalUse casesAutonomous (long-running) agentsmarathon_timesOn this pagemarathon_timesAutoGPT example finding Winning Marathon Timesâ€‹Implementation of https://github.com/Significant-Gravitas/Auto-GPT With LangChain primitives (LLMs, PromptTemplates, VectorStores, Embeddings, Tools)# !pip install bs4# !pip install nest_asyncio# Generalimport osimport pandas as pdfrom langchain.experimental.autonomous_agents.autogpt.agent import AutoGPTfrom langchain.chat_models import ChatOpenAIfrom langchain.agents.agent_toolkits.pandas.base import create_pandas_dataframe_agentfrom langchain.docstore.document import Documentimport asyncioimport nest_asyncio# Needed synce jupyter runs an async eventloopnest_asyncio.apply()llm = ChatOpenAI(model_name="gpt-4", temperature=1.0)Set up toolsâ€‹We'll set up an AutoGPT with a search tool, and write-file tool, and a read-file tool, a web browsing tool, and a tool to interact with a CSV file via a python REPLDefine any other tools you want to use below:# Toolsimport osfrom contextlib import contextmanagerfrom typing import Optionalfrom langchain.agents import toolfrom langchain.tools.file_management.read import ReadFileToolfrom langchain.tools.file_management.write import WriteFileToolROOT_DIR = "./data/"@contextmanagerdef pushd(new_dir):    """Context manager for changing the current working