From d71bedb0c8ac295a687dfbbce48789b518b28b9f Mon Sep 17 00:00:00 2001 From: Logan Date: Sat, 25 Jan 2025 12:21:24 -0600 Subject: [PATCH] notebook nits (#17628) --- .../examples/agent/agent_workflow_basic.ipynb | 8 +- .../examples/agent/agent_workflow_multi.ipynb | 133 +++++++----------- 2 files changed, 59 insertions(+), 82 deletions(-) diff --git a/docs/docs/examples/agent/agent_workflow_basic.ipynb b/docs/docs/examples/agent/agent_workflow_basic.ipynb index 24a3a69d42bec..66eb80447e865 100644 --- a/docs/docs/examples/agent/agent_workflow_basic.ipynb +++ b/docs/docs/examples/agent/agent_workflow_basic.ipynb @@ -332,7 +332,9 @@ "\n", "\n", "async def set_name(ctx: Context, name: str) -> str:\n", - " await ctx.set(\"name\", name)\n", + " state = await ctx.get(\"state\")\n", + " state[\"name\"] = name\n", + " await ctx.set(\"state\", state)\n", " return f\"Name set to {name}\"\n", "\n", "\n", @@ -348,8 +350,8 @@ "response = await workflow.run(user_msg=\"My name is Logan\", ctx=ctx)\n", "print(str(response))\n", "\n", - "name = await ctx.get(\"name\")\n", - "print(name)" + "state = await ctx.get(\"state\")\n", + "print(state[\"name\"])" ] }, { diff --git a/docs/docs/examples/agent/agent_workflow_multi.ipynb b/docs/docs/examples/agent/agent_workflow_multi.ipynb index 88abaf3579c68..8feaacba1c097 100644 --- a/docs/docs/examples/agent/agent_workflow_multi.ipynb +++ b/docs/docs/examples/agent/agent_workflow_multi.ipynb @@ -8,7 +8,7 @@ "\n", "In this notebook, we will explore how to use the `AgentWorkflow` class to create multi-agent systems. Specifically, we will create a system that can generate a report on a given topic.\n", "\n", - "This notebook will assume that you have already either read the [basic agent workflow notebook](https://docs.llamaindex.ai/en/stable/examples/agent/agent_workflow_basic/) or the [agent workflow documentation](https://docs.llamaindex.ai/en/stable/understanding/agent/multi_agents/)." + "This notebook will assume that you have already either read the [basic agent workflow notebook](https://docs.llamaindex.ai/en/stable/examples/agent/agent_workflow_basic.ipynb) or the [agent workflow documentation](https://docs.llamaindex.ai/en/stable/understanding/agent/multi_agents.md)." ] }, { @@ -39,7 +39,7 @@ "source": [ "from llama_index.llms.openai import OpenAI\n", "\n", - "llm = OpenAI(model=\"gpt-4o\", api_key=\"sk-proj-...\")" + "llm = OpenAI(model=\"gpt-4o\", api_key=\"sk-...\")" ] }, { @@ -59,8 +59,9 @@ "While there are many ways to implement this system, in this case, we will use a few tools to help with the research and writing processes.\n", "\n", "1. A `web_search` tool to search the web for information on the given topic.\n", - "2. A `write_report` tool to write the report using the information found by the `ResearchAgent`.\n", - "3. A `review_report` tool to review the report and provide feedback.\n", + "2. A `record_notes` tool to record notes on the given topic.\n", + "3. A `write_report` tool to write the report using the information found by the `ResearchAgent`.\n", + "4. A `review_report` tool to review the report and provide feedback.\n", "\n", "Utilizing the `Context` class, we can pass state between agents, and each agent will have access to the current state of the system.\n" ] @@ -91,7 +92,7 @@ "\n", "\n", "async def record_notes(ctx: Context, notes: str, notes_title: str) -> str:\n", - " \"\"\"Useful for recording notes on a given topic.\"\"\"\n", + " \"\"\"Useful for recording notes on a given topic. Your input should be notes with a title to save the notes under.\"\"\"\n", " current_state = await ctx.get(\"state\")\n", " if \"research_notes\" not in current_state:\n", " current_state[\"research_notes\"] = {}\n", @@ -101,7 +102,7 @@ "\n", "\n", "async def write_report(ctx: Context, report_content: str) -> str:\n", - " \"\"\"Useful for writing a report on a given topic.\"\"\"\n", + " \"\"\"Useful for writing a report on a given topic. Your input should be a markdown formatted report.\"\"\"\n", " current_state = await ctx.get(\"state\")\n", " current_state[\"report_content\"] = report_content\n", " await ctx.set(\"state\", current_state)\n", @@ -109,7 +110,7 @@ "\n", "\n", "async def review_report(ctx: Context, review: str) -> str:\n", - " \"\"\"Useful for reviewing a report and providing feedback.\"\"\"\n", + " \"\"\"Useful for reviewing a report and providing feedback. Your input should be a review of the report.\"\"\"\n", " current_state = await ctx.get(\"state\")\n", " current_state[\"review\"] = review\n", " await ctx.set(\"state\", current_state)\n", @@ -140,10 +141,11 @@ " description=\"Useful for searching the web for information on a given topic and recording notes on the topic.\",\n", " system_prompt=(\n", " \"You are the ResearchAgent that can search the web for information on a given topic and record notes on the topic. \"\n", - " \"Once notes are recorded and you are satisfied, you should hand off control to the WriteAgent to write a report on the topic.\"\n", + " \"Once notes are recorded and you are satisfied, you should hand off control to the WriteAgent to write a report on the topic. \"\n", + " \"You should have at least some notes on a topic before handing off control to the WriteAgent.\"\n", " ),\n", " llm=llm,\n", - " tools=[search_web],\n", + " tools=[search_web, record_notes],\n", " can_handoff_to=[\"WriteAgent\"],\n", ")\n", "\n", @@ -156,7 +158,7 @@ " \"Once the report is written, you should get feedback at least once from the ReviewAgent.\"\n", " ),\n", " llm=llm,\n", - " tools=[write_report, record_notes],\n", + " tools=[write_report],\n", " can_handoff_to=[\"ReviewAgent\", \"ResearchAgent\"],\n", ")\n", "\n", @@ -164,8 +166,9 @@ " name=\"ReviewAgent\",\n", " description=\"Useful for reviewing a report and providing feedback.\",\n", " system_prompt=(\n", - " \"You are the ReviewAgent that can review a report and provide feedback. \"\n", - " \"Your feedback should either approve the current report or request changes for the WriteAgent to implement.\"\n", + " \"You are the ReviewAgent that can review the write report and provide feedback. \"\n", + " \"Your review should either approve the current report or request changes for the WriteAgent to implement. \"\n", + " \"If you have feedback that requires changes, you should hand off control to the WriteAgent to implement the changes after submitting the review.\"\n", " ),\n", " llm=llm,\n", " tools=[review_report],\n", @@ -192,7 +195,7 @@ "\n", "agent_workflow = AgentWorkflow(\n", " agents=[research_agent, write_agent, review_agent],\n", - " root_agent=write_agent.name,\n", + " root_agent=research_agent.name,\n", " initial_state={\n", " \"research_notes\": {},\n", " \"report_content\": \"Not written yet.\",\n", @@ -217,62 +220,29 @@ "name": "stdout", "output_type": "stream", "text": [ - "\n", - "==================================================\n", - "🤖 Agent: WriteAgent\n", - "==================================================\n", - "\n", - "🛠️ Planning to use tools: ['handoff']\n", - "🔨 Calling Tool: handoff\n", - " With arguments: {'to_agent': 'ResearchAgent', 'reason': 'To gather detailed and accurate information on the history of the internet, including its development phases and evolution in the 21st century.'}\n", - "🔧 Tool Result (handoff):\n", - " Arguments: {'to_agent': 'ResearchAgent', 'reason': 'To gather detailed and accurate information on the history of the internet, including its development phases and evolution in the 21st century.'}\n", - " Output: Handed off to ResearchAgent because: To gather detailed and accurate information on the history of the internet, including its development phases and evolution in the 21st century.\n", "\n", "==================================================\n", "🤖 Agent: ResearchAgent\n", "==================================================\n", "\n", - "🛠️ Planning to use tools: ['search_web', 'search_web', 'search_web']\n", - "🔨 Calling Tool: search_web\n", - " With arguments: {'query': 'history of the internet development'}\n", - "🔨 Calling Tool: search_web\n", - " With arguments: {'query': 'history of the World Wide Web development'}\n", + "🛠️ Planning to use tools: ['search_web']\n", "🔨 Calling Tool: search_web\n", - " With arguments: {'query': 'internet development in the 21st century'}\n", + " With arguments: {'query': 'history of the internet'}\n", "🔧 Tool Result (search_web):\n", - " Arguments: {'query': 'internet development in the 21st century'}\n", - " Output: ['{\"url\": \"https://www.larus.foundation/post/internet-in-the-21st-century\", \"content\": \"From the rise of broadband and social media to the advent of cloud computing and the Internet of Things (IoT), the Internet has evolved in ways that were unimaginable just a few decades ago. Two of the most significant developments in this regard have been cloud computing and the Internet of Things (IoT), both of which have had a profound impact on the way we interact with technology. Cloud computing, which allows users to store and process data on remote servers accessed via the internet, revolutionized the way businesses and individuals manage information. IoT devices, ranging from smart home gadgets to industrial sensors, collect and share data over the internet, enabling new levels of automation, efficiency, and convenience.\"}', '{\"url\": \"https://journalcjast.com/index.php/CJAST/article/view/3963\", \"content\": \"Internet an Integral Part of Human Life in 21st Century: A Review Internet an Integral Part of Human Life in 21st Century: A Review The Internet in 21st is the backbone of an inexhaustible source of global information that has revolutionized the communication system, knowledge transmission and education system which brings progress in all fields of endeavour from the creation of new goods, services and ideas for the advancement of knowledge and well-being of society as well. This paper emphasized on both positive and negative impacts of Internet in our day to day lives; Psychological profile of addicted people; potential risk on emotional, mental and physical health and possible treatment strategies of IAD.\"}', '{\"url\": \"https://www.tech21century.com/transforming-21st-century-its-time-for-the-internet/\", \"content\": \"Stages of Internet Development. Now the Internet seems to be a commodity, but let\\'s remember what it was like at the beginning of the 21st century and compare it with the current state of affairs. Here is a brief history of how the Internet has been gaining momentum since 2000. 2000: The average site load time was 16 seconds.\"}', '{\"url\": \"https://www.researchgate.net/publication/364329693_Internet_an_Integral_Part_of_Human_Life_in_21_st_Century_A_Review\", \"content\": \"The Internet in 21 st is the backbone of an inexhaustible source of global information that has revolutionized the communication system, knowledge transmission and education system which brings\"}', '{\"url\": \"https://pmc.ncbi.nlm.nih.gov/articles/PMC7111555/\", \"content\": \"Twenty first century has witnessed emergence of some ground breaking information technologies that have revolutionised our way of life. The revolution began late in 20th century with the arrival of internet in 1995, which has given rise to methods, tools and gadgets having astonishing applications in all academic disciplines and business sectors.\"}']\n", - "🔧 Tool Result (search_web):\n", - " Arguments: {'query': 'history of the World Wide Web development'}\n", - " Output: ['{\"url\": \"https://www.geeksforgeeks.org/history-of-the-web/\", \"content\": \"History Of The Web. The World Wide Web was created in 1989 by Tim Berners-Lee and his team at CERN in Geneva, Switzerland. ... The Internet of Things (IoT) is a newer development in web history. It involves connecting everyday objects like appliances and devices to the internet, allowing them to communicate and share data.\"}', '{\"url\": \"https://en.wikipedia.org/wiki/History_of_the_World_Wide_Web\", \"content\": \"By December 1990, Berners-Lee and his work team had built all the tools necessary for a working Web: the HyperText Transfer Protocol (HTTP), the HyperText Markup Language (HTML), the first web browser (named WorldWideWeb, which was also a web editor), the first web server (later known as CERN httpd) and the first web site (http://info.cern.ch) containing the first web pages that described the project itself was published on 20 December 1990.[16][17] Through Internet connectivity, manufacturers are now able to interact with the devices they have sold and shipped to their customers, and customers are able to interact with the manufacturer (and other providers) to access a lot of new content.[115]\\\\nWeb3 (sometimes also referred to as Web 3.0) is an idea for a decentralized Web based on public blockchains, smart contracts, digital tokens and digital wallets.[116]\\\\nHistoriography[edit]\\\\nHistoriography of the Web poses specific challenges including, disposable data, missing links, lost content and archived websites, which have consequences for web historians. Mozilla released a mobile OS designed to run web apps in 2012,[110] but discontinued it in 2015.[111]\\\\nGoogle announced specifications for Accelerated Mobile Pages (AMP),[112] and progressive web applications (PWA) in 2015.[113] AMPs use a combination of HTML, JavaScript, and Web Components to optimize web pages for mobile devices; and PWAs are web pages that, with a combination of web workers and manifest files, can be saved to a mobile device and opened like a native app.\\\\n In the process, he developed three essential technologies:\\\\nWith help from Cailliau he published a more formal proposal on 12 November 1990 to build a \\\\\"hypertext project\\\\\" called World Wide Web (abbreviated \\\\\"W3\\\\\") as a \\\\\"web\\\\\" of \\\\\"hypertext documents\\\\\" to be viewed by \\\\\"browsers\\\\\" using a client\\\\u2013server architecture.[14][15] The proposal was modelled after the Standard Generalized Markup Language (SGML) reader Dynatext by Electronic Book Technology, a spin-off from the Institute for Research in Information and Scholarship at Brown University. It described a system called \\\\\"Mesh\\\\\" that referenced ENQUIRE, the database and software project he had built in 1980, with a more elaborate information management system based on links embedded as text: \\\\\"Imagine, then, the references in this document all being associated with the network address of the thing to which they referred, so that while reading this document, you could skip to them with a click of the mouse.\\\\\"\"}', '{\"url\": \"https://medium.com/@Abhishek-Tiwari/the-history-and-evolution-of-web-development-from-html-to-the-modern-web-982e3f90e891\", \"content\": \"The History and Evolution of Web Development: From HTML to the Modern Web\\\\nAbhishek Tiwari\\\\nFollow\\\\n--\\\\nListen\\\\nShare\\\\nThe World Wide Web has transformed our lives, becoming an integral part of how we access information, communicate, and conduct business. Thanks for reading my blog \\\\ud83d\\\\ude0d\\\\nFollow me\\\\u00a0: https://bio.link/abhishektiwari\\\\n--\\\\n--\\\\nWritten by Abhishek Tiwari\\\\nFrontend Web Developer | HTML | CSS | JavaScript\\\\nHelp\\\\nStatus\\\\nAbout\\\\nCareers\\\\nBlog\\\\nPrivacy\\\\nTerms\\\\nText to speech\\\\nTeams Progressive Web Apps (PWAs) also became popular, offering offline capabilities and a more app-like experience on the web.\\\\nModern Web Development\\\\nWeb development is embracing AI and machine learning for personalized user experiences. In 1990, he proposed the concept of the web and created the first web browser and web server software.\\\\n From the birth of the World Wide Web to the dynamic, interconnected digital landscape of today, web development has come a long way.\"}', '{\"url\": \"https://www.encyclopedia.com/economics/encyclopedias-almanacs-transcripts-and-maps/history-internet-and-world-wide-web-www\", \"content\": \"The World Wide Web Consortium (W3C), of which Berners-Lee was the founder, was born in 1994 just as the Web was beginning to hit critical mass. The organization, though not a governing body, was founded to guide and oversee the Web\\'s development and minimize proprietary battles over standards and protocols in an effort to keep the Web\"}', '{\"url\": \"https://www.britannica.com/topic/World-Wide-Web\", \"content\": \"The Web gives users access to a vast array of mass media and content\\\\u2014via the deep web, the dark web, and the commonly accessible surface web\\\\u2014that is connected by means of hypertext or hypermedia links\\\\u2014i.e., hyperlinks, electronic connections that link related pieces of information in order to allow a user easy access to them. The World Wide Web gained rapid acceptance with the creation of a Web browser called Mosaic, which was developed in the United States by Marc Andreessen and others at the National Center for Supercomputing Applications at the University of Illinois and was released in September 1993. The Web operates within the Internet\\\\u2019s basic client-server format; servers are computer programs that store and transmit documents to other computers on the network when asked to, while clients are programs that request documents from a server as the user asks for them. IE was integrated into the Windows operating system in 1996 (that is, it came \\\\u201cbundled\\\\u201d ready-to-use within the operating system of personal computers), which had the effect of reducing competition from other Internet browser manufacturers, such as Netscape. The software giant Microsoft Corporation became interested in supporting Internet applications on personal computers and developed its own Web browser (based initially on Mosaic), Internet Explorer (IE), in 1995 as an add-on to the Windows 95 operating system.\"}']\n", - "🔧 Tool Result (search_web):\n", - " Arguments: {'query': 'history of the internet development'}\n", - " Output: ['{\"url\": \"https://www.internetsociety.org/internet/history-internet/brief-history-internet/\", \"content\": \"In this paper, 3 several of us involved in the development and evolution of the Internet share our views of its origins and history. This history revolves around four distinct aspects. There is the technological evolution that began with early research on packet switching and the ARPANET (and related technologies), and where current research continues to expand the horizons of the\"}', '{\"url\": \"https://www.livescience.com/20727-internet-history.html\", \"content\": \"Internet history timeline: ARPANET to the World Wide Web\\\\nThe internet history timeline shows how today\\'s vast network evolved from the initial concept\\\\nIn internet history, credit for the initial concept that developed into the World Wide Web is typically given to Leonard Kleinrock. \\\\\"\\\\nAccording to the journal Management and Business Review (MBR), Kleinrock, along with other innovators such as J.C.R. Licklider, the first director of the Information Processing Technology Office (IPTO), provided the backbone for the ubiquitous stream of emails, media, Facebook postings and tweets that are now shared online every day.\\\\n The precursor to the internet was jumpstarted in the early days of the history of computers , in 1969 with the U.S. Defense Department\\'s Advanced Research Projects Agency Network (ARPANET), according to the journal American Scientist. The successful push to stop the bill, involving technology companies such as Google and nonprofit organizations including Wikipedia and the Electronic Frontier Foundation, is considered a victory for sites such as YouTube that depend on user-generated content, as well as \\\\\"fair use\\\\\" on the internet.\\\\n Vinton Cerf and Bob Kahn (the duo said by many to be the Fathers of the Internet) publish \\\\\"A Protocol for Packet Network Interconnection,\\\\\" which details the design of TCP.\\\\n1976:\"}', '{\"url\": \"https://historyoftheinternet.net/timeline/\", \"content\": \"The term internet can be applied generically to refer to any online activity since the first SAGE online activity to today. Thus, the naming of a network \\\\\"Internet\\' is a side path activity between telegraph and today. The typical Internet history documentation goes into great detail about the technology evolution from an idea in 1961 to today.\"}', '{\"url\": \"https://usg.edu/galileo/skills/unit07/internet07_02.phtml\", \"content\": \"The Internet started in the 1960s as a way for government researchers to share information. This eventually led to the formation of the ARPANET (Advanced Research Projects Agency Network), the network that ultimately evolved into what we now know as the Internet. In response to this, other networks were created to provide information sharing. ARPANET and the Defense Data Network officially changed to the TCP/IP standard on January 1, 1983, hence the birth of the Internet. (Business computers like the UNIVAC processed data more slowly than the IAS-type machines, but were designed for fast input and output.) The first few sales were to government agencies, the A.C. Nielsen Company, and the Prudential Insurance Company.\"}', '{\"url\": \"https://www.geeksforgeeks.org/history-of-internet/\", \"content\": \"Key Milestones in Internet History. 1969: Launch of ARPANET, the first operational packet-switching network. 1971: The first email is sent by Ray Tomlinson. ... Story Connection: Bush\\'s work emerged from his leadership in the U.S. Office of Scientific Research and Development during World War II. His efforts to coordinate wartime technology\"}']\n", - "📤 Output: I've gathered information on the history of the internet, the development of the World Wide Web, and the evolution of the internet in the 21st century. Here are the key points from the research:\n", - "\n", - "### History of the Internet Development\n", - "- The internet's origins trace back to the 1960s with the development of ARPANET, a project initiated by the U.S. Defense Department's Advanced Research Projects Agency (ARPA). ARPANET was the first operational packet-switching network, which laid the groundwork for the internet.\n", - "- Key figures in the early development include Leonard Kleinrock, J.C.R. Licklider, Vinton Cerf, and Bob Kahn. Cerf and Kahn developed the TCP/IP protocols, which became the standard for internet communication.\n", - "- The transition to the TCP/IP standard on January 1, 1983, is considered the official birth of the internet.\n", - "\n", - "### Development of the World Wide Web\n", - "- The World Wide Web was invented by Tim Berners-Lee in 1989 at CERN. He developed essential technologies such as HTTP, HTML, and the first web browser.\n", - "- The first website was launched in 1990, and the World Wide Web Consortium (W3C) was established in 1994 to guide web development.\n", - "- The web gained rapid popularity with the introduction of the Mosaic browser in 1993, which made the web accessible to the general public.\n", - "\n", - "### Internet Development in the 21st Century\n", - "- The 21st century has seen significant advancements such as broadband internet, social media, cloud computing, and the Internet of Things (IoT).\n", - "- Cloud computing has transformed data storage and processing, while IoT has enabled smart devices to communicate and automate tasks.\n", - "- The internet has become integral to daily life, influencing communication, education, and business.\n", - "\n", - "With these notes, I will now hand off to the WriteAgent to compose a comprehensive report on the history of the internet.\n", + " Arguments: {'query': 'history of the internet'}\n", + " Output: {'query': 'history of the internet', 'follow_up_questions': None, 'answer': None, 'images': [], 'results': [{'title': 'Internet history timeline: ARPANET to the World Wide Web', 'url': 'https://www.livescience.com/20727-internet-history.html', 'content': 'Internet history timeline: ARPANET to the World Wide Web\\nThe internet history timeline shows how today\\'s vast network evolved from the initial concept\\nIn internet history, credit for the initial concept that developed into the World Wide Web is typically given to Leonard Kleinrock. \"\\nAccording to the journal Management and Business Review (MBR), Kleinrock, along with other innovators such as J.C.R. Licklider, the first director of the Information Processing Technology Office (IPTO), provided the backbone for the ubiquitous stream of emails, media, Facebook postings and tweets that are now shared online every day.\\n The precursor to the internet was jumpstarted in the early days of the history of computers , in 1969 with the U.S. Defense Department\\'s Advanced Research Projects Agency Network (ARPANET), according to the journal American Scientist. The successful push to stop the bill, involving technology companies such as Google and nonprofit organizations including Wikipedia and the Electronic Frontier Foundation, is considered a victory for sites such as YouTube that depend on user-generated content, as well as \"fair use\" on the internet.\\n Vinton Cerf and Bob Kahn (the duo said by many to be the Fathers of the Internet) publish \"A Protocol for Packet Network Interconnection,\" which details the design of TCP.\\n1976:', 'score': 0.81097376, 'raw_content': None}, {'title': 'A Brief History of the Internet - University System of Georgia', 'url': 'https://usg.edu/galileo/skills/unit07/internet07_02.phtml', 'content': 'The Internet started in the 1960s as a way for government researchers to share information. This eventually led to the formation of the ARPANET (Advanced Research Projects Agency Network), the network that ultimately evolved into what we now know as the Internet. In response to this, other networks were created to provide information sharing. ARPANET and the Defense Data Network officially changed to the TCP/IP standard on January 1, 1983, hence the birth of the Internet. (Business computers like the UNIVAC processed data more slowly than the IAS-type machines, but were designed for fast input and output.) The first few sales were to government agencies, the A.C. Nielsen Company, and the Prudential Insurance Company.', 'score': 0.8091708, 'raw_content': None}, {'title': 'Timeline - History of the Internet', 'url': 'https://historyoftheinternet.net/timeline/', 'content': \"Learn how the internet evolved from SAGE and IBM's internal networks to ARPANET and the World Wide Web. Explore the commercial and government paths that led to the current internet format and protocols.\", 'score': 0.7171114, 'raw_content': None}, {'title': 'Learn About Internet History | History of the Internet', 'url': 'https://internethistory.org/', 'content': 'Learn about the origins, evolution and impact of the internet through stories, materials and videos. Explore the first internet message, optical amplifier, wavelength division multiplexing and more.', 'score': 0.7040996, 'raw_content': None}, {'title': 'Brief History of the Internet', 'url': 'https://www.internetsociety.org/resources/doc/2017/brief-history-internet/', 'content': \"Learn how the Internet evolved from the initial internetting concepts to a global network of networks that transformed the computer and communications world. Explore the key milestones, challenges, and opportunities of the Internet's development and future.\", 'score': 0.6944897, 'raw_content': None}], 'response_time': 1.65}\n", + "🛠️ Planning to use tools: ['record_notes']\n", + "🔨 Calling Tool: record_notes\n", + " With arguments: {'notes': \"The internet's history began in the 1960s as a project for government researchers to share information, leading to the creation of ARPANET (Advanced Research Projects Agency Network). ARPANET was the first network to implement the TCP/IP protocol suite, which became the foundation for the modern internet. On January 1, 1983, ARPANET and the Defense Data Network officially adopted TCP/IP, marking the birth of the internet.\\n\\nThe World Wide Web was developed later, in 1989, by Tim Berners-Lee, a British scientist at CERN. The web was initially conceived as a way to facilitate information sharing among scientists and institutes around the world. Berners-Lee developed the first web browser and web server, and introduced the concept of hyperlinks, which allowed users to navigate between different documents on the web.\\n\\nIn the 21st century, the internet has evolved into a global network that connects billions of devices and users. It has transformed communication, commerce, entertainment, and education, among other fields. The development of broadband technology, mobile internet, and social media platforms has further accelerated the internet's growth and impact.\", 'notes_title': 'History of the Internet'}\n", + "🔧 Tool Result (record_notes):\n", + " Arguments: {'notes': \"The internet's history began in the 1960s as a project for government researchers to share information, leading to the creation of ARPANET (Advanced Research Projects Agency Network). ARPANET was the first network to implement the TCP/IP protocol suite, which became the foundation for the modern internet. On January 1, 1983, ARPANET and the Defense Data Network officially adopted TCP/IP, marking the birth of the internet.\\n\\nThe World Wide Web was developed later, in 1989, by Tim Berners-Lee, a British scientist at CERN. The web was initially conceived as a way to facilitate information sharing among scientists and institutes around the world. Berners-Lee developed the first web browser and web server, and introduced the concept of hyperlinks, which allowed users to navigate between different documents on the web.\\n\\nIn the 21st century, the internet has evolved into a global network that connects billions of devices and users. It has transformed communication, commerce, entertainment, and education, among other fields. The development of broadband technology, mobile internet, and social media platforms has further accelerated the internet's growth and impact.\", 'notes_title': 'History of the Internet'}\n", + " Output: Notes recorded.\n", "🛠️ Planning to use tools: ['handoff']\n", "🔨 Calling Tool: handoff\n", - " With arguments: {'to_agent': 'WriteAgent', 'reason': 'To write a comprehensive report on the history of the internet based on the gathered research notes.'}\n", + " With arguments: {'to_agent': 'WriteAgent', 'reason': 'I have gathered and recorded notes on the history of the internet, including its development, the creation of the web, and its evolution in the 21st century. The WriteAgent can now use these notes to write a comprehensive report.'}\n", "🔧 Tool Result (handoff):\n", - " Arguments: {'to_agent': 'WriteAgent', 'reason': 'To write a comprehensive report on the history of the internet based on the gathered research notes.'}\n", - " Output: Handed off to WriteAgent because: To write a comprehensive report on the history of the internet based on the gathered research notes.\n", + " Arguments: {'to_agent': 'WriteAgent', 'reason': 'I have gathered and recorded notes on the history of the internet, including its development, the creation of the web, and its evolution in the 21st century. The WriteAgent can now use these notes to write a comprehensive report.'}\n", + " Output: Handed off to WriteAgent because: I have gathered and recorded notes on the history of the internet, including its development, the creation of the web, and its evolution in the 21st century. The WriteAgent can now use these notes to write a comprehensive report.\n", "\n", "==================================================\n", "🤖 Agent: WriteAgent\n", @@ -280,16 +250,16 @@ "\n", "🛠️ Planning to use tools: ['write_report']\n", "🔨 Calling Tool: write_report\n", - " With arguments: {'report_content': \"# The History of the Internet\\n\\n## Introduction\\nThe internet, a global network of interconnected computers, has revolutionized the way we communicate, access information, and conduct business. Its development is a story of innovation and collaboration, involving numerous individuals and organizations over several decades. This report provides a brief overview of the history of the internet, including its early development, the creation of the World Wide Web, and its evolution in the 21st century.\\n\\n## Early Development of the Internet\\nThe origins of the internet can be traced back to the 1960s with the creation of ARPANET, a project initiated by the U.S. Defense Department's Advanced Research Projects Agency (ARPA). ARPANET was the first operational packet-switching network, which laid the groundwork for the modern internet. Key figures in this early development include Leonard Kleinrock, J.C.R. Licklider, Vinton Cerf, and Bob Kahn. Cerf and Kahn's development of the TCP/IP protocols in the 1970s was a pivotal moment, as these protocols became the standard for internet communication. The transition to the TCP/IP standard on January 1, 1983, is considered the official birth of the internet.\\n\\n## The Development of the World Wide Web\\nThe World Wide Web, a system for accessing information over the internet, was invented by Tim Berners-Lee in 1989 at CERN in Switzerland. Berners-Lee developed essential technologies such as the HyperText Transfer Protocol (HTTP), the HyperText Markup Language (HTML), and the first web browser. The first website was launched in 1990, and the World Wide Web Consortium (W3C) was established in 1994 to guide the development of web standards. The web gained rapid popularity with the introduction of the Mosaic browser in 1993, which made the web accessible to the general public.\\n\\n## Internet in the 21st Century\\nThe 21st century has witnessed significant advancements in internet technology, including the rise of broadband internet, social media, cloud computing, and the Internet of Things (IoT). Cloud computing has transformed data storage and processing, allowing users to store and access data on remote servers. IoT has enabled everyday objects to connect to the internet, facilitating automation and efficiency in various sectors. The internet has become an integral part of daily life, influencing communication, education, and business practices worldwide.\\n\\n## Conclusion\\nThe history of the internet is a testament to human ingenuity and the power of collaboration. From its humble beginnings as a military research project to its current status as a global communication network, the internet continues to evolve and shape the future of technology and society. As we move forward, the internet will undoubtedly play a crucial role in addressing the challenges and opportunities of the digital age.\"}\n", + " With arguments: {'report_content': \"# History of the Internet\\n\\nThe history of the internet is a fascinating journey from a government research project to a global network that has transformed the way we communicate, work, and live. This report provides a brief overview of the key milestones in the development of the internet, the World Wide Web, and the internet's evolution in the 21st century.\\n\\n## Development of the Internet\\n\\nThe origins of the internet date back to the 1960s, when it was conceived as a means for government researchers to share information. This led to the creation of ARPANET (Advanced Research Projects Agency Network), which was the first network to implement the TCP/IP protocol suite. TCP/IP became the foundational technology for the modern internet. On January 1, 1983, ARPANET and the Defense Data Network officially adopted TCP/IP, marking the official birth of the internet.\\n\\n## Development of the World Wide Web\\n\\nThe World Wide Web was developed in 1989 by Tim Berners-Lee, a British scientist working at CERN. The web was initially designed to facilitate information sharing among scientists and research institutes globally. Berners-Lee created the first web browser and web server, introducing the concept of hyperlinks, which allowed users to navigate between different documents on the web seamlessly.\\n\\n## The Internet in the 21st Century\\n\\nIn the 21st century, the internet has evolved into a vast global network connecting billions of devices and users. It has revolutionized communication, commerce, entertainment, and education, among other fields. The development of broadband technology, mobile internet, and social media platforms has further accelerated the internet's growth and impact, making it an integral part of daily life for people around the world.\\n\\nThe internet continues to evolve, with ongoing advancements in technology and infrastructure shaping its future. As it grows, the internet remains a powerful tool for innovation, connectivity, and information sharing, influencing nearly every aspect of modern society.\"}\n", "🔧 Tool Result (write_report):\n", - " Arguments: {'report_content': \"# The History of the Internet\\n\\n## Introduction\\nThe internet, a global network of interconnected computers, has revolutionized the way we communicate, access information, and conduct business. Its development is a story of innovation and collaboration, involving numerous individuals and organizations over several decades. This report provides a brief overview of the history of the internet, including its early development, the creation of the World Wide Web, and its evolution in the 21st century.\\n\\n## Early Development of the Internet\\nThe origins of the internet can be traced back to the 1960s with the creation of ARPANET, a project initiated by the U.S. Defense Department's Advanced Research Projects Agency (ARPA). ARPANET was the first operational packet-switching network, which laid the groundwork for the modern internet. Key figures in this early development include Leonard Kleinrock, J.C.R. Licklider, Vinton Cerf, and Bob Kahn. Cerf and Kahn's development of the TCP/IP protocols in the 1970s was a pivotal moment, as these protocols became the standard for internet communication. The transition to the TCP/IP standard on January 1, 1983, is considered the official birth of the internet.\\n\\n## The Development of the World Wide Web\\nThe World Wide Web, a system for accessing information over the internet, was invented by Tim Berners-Lee in 1989 at CERN in Switzerland. Berners-Lee developed essential technologies such as the HyperText Transfer Protocol (HTTP), the HyperText Markup Language (HTML), and the first web browser. The first website was launched in 1990, and the World Wide Web Consortium (W3C) was established in 1994 to guide the development of web standards. The web gained rapid popularity with the introduction of the Mosaic browser in 1993, which made the web accessible to the general public.\\n\\n## Internet in the 21st Century\\nThe 21st century has witnessed significant advancements in internet technology, including the rise of broadband internet, social media, cloud computing, and the Internet of Things (IoT). Cloud computing has transformed data storage and processing, allowing users to store and access data on remote servers. IoT has enabled everyday objects to connect to the internet, facilitating automation and efficiency in various sectors. The internet has become an integral part of daily life, influencing communication, education, and business practices worldwide.\\n\\n## Conclusion\\nThe history of the internet is a testament to human ingenuity and the power of collaboration. From its humble beginnings as a military research project to its current status as a global communication network, the internet continues to evolve and shape the future of technology and society. As we move forward, the internet will undoubtedly play a crucial role in addressing the challenges and opportunities of the digital age.\"}\n", + " Arguments: {'report_content': \"# History of the Internet\\n\\nThe history of the internet is a fascinating journey from a government research project to a global network that has transformed the way we communicate, work, and live. This report provides a brief overview of the key milestones in the development of the internet, the World Wide Web, and the internet's evolution in the 21st century.\\n\\n## Development of the Internet\\n\\nThe origins of the internet date back to the 1960s, when it was conceived as a means for government researchers to share information. This led to the creation of ARPANET (Advanced Research Projects Agency Network), which was the first network to implement the TCP/IP protocol suite. TCP/IP became the foundational technology for the modern internet. On January 1, 1983, ARPANET and the Defense Data Network officially adopted TCP/IP, marking the official birth of the internet.\\n\\n## Development of the World Wide Web\\n\\nThe World Wide Web was developed in 1989 by Tim Berners-Lee, a British scientist working at CERN. The web was initially designed to facilitate information sharing among scientists and research institutes globally. Berners-Lee created the first web browser and web server, introducing the concept of hyperlinks, which allowed users to navigate between different documents on the web seamlessly.\\n\\n## The Internet in the 21st Century\\n\\nIn the 21st century, the internet has evolved into a vast global network connecting billions of devices and users. It has revolutionized communication, commerce, entertainment, and education, among other fields. The development of broadband technology, mobile internet, and social media platforms has further accelerated the internet's growth and impact, making it an integral part of daily life for people around the world.\\n\\nThe internet continues to evolve, with ongoing advancements in technology and infrastructure shaping its future. As it grows, the internet remains a powerful tool for innovation, connectivity, and information sharing, influencing nearly every aspect of modern society.\"}\n", " Output: Report written.\n", "🛠️ Planning to use tools: ['handoff']\n", "🔨 Calling Tool: handoff\n", - " With arguments: {'to_agent': 'ReviewAgent', 'reason': 'To review the report on the history of the internet and provide feedback.'}\n", + " With arguments: {'to_agent': 'ReviewAgent', 'reason': 'The report on the history of the internet has been written and needs to be reviewed for accuracy and completeness.'}\n", "🔧 Tool Result (handoff):\n", - " Arguments: {'to_agent': 'ReviewAgent', 'reason': 'To review the report on the history of the internet and provide feedback.'}\n", - " Output: Handed off to ReviewAgent because: To review the report on the history of the internet and provide feedback.\n", + " Arguments: {'to_agent': 'ReviewAgent', 'reason': 'The report on the history of the internet has been written and needs to be reviewed for accuracy and completeness.'}\n", + " Output: Handed off to ReviewAgent because: The report on the history of the internet has been written and needs to be reviewed for accuracy and completeness.\n", "\n", "==================================================\n", "🤖 Agent: ReviewAgent\n", @@ -297,11 +267,11 @@ "\n", "🛠️ Planning to use tools: ['review_report']\n", "🔨 Calling Tool: review_report\n", - " With arguments: {'review': \"# The History of the Internet\\n\\n## Introduction\\nThe internet, a global network of interconnected computers, has revolutionized the way we communicate, access information, and conduct business. Its development is a story of innovation and collaboration, involving numerous individuals and organizations over several decades. This report provides a brief overview of the history of the internet, including its early development, the creation of the World Wide Web, and its evolution in the 21st century.\\n\\n## Early Development of the Internet\\nThe origins of the internet can be traced back to the 1960s with the creation of ARPANET, a project initiated by the U.S. Defense Department's Advanced Research Projects Agency (ARPA). ARPANET was the first operational packet-switching network, which laid the groundwork for the modern internet. Key figures in this early development include Leonard Kleinrock, J.C.R. Licklider, Vinton Cerf, and Bob Kahn. Cerf and Kahn's development of the TCP/IP protocols in the 1970s was a pivotal moment, as these protocols became the standard for internet communication. The transition to the TCP/IP standard on January 1, 1983, is considered the official birth of the internet.\\n\\n## The Development of the World Wide Web\\nThe World Wide Web, a system for accessing information over the internet, was invented by Tim Berners-Lee in 1989 at CERN in Switzerland. Berners-Lee developed essential technologies such as the HyperText Transfer Protocol (HTTP), the HyperText Markup Language (HTML), and the first web browser. The first website was launched in 1990, and the World Wide Web Consortium (W3C) was established in 1994 to guide the development of web standards. The web gained rapid popularity with the introduction of the Mosaic browser in 1993, which made the web accessible to the general public.\\n\\n## Internet in the 21st Century\\nThe 21st century has witnessed significant advancements in internet technology, including the rise of broadband internet, social media, cloud computing, and the Internet of Things (IoT). Cloud computing has transformed data storage and processing, allowing users to store and access data on remote servers. IoT has enabled everyday objects to connect to the internet, facilitating automation and efficiency in various sectors. The internet has become an integral part of daily life, influencing communication, education, and business practices worldwide.\\n\\n## Conclusion\\nThe history of the internet is a testament to human ingenuity and the power of collaboration. From its humble beginnings as a military research project to its current status as a global communication network, the internet continues to evolve and shape the future of technology and society. As we move forward, the internet will undoubtedly play a crucial role in addressing the challenges and opportunities of the digital age.\"}\n", + " With arguments: {'review': \"The report on the history of the internet provides a concise and informative overview of the key developments in the internet's history. It effectively covers the origins of the internet with ARPANET, the creation of the World Wide Web by Tim Berners-Lee, and the evolution of the internet in the 21st century. The report is well-structured, with clear sections that make it easy to follow.\\n\\nThe content is accurate and aligns with the historical timeline of the internet's development. It highlights significant milestones such as the adoption of TCP/IP and the introduction of hyperlinks, which are crucial to understanding the internet's growth.\\n\\nOverall, the report meets the requirements and provides a comprehensive summary of the internet's history. It is approved for final submission.\"}\n", "🔧 Tool Result (review_report):\n", - " Arguments: {'review': \"# The History of the Internet\\n\\n## Introduction\\nThe internet, a global network of interconnected computers, has revolutionized the way we communicate, access information, and conduct business. Its development is a story of innovation and collaboration, involving numerous individuals and organizations over several decades. This report provides a brief overview of the history of the internet, including its early development, the creation of the World Wide Web, and its evolution in the 21st century.\\n\\n## Early Development of the Internet\\nThe origins of the internet can be traced back to the 1960s with the creation of ARPANET, a project initiated by the U.S. Defense Department's Advanced Research Projects Agency (ARPA). ARPANET was the first operational packet-switching network, which laid the groundwork for the modern internet. Key figures in this early development include Leonard Kleinrock, J.C.R. Licklider, Vinton Cerf, and Bob Kahn. Cerf and Kahn's development of the TCP/IP protocols in the 1970s was a pivotal moment, as these protocols became the standard for internet communication. The transition to the TCP/IP standard on January 1, 1983, is considered the official birth of the internet.\\n\\n## The Development of the World Wide Web\\nThe World Wide Web, a system for accessing information over the internet, was invented by Tim Berners-Lee in 1989 at CERN in Switzerland. Berners-Lee developed essential technologies such as the HyperText Transfer Protocol (HTTP), the HyperText Markup Language (HTML), and the first web browser. The first website was launched in 1990, and the World Wide Web Consortium (W3C) was established in 1994 to guide the development of web standards. The web gained rapid popularity with the introduction of the Mosaic browser in 1993, which made the web accessible to the general public.\\n\\n## Internet in the 21st Century\\nThe 21st century has witnessed significant advancements in internet technology, including the rise of broadband internet, social media, cloud computing, and the Internet of Things (IoT). Cloud computing has transformed data storage and processing, allowing users to store and access data on remote servers. IoT has enabled everyday objects to connect to the internet, facilitating automation and efficiency in various sectors. The internet has become an integral part of daily life, influencing communication, education, and business practices worldwide.\\n\\n## Conclusion\\nThe history of the internet is a testament to human ingenuity and the power of collaboration. From its humble beginnings as a military research project to its current status as a global communication network, the internet continues to evolve and shape the future of technology and society. As we move forward, the internet will undoubtedly play a crucial role in addressing the challenges and opportunities of the digital age.\"}\n", + " Arguments: {'review': \"The report on the history of the internet provides a concise and informative overview of the key developments in the internet's history. It effectively covers the origins of the internet with ARPANET, the creation of the World Wide Web by Tim Berners-Lee, and the evolution of the internet in the 21st century. The report is well-structured, with clear sections that make it easy to follow.\\n\\nThe content is accurate and aligns with the historical timeline of the internet's development. It highlights significant milestones such as the adoption of TCP/IP and the introduction of hyperlinks, which are crucial to understanding the internet's growth.\\n\\nOverall, the report meets the requirements and provides a comprehensive summary of the internet's history. It is approved for final submission.\"}\n", " Output: Report reviewed.\n", - "📤 Output: The report on the history of the internet has been reviewed and is approved. It provides a comprehensive overview of the internet's development, the creation of the World Wide Web, and its evolution in the 21st century. The report is well-structured and informative.\n" + "📤 Output: The report on the history of the internet has been reviewed and approved. It provides a comprehensive and accurate overview of the internet's development, the creation of the World Wide Web, and its evolution in the 21st century. The report is well-structured and meets the requirements for final submission.\n" ] } ], @@ -315,7 +285,11 @@ ")\n", "\n", "handler = agent_workflow.run(\n", - " user_msg=\"Write me a report on the history of the internet. Briefly describe the history of the internet, including the development of the internet, the development of the web, and the development of the internet in the 21st century.\"\n", + " user_msg=(\n", + " \"Write me a report on the history of the internet. \"\n", + " \"Briefly describe the history of the internet, including the development of the internet, the development of the web, \"\n", + " \"and the development of the internet in the 21st century.\"\n", + " )\n", ")\n", "\n", "current_agent = None\n", @@ -368,22 +342,23 @@ "name": "stdout", "output_type": "stream", "text": [ - "# The History of the Internet\n", + "# History of the Internet\n", + "\n", + "The history of the internet is a fascinating journey from a government research project to a global network that has transformed the way we communicate, work, and live. This report provides a brief overview of the key milestones in the development of the internet, the World Wide Web, and the internet's evolution in the 21st century.\n", + "\n", + "## Development of the Internet\n", + "\n", + "The origins of the internet date back to the 1960s, when it was conceived as a means for government researchers to share information. This led to the creation of ARPANET (Advanced Research Projects Agency Network), which was the first network to implement the TCP/IP protocol suite. TCP/IP became the foundational technology for the modern internet. On January 1, 1983, ARPANET and the Defense Data Network officially adopted TCP/IP, marking the official birth of the internet.\n", "\n", - "## Introduction\n", - "The internet, a global network of interconnected computers, has revolutionized the way we communicate, access information, and conduct business. Its development is a story of innovation and collaboration, involving numerous individuals and organizations over several decades. This report provides a brief overview of the history of the internet, including its early development, the creation of the World Wide Web, and its evolution in the 21st century.\n", + "## Development of the World Wide Web\n", "\n", - "## Early Development of the Internet\n", - "The origins of the internet can be traced back to the 1960s with the creation of ARPANET, a project initiated by the U.S. Defense Department's Advanced Research Projects Agency (ARPA). ARPANET was the first operational packet-switching network, which laid the groundwork for the modern internet. Key figures in this early development include Leonard Kleinrock, J.C.R. Licklider, Vinton Cerf, and Bob Kahn. Cerf and Kahn's development of the TCP/IP protocols in the 1970s was a pivotal moment, as these protocols became the standard for internet communication. The transition to the TCP/IP standard on January 1, 1983, is considered the official birth of the internet.\n", + "The World Wide Web was developed in 1989 by Tim Berners-Lee, a British scientist working at CERN. The web was initially designed to facilitate information sharing among scientists and research institutes globally. Berners-Lee created the first web browser and web server, introducing the concept of hyperlinks, which allowed users to navigate between different documents on the web seamlessly.\n", "\n", - "## The Development of the World Wide Web\n", - "The World Wide Web, a system for accessing information over the internet, was invented by Tim Berners-Lee in 1989 at CERN in Switzerland. Berners-Lee developed essential technologies such as the HyperText Transfer Protocol (HTTP), the HyperText Markup Language (HTML), and the first web browser. The first website was launched in 1990, and the World Wide Web Consortium (W3C) was established in 1994 to guide the development of web standards. The web gained rapid popularity with the introduction of the Mosaic browser in 1993, which made the web accessible to the general public.\n", + "## The Internet in the 21st Century\n", "\n", - "## Internet in the 21st Century\n", - "The 21st century has witnessed significant advancements in internet technology, including the rise of broadband internet, social media, cloud computing, and the Internet of Things (IoT). Cloud computing has transformed data storage and processing, allowing users to store and access data on remote servers. IoT has enabled everyday objects to connect to the internet, facilitating automation and efficiency in various sectors. The internet has become an integral part of daily life, influencing communication, education, and business practices worldwide.\n", + "In the 21st century, the internet has evolved into a vast global network connecting billions of devices and users. It has revolutionized communication, commerce, entertainment, and education, among other fields. The development of broadband technology, mobile internet, and social media platforms has further accelerated the internet's growth and impact, making it an integral part of daily life for people around the world.\n", "\n", - "## Conclusion\n", - "The history of the internet is a testament to human ingenuity and the power of collaboration. From its humble beginnings as a military research project to its current status as a global communication network, the internet continues to evolve and shape the future of technology and society. As we move forward, the internet will undoubtedly play a crucial role in addressing the challenges and opportunities of the digital age.\n" + "The internet continues to evolve, with ongoing advancements in technology and infrastructure shaping its future. As it grows, the internet remains a powerful tool for innovation, connectivity, and information sharing, influencing nearly every aspect of modern society.\n" ] } ],