diff --git a/examples/monitoring_controlflow_agents.ipynb b/examples/monitoring_controlflow_agents.ipynb new file mode 100644 index 00000000..a32a9acf --- /dev/null +++ b/examples/monitoring_controlflow_agents.ipynb @@ -0,0 +1,1805 @@ +{ + "nbformat": 4, + "nbformat_minor": 0, + "metadata": { + "colab": { + "provenance": [] + }, + "kernelspec": { + "name": "python3", + "display_name": "Python 3" + }, + "language_info": { + "name": "python" + }, + "widgets": { + "application/vnd.jupyter.widget-state+json": { + "e5698f7d1b15481ab164e814675a4af0": { + "model_module": "@jupyter-widgets/output", + "model_name": "OutputModel", + "model_module_version": "1.0.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/output", + "_model_module_version": "1.0.0", + "_model_name": "OutputModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/output", + "_view_module_version": "1.0.0", + "_view_name": "OutputView", + "layout": "IPY_MODEL_930e4b3f459d4acfa075a16e047af215", + "msg_id": "", + "outputs": [ + { + "output_type": "display_data", + "data": { + "text/plain": "\u001b[34m╭─\u001b[0m\u001b[34m \u001b[0m\u001b[1;34mAgent: Marvin\u001b[0m\u001b[34m \u001b[0m\u001b[34m─────────────────────────────────────────────────────────────────────────────────\u001b[0m\u001b[34m─╮\u001b[0m\n\u001b[34m│\u001b[0m \u001b[34m│\u001b[0m\n\u001b[34m│\u001b[0m ⠴ Tool call: \"talk_to_user\" \u001b[34m│\u001b[0m\n\u001b[34m│\u001b[0m \u001b[34m│\u001b[0m\n\u001b[34m╰─\u001b[0m\u001b[34m───────────────────────────────────────────────────────────────────────────────────\u001b[0m\u001b[34m \u001b[0m\u001b[3;34m 4:58:11 AM\u001b[0m\u001b[34m \u001b[0m\u001b[34m─╯\u001b[0m\n", + "text/html": "
╭─ Agent: Marvin ──────────────────────────────────────────────────────────────────────────────────╮\n                                                                                                  \n  ⠴ Tool call: \"talk_to_user\"                                                                     \n                                                                                                  \n╰────────────────────────────────────────────────────────────────────────────────────  4:58:11 AM ─╯\n
\n" + }, + "metadata": {} + } + ] + } + }, + "930e4b3f459d4acfa075a16e047af215": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "4b50856d5eaa4944b55235f697d558df": { + "model_module": "@jupyter-widgets/output", + "model_name": "OutputModel", + "model_module_version": "1.0.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/output", + "_model_module_version": "1.0.0", + "_model_name": "OutputModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/output", + "_view_module_version": "1.0.0", + "_view_name": "OutputView", + "layout": "IPY_MODEL_02dbc72a194f4fb6893c440c60179efd", + "msg_id": "", + "outputs": [ + { + "output_type": "display_data", + "data": { + "text/plain": "", + "text/html": "
\n"
+                },
+                "metadata": {}
+              }
+            ]
+          }
+        },
+        "02dbc72a194f4fb6893c440c60179efd": {
+          "model_module": "@jupyter-widgets/base",
+          "model_name": "LayoutModel",
+          "model_module_version": "1.2.0",
+          "state": {
+            "_model_module": "@jupyter-widgets/base",
+            "_model_module_version": "1.2.0",
+            "_model_name": "LayoutModel",
+            "_view_count": null,
+            "_view_module": "@jupyter-widgets/base",
+            "_view_module_version": "1.2.0",
+            "_view_name": "LayoutView",
+            "align_content": null,
+            "align_items": null,
+            "align_self": null,
+            "border": null,
+            "bottom": null,
+            "display": null,
+            "flex": null,
+            "flex_flow": null,
+            "grid_area": null,
+            "grid_auto_columns": null,
+            "grid_auto_flow": null,
+            "grid_auto_rows": null,
+            "grid_column": null,
+            "grid_gap": null,
+            "grid_row": null,
+            "grid_template_areas": null,
+            "grid_template_columns": null,
+            "grid_template_rows": null,
+            "height": null,
+            "justify_content": null,
+            "justify_items": null,
+            "left": null,
+            "margin": null,
+            "max_height": null,
+            "max_width": null,
+            "min_height": null,
+            "min_width": null,
+            "object_fit": null,
+            "object_position": null,
+            "order": null,
+            "overflow": null,
+            "overflow_x": null,
+            "overflow_y": null,
+            "padding": null,
+            "right": null,
+            "top": null,
+            "visibility": null,
+            "width": null
+          }
+        },
+        "b609bca6df264d25b555130dc1a40ce2": {
+          "model_module": "@jupyter-widgets/output",
+          "model_name": "OutputModel",
+          "model_module_version": "1.0.0",
+          "state": {
+            "_dom_classes": [],
+            "_model_module": "@jupyter-widgets/output",
+            "_model_module_version": "1.0.0",
+            "_model_name": "OutputModel",
+            "_view_count": null,
+            "_view_module": "@jupyter-widgets/output",
+            "_view_module_version": "1.0.0",
+            "_view_name": "OutputView",
+            "layout": "IPY_MODEL_2a0cdb110ae44a24bd96ae575312ed71",
+            "msg_id": "",
+            "outputs": [
+              {
+                "output_type": "display_data",
+                "data": {
+                  "text/plain": "\u001b[34m╭─\u001b[0m\u001b[34m \u001b[0m\u001b[1;34mAgent: Marvin\u001b[0m\u001b[34m \u001b[0m\u001b[34m─────────────────────────────────────────────────────────────────────────────────\u001b[0m\u001b[34m─╮\u001b[0m\n\u001b[34m│\u001b[0m                                                                                                  \u001b[34m│\u001b[0m\n\u001b[34m│\u001b[0m  Great! It sounds like you're interested in Alfred Adler's life and his contributions. Here are  \u001b[34m│\u001b[0m\n\u001b[34m│\u001b[0m  a few potential research topics related to Alfred Adler:                                        \u001b[34m│\u001b[0m\n\u001b[34m│\u001b[0m                                                                                                  \u001b[34m│\u001b[0m\n\u001b[34m│\u001b[0m  \u001b[1;33m 1 \u001b[0m\u001b[1mThe Life and Legacy of Alfred Adler\u001b[0m: An in-depth look at Adler's biography, major            \u001b[34m│\u001b[0m\n\u001b[34m│\u001b[0m  \u001b[1;33m   \u001b[0mcontributions to psychology, and his lasting impact on the field.                            \u001b[34m│\u001b[0m\n\u001b[34m│\u001b[0m  \u001b[1;33m 2 \u001b[0m\u001b[1mAdlerian Psychology and Its Influence on Modern Therapy\u001b[0m: How Adler's theories have shaped    \u001b[34m│\u001b[0m\n\u001b[34m│\u001b[0m  \u001b[1;33m   \u001b[0mcontemporary therapeutic practices.                                                          \u001b[34m│\u001b[0m\n\u001b[34m│\u001b[0m  \u001b[1;33m 3 \u001b[0m\u001b[1mComparing Alfred Adler's Theories with Freud and Jung\u001b[0m: An analysis of how Adler's ideas      \u001b[34m│\u001b[0m\n\u001b[34m│\u001b[0m  \u001b[1;33m   \u001b[0mcontrast with those of his contemporaries.                                                   \u001b[34m│\u001b[0m\n\u001b[34m│\u001b[0m  \u001b[1;33m 4 \u001b[0m\u001b[1mThe Application of Adlerian Principles in Education\u001b[0m: Exploring how Adler's theories on       \u001b[34m│\u001b[0m\n\u001b[34m│\u001b[0m  \u001b[1;33m   \u001b[0mindividual psychology can be applied to educational settings.                                \u001b[34m│\u001b[0m\n\u001b[34m│\u001b[0m  \u001b[1;33m 5 \u001b[0m\u001b[1mAdler's Concept of Inferiority Complex and Its Relevance Today\u001b[0m: Investigating the            \u001b[34m│\u001b[0m\n\u001b[34m│\u001b[0m  \u001b[1;33m   \u001b[0mmodern-day implications of Adler's theory on inferiority complex.                            \u001b[34m│\u001b[0m\n\u001b[34m│\u001b[0m                                                                                                  \u001b[34m│\u001b[0m\n\u001b[34m│\u001b[0m  Do any of these topics interest you, or is there a specific angle or aspect of Adler's life     \u001b[34m│\u001b[0m\n\u001b[34m│\u001b[0m  and work you would like to focus on?                                                            \u001b[34m│\u001b[0m\n\u001b[34m│\u001b[0m                                                                                                  \u001b[34m│\u001b[0m\n\u001b[34m╰─\u001b[0m\u001b[34m───────────────────────────────────────────────────────────────────────────────────\u001b[0m\u001b[34m \u001b[0m\u001b[3;34m 4:58:33 AM\u001b[0m\u001b[34m \u001b[0m\u001b[34m─╯\u001b[0m\n",
+                  "text/html": "
╭─ Agent: Marvin ──────────────────────────────────────────────────────────────────────────────────╮\n                                                                                                  \n  Great! It sounds like you're interested in Alfred Adler's life and his contributions. Here are  \n  a few potential research topics related to Alfred Adler:                                        \n                                                                                                  \n   1 The Life and Legacy of Alfred Adler: An in-depth look at Adler's biography, major            \n     contributions to psychology, and his lasting impact on the field.                            \n   2 Adlerian Psychology and Its Influence on Modern Therapy: How Adler's theories have shaped    \n     contemporary therapeutic practices.                                                          \n   3 Comparing Alfred Adler's Theories with Freud and Jung: An analysis of how Adler's ideas      \n     contrast with those of his contemporaries.                                                   \n   4 The Application of Adlerian Principles in Education: Exploring how Adler's theories on       \n     individual psychology can be applied to educational settings.                                \n   5 Adler's Concept of Inferiority Complex and Its Relevance Today: Investigating the            \n     modern-day implications of Adler's theory on inferiority complex.                            \n                                                                                                  \n  Do any of these topics interest you, or is there a specific angle or aspect of Adler's life     \n  and work you would like to focus on?                                                            \n                                                                                                  \n╰────────────────────────────────────────────────────────────────────────────────────  4:58:33 AM ─╯\n
\n" + }, + "metadata": {} + } + ] + } + }, + "2a0cdb110ae44a24bd96ae575312ed71": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "7cd40a0ea98f443fbd0d18a096056148": { + "model_module": "@jupyter-widgets/output", + "model_name": "OutputModel", + "model_module_version": "1.0.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/output", + "_model_module_version": "1.0.0", + "_model_name": "OutputModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/output", + "_view_module_version": "1.0.0", + "_view_name": "OutputView", + "layout": "IPY_MODEL_9e0047e8d54d4f50b10e74deb10e5038", + "msg_id": "", + "outputs": [ + { + "output_type": "display_data", + "data": { + "text/plain": "\u001b[34m╭─\u001b[0m\u001b[34m \u001b[0m\u001b[1;34mAgent: Marvin\u001b[0m\u001b[34m \u001b[0m\u001b[34m─────────────────────────────────────────────────────────────────────────────────\u001b[0m\u001b[34m─╮\u001b[0m\n\u001b[34m│\u001b[0m \u001b[34m│\u001b[0m\n\u001b[34m│\u001b[0m ⠴ Tool call: \"talk_to_user\" \u001b[34m│\u001b[0m\n\u001b[34m│\u001b[0m \u001b[34m│\u001b[0m\n\u001b[34m╰─\u001b[0m\u001b[34m───────────────────────────────────────────────────────────────────────────────────\u001b[0m\u001b[34m \u001b[0m\u001b[3;34m 4:58:37 AM\u001b[0m\u001b[34m \u001b[0m\u001b[34m─╯\u001b[0m\n", + "text/html": "
╭─ Agent: Marvin ──────────────────────────────────────────────────────────────────────────────────╮\n                                                                                                  \n  ⠴ Tool call: \"talk_to_user\"                                                                     \n                                                                                                  \n╰────────────────────────────────────────────────────────────────────────────────────  4:58:37 AM ─╯\n
\n" + }, + "metadata": {} + } + ] + } + }, + "9e0047e8d54d4f50b10e74deb10e5038": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "99d15b4c89b44a7288b600a55eb1e502": { + "model_module": "@jupyter-widgets/output", + "model_name": "OutputModel", + "model_module_version": "1.0.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/output", + "_model_module_version": "1.0.0", + "_model_name": "OutputModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/output", + "_view_module_version": "1.0.0", + "_view_name": "OutputView", + "layout": "IPY_MODEL_2d3613d4aafb4f76a72587d65a863a44", + "msg_id": "", + "outputs": [ + { + "output_type": "display_data", + "data": { + "text/plain": "", + "text/html": "
\n"
+                },
+                "metadata": {}
+              }
+            ]
+          }
+        },
+        "2d3613d4aafb4f76a72587d65a863a44": {
+          "model_module": "@jupyter-widgets/base",
+          "model_name": "LayoutModel",
+          "model_module_version": "1.2.0",
+          "state": {
+            "_model_module": "@jupyter-widgets/base",
+            "_model_module_version": "1.2.0",
+            "_model_name": "LayoutModel",
+            "_view_count": null,
+            "_view_module": "@jupyter-widgets/base",
+            "_view_module_version": "1.2.0",
+            "_view_name": "LayoutView",
+            "align_content": null,
+            "align_items": null,
+            "align_self": null,
+            "border": null,
+            "bottom": null,
+            "display": null,
+            "flex": null,
+            "flex_flow": null,
+            "grid_area": null,
+            "grid_auto_columns": null,
+            "grid_auto_flow": null,
+            "grid_auto_rows": null,
+            "grid_column": null,
+            "grid_gap": null,
+            "grid_row": null,
+            "grid_template_areas": null,
+            "grid_template_columns": null,
+            "grid_template_rows": null,
+            "height": null,
+            "justify_content": null,
+            "justify_items": null,
+            "left": null,
+            "margin": null,
+            "max_height": null,
+            "max_width": null,
+            "min_height": null,
+            "min_width": null,
+            "object_fit": null,
+            "object_position": null,
+            "order": null,
+            "overflow": null,
+            "overflow_x": null,
+            "overflow_y": null,
+            "padding": null,
+            "right": null,
+            "top": null,
+            "visibility": null,
+            "width": null
+          }
+        },
+        "a2be162983b342028105c2cceafe4cba": {
+          "model_module": "@jupyter-widgets/output",
+          "model_name": "OutputModel",
+          "model_module_version": "1.0.0",
+          "state": {
+            "_dom_classes": [],
+            "_model_module": "@jupyter-widgets/output",
+            "_model_module_version": "1.0.0",
+            "_model_name": "OutputModel",
+            "_view_count": null,
+            "_view_module": "@jupyter-widgets/output",
+            "_view_module_version": "1.0.0",
+            "_view_name": "OutputView",
+            "layout": "IPY_MODEL_15a3c7bd6dd04cfd80508f37a0bf67d9",
+            "msg_id": "",
+            "outputs": [
+              {
+                "output_type": "display_data",
+                "data": {
+                  "text/plain": "\u001b[34m╭─\u001b[0m\u001b[34m \u001b[0m\u001b[1;34mAgent: Marvin\u001b[0m\u001b[34m \u001b[0m\u001b[34m─────────────────────────────────────────────────────────────────────────────────\u001b[0m\u001b[34m─╮\u001b[0m\n\u001b[34m│\u001b[0m                                                                                                  \u001b[34m│\u001b[0m\n\u001b[34m│\u001b[0m  ✅ Tool call: \"mark_task_77728_successful\"                                                      \u001b[34m│\u001b[0m\n\u001b[34m│\u001b[0m                                                                                                  \u001b[34m│\u001b[0m\n\u001b[34m╰─\u001b[0m\u001b[34m───────────────────────────────────────────────────────────────────────────────────\u001b[0m\u001b[34m \u001b[0m\u001b[3;34m 5:00:01 AM\u001b[0m\u001b[34m \u001b[0m\u001b[34m─╯\u001b[0m\n",
+                  "text/html": "
╭─ Agent: Marvin ──────────────────────────────────────────────────────────────────────────────────╮\n                                                                                                  \n  ✅ Tool call: \"mark_task_77728_successful\"                                                      \n                                                                                                  \n╰────────────────────────────────────────────────────────────────────────────────────  5:00:01 AM ─╯\n
\n" + }, + "metadata": {} + } + ] + } + }, + "15a3c7bd6dd04cfd80508f37a0bf67d9": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "c09a1972136c42f79c1df2bfa2933045": { + "model_module": "@jupyter-widgets/output", + "model_name": "OutputModel", + "model_module_version": "1.0.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/output", + "_model_module_version": "1.0.0", + "_model_name": "OutputModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/output", + "_view_module_version": "1.0.0", + "_view_name": "OutputView", + "layout": "IPY_MODEL_3d37bab68c73487485e37ce0fc47fdd4", + "msg_id": "", + "outputs": [ + { + "output_type": "display_data", + "data": { + "text/plain": "\u001b[34m╭─\u001b[0m\u001b[34m \u001b[0m\u001b[1;34mAgent: Marvin\u001b[0m\u001b[34m \u001b[0m\u001b[34m─────────────────────────────────────────────────────────────────────────────────\u001b[0m\u001b[34m─╮\u001b[0m\n\u001b[34m│\u001b[0m \u001b[34m│\u001b[0m\n\u001b[34m│\u001b[0m Based on the chosen topic \"The Life and Legacy of Alfred Adler,\" I will now create an outline \u001b[34m│\u001b[0m\n\u001b[34m│\u001b[0m for this research. \u001b[34m│\u001b[0m\n\u001b[34m│\u001b[0m \u001b[34m│\u001b[0m\n\u001b[34m│\u001b[0m \u001b[1mOutline: The Life and Legacy of Alfred Adler\u001b[0m \u001b[34m│\u001b[0m\n\u001b[34m│\u001b[0m \u001b[34m│\u001b[0m\n\u001b[34m│\u001b[0m \u001b[1;33m 1 \u001b[0m\u001b[1mIntroduction\u001b[0m \u001b[34m│\u001b[0m\n\u001b[34m│\u001b[0m \u001b[1;33m \u001b[0m\u001b[1;33m • \u001b[0mBrief introduction to Alfred Adler \u001b[34m│\u001b[0m\n\u001b[34m│\u001b[0m \u001b[1;33m \u001b[0m\u001b[1;33m • \u001b[0mImportance of studying his life and legacy \u001b[34m│\u001b[0m\n\u001b[34m│\u001b[0m \u001b[1;33m \u001b[0m\u001b[1;33m • \u001b[0mOverview of key points to be covered \u001b[34m│\u001b[0m\n\u001b[34m│\u001b[0m \u001b[1;33m 2 \u001b[0m\u001b[1mEarly Life and Education\u001b[0m \u001b[34m│\u001b[0m\n\u001b[34m│\u001b[0m \u001b[1;33m \u001b[0m\u001b[1;33m • \u001b[0mBirth and family background \u001b[34m│\u001b[0m\n\u001b[34m│\u001b[0m \u001b[1;33m \u001b[0m\u001b[1;33m • \u001b[0mEarly influences and education \u001b[34m│\u001b[0m\n\u001b[34m│\u001b[0m \u001b[1;33m \u001b[0m\u001b[1;33m • \u001b[0mInitial interest in psychology \u001b[34m│\u001b[0m\n\u001b[34m│\u001b[0m \u001b[1;33m 3 \u001b[0m\u001b[1mProfessional Career\u001b[0m \u001b[34m│\u001b[0m\n\u001b[34m│\u001b[0m \u001b[1;33m \u001b[0m\u001b[1;33m • \u001b[0mFounding of Individual Psychology \u001b[34m│\u001b[0m\n\u001b[34m│\u001b[0m \u001b[1;33m \u001b[0m\u001b[1;33m • \u001b[0mKey theories and concepts (e.g., inferiority complex, striving for superiority) \u001b[34m│\u001b[0m\n\u001b[34m│\u001b[0m \u001b[1;33m \u001b[0m\u001b[1;33m • \u001b[0mMajor works and publications \u001b[34m│\u001b[0m\n\u001b[34m│\u001b[0m \u001b[1;33m 4 \u001b[0m\u001b[1mContributions to Psychology\u001b[0m \u001b[34m│\u001b[0m\n\u001b[34m│\u001b[0m \u001b[1;33m \u001b[0m\u001b[1;33m • \u001b[0mDevelopment of Adlerian therapy \u001b[34m│\u001b[0m\n\u001b[34m│\u001b[0m \u001b[1;33m \u001b[0m\u001b[1;33m • \u001b[0mImpact on psychotherapy and counseling \u001b[34m│\u001b[0m\n\u001b[34m│\u001b[0m \u001b[1;33m \u001b[0m\u001b[1;33m • \u001b[0mInfluence on contemporary psychological practices \u001b[34m│\u001b[0m\n\u001b[34m│\u001b[0m \u001b[1;33m 5 \u001b[0m\u001b[1mComparison with Contemporaries\u001b[0m \u001b[34m│\u001b[0m\n\u001b[34m│\u001b[0m \u001b[1;33m \u001b[0m\u001b[1;33m • \u001b[0mRelationship with Sigmund Freud \u001b[34m│\u001b[0m\n\u001b[34m│\u001b[0m \u001b[1;33m \u001b[0m\u001b[1;33m • \u001b[0mDifferences and similarities with Freud’s and Jung’s theories \u001b[34m│\u001b[0m\n\u001b[34m│\u001b[0m \u001b[1;33m \u001b[0m\u001b[1;33m • \u001b[0mCollaboration and conflicts \u001b[34m│\u001b[0m\n\u001b[34m│\u001b[0m \u001b[1;33m 6 \u001b[0m\u001b[1mLegacy and Influence\u001b[0m \u001b[34m│\u001b[0m\n\u001b[34m│\u001b[0m \u001b[1;33m \u001b[0m\u001b[1;33m • \u001b[0mLasting impact on psychology and therapy \u001b[34m│\u001b[0m\n\u001b[34m│\u001b[0m \u001b[1;33m \u001b[0m\u001b[1;33m • \u001b[0mApplication of Adlerian principles in modern contexts (e.g., education, family therapy) \u001b[34m│\u001b[0m\n\u001b[34m│\u001b[0m \u001b[1;33m \u001b[0m\u001b[1;33m • \u001b[0mRecognition and honors \u001b[34m│\u001b[0m\n\u001b[34m│\u001b[0m \u001b[1;33m 7 \u001b[0m\u001b[1mConclusion\u001b[0m \u001b[34m│\u001b[0m\n\u001b[34m│\u001b[0m \u001b[1;33m \u001b[0m\u001b[1;33m • \u001b[0mSummary of Adler’s contributions and legacy \u001b[34m│\u001b[0m\n\u001b[34m│\u001b[0m \u001b[1;33m \u001b[0m\u001b[1;33m • \u001b[0mReflection on the relevance of his work today \u001b[34m│\u001b[0m\n\u001b[34m│\u001b[0m \u001b[1;33m \u001b[0m\u001b[1;33m • \u001b[0mFinal thoughts \u001b[34m│\u001b[0m\n\u001b[34m│\u001b[0m \u001b[34m│\u001b[0m\n\u001b[34m│\u001b[0m I will now mark this task as successful with the above outline as the result. \u001b[34m│\u001b[0m\n\u001b[34m│\u001b[0m \u001b[34m│\u001b[0m\n\u001b[34m│\u001b[0m \u001b[34m│\u001b[0m\n\u001b[34m│\u001b[0m ✅ Tool call: \"mark_task_c1bc2_successful\" \u001b[34m│\u001b[0m\n\u001b[34m│\u001b[0m \u001b[34m│\u001b[0m\n\u001b[34m╰─\u001b[0m\u001b[34m───────────────────────────────────────────────────────────────────────────────────\u001b[0m\u001b[34m \u001b[0m\u001b[3;34m 5:00:21 AM\u001b[0m\u001b[34m \u001b[0m\u001b[34m─╯\u001b[0m\n", + "text/html": "
╭─ Agent: Marvin ──────────────────────────────────────────────────────────────────────────────────╮\n                                                                                                  \n  Based on the chosen topic \"The Life and Legacy of Alfred Adler,\" I will now create an outline   \n  for this research.                                                                              \n                                                                                                  \n                           Outline: The Life and Legacy of Alfred Adler                           \n                                                                                                  \n   1 Introduction                                                                                 \n  Brief introduction to Alfred Adler                                                        \n  Importance of studying his life and legacy                                                \n  Overview of key points to be covered                                                      \n   2 Early Life and Education                                                                     \n  Birth and family background                                                               \n  Early influences and education                                                            \n  Initial interest in psychology                                                            \n   3 Professional Career                                                                          \n  Founding of Individual Psychology                                                         \n  Key theories and concepts (e.g., inferiority complex, striving for superiority)           \n  Major works and publications                                                              \n   4 Contributions to Psychology                                                                  \n  Development of Adlerian therapy                                                           \n  Impact on psychotherapy and counseling                                                    \n  Influence on contemporary psychological practices                                         \n   5 Comparison with Contemporaries                                                               \n  Relationship with Sigmund Freud                                                           \n  Differences and similarities with Freud’s and Jung’s theories                             \n  Collaboration and conflicts                                                               \n   6 Legacy and Influence                                                                         \n  Lasting impact on psychology and therapy                                                  \n  Application of Adlerian principles in modern contexts (e.g., education, family therapy)   \n  Recognition and honors                                                                    \n   7 Conclusion                                                                                   \n  Summary of Adler’s contributions and legacy                                               \n  Reflection on the relevance of his work today                                             \n  Final thoughts                                                                            \n                                                                                                  \n  I will now mark this task as successful with the above outline as the result.                   \n                                                                                                  \n                                                                                                  \n  ✅ Tool call: \"mark_task_c1bc2_successful\"                                                      \n                                                                                                  \n╰────────────────────────────────────────────────────────────────────────────────────  5:00:21 AM ─╯\n
\n" + }, + "metadata": {} + } + ] + } + }, + "3d37bab68c73487485e37ce0fc47fdd4": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "7c6a7a3e3dad4843b80c486fc80849be": { + "model_module": "@jupyter-widgets/output", + "model_name": "OutputModel", + "model_module_version": "1.0.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/output", + "_model_module_version": "1.0.0", + "_model_name": "OutputModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/output", + "_view_module_version": "1.0.0", + "_view_name": "OutputView", + "layout": "IPY_MODEL_e9ef92673e774e2eb4532f9a89622443", + "msg_id": "", + "outputs": [ + { + "output_type": "display_data", + "data": { + "text/plain": "\u001b[34m╭─\u001b[0m\u001b[34m \u001b[0m\u001b[1;34mAgent: Deep-Thought\u001b[0m\u001b[34m \u001b[0m\u001b[34m───────────────────────────────────────────────────────────────────────────\u001b[0m\u001b[34m─╮\u001b[0m\n\u001b[34m│\u001b[0m \u001b[34m│\u001b[0m\n\u001b[34m│\u001b[0m I have successfully created the outline for the research on \"The Life and Legacy of Alfred \u001b[34m│\u001b[0m\n\u001b[34m│\u001b[0m Adler.\" The outline has been submitted. If there are any further tasks or modifications \u001b[34m│\u001b[0m\n\u001b[34m│\u001b[0m needed, feel free to assign them. \u001b[34m│\u001b[0m\n\u001b[34m│\u001b[0m \u001b[34m│\u001b[0m\n\u001b[34m╰─\u001b[0m\u001b[34m───────────────────────────────────────────────────────────────────────────────────\u001b[0m\u001b[34m \u001b[0m\u001b[3;34m 5:00:24 AM\u001b[0m\u001b[34m \u001b[0m\u001b[34m─╯\u001b[0m\n", + "text/html": "
╭─ Agent: Deep-Thought ────────────────────────────────────────────────────────────────────────────╮\n                                                                                                  \n  I have successfully created the outline for the research on \"The Life and Legacy of Alfred      \n  Adler.\" The outline has been submitted. If there are any further tasks or modifications         \n  needed, feel free to assign them.                                                               \n                                                                                                  \n╰────────────────────────────────────────────────────────────────────────────────────  5:00:24 AM ─╯\n
\n" + }, + "metadata": {} + } + ] + } + }, + "e9ef92673e774e2eb4532f9a89622443": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "5d09aae0fdb14ef6ab937911f34b66d8": { + "model_module": "@jupyter-widgets/output", + "model_name": "OutputModel", + "model_module_version": "1.0.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/output", + "_model_module_version": "1.0.0", + "_model_name": "OutputModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/output", + "_view_module_version": "1.0.0", + "_view_name": "OutputView", + "layout": "IPY_MODEL_206ec8fb42ee41028d980a04aeccac07", + "msg_id": "", + "outputs": [ + { + "output_type": "display_data", + "data": { + "text/plain": "\u001b[34m╭─\u001b[0m\u001b[34m \u001b[0m\u001b[1;34mAgent: Deep-Thought\u001b[0m\u001b[34m \u001b[0m\u001b[34m───────────────────────────────────────────────────────────────────────────\u001b[0m\u001b[34m─╮\u001b[0m\n\u001b[34m│\u001b[0m \u001b[34m│\u001b[0m\n\u001b[34m│\u001b[0m ✅ Tool call: \"end_turn\" \u001b[34m│\u001b[0m\n\u001b[34m│\u001b[0m \u001b[34m│\u001b[0m\n\u001b[34m╰─\u001b[0m\u001b[34m───────────────────────────────────────────────────────────────────────────────────\u001b[0m\u001b[34m \u001b[0m\u001b[3;34m 5:00:26 AM\u001b[0m\u001b[34m \u001b[0m\u001b[34m─╯\u001b[0m\n", + "text/html": "
╭─ Agent: Deep-Thought ────────────────────────────────────────────────────────────────────────────╮\n                                                                                                  \n  ✅ Tool call: \"end_turn\"                                                                        \n                                                                                                  \n╰────────────────────────────────────────────────────────────────────────────────────  5:00:26 AM ─╯\n
\n" + }, + "metadata": {} + } + ] + } + }, + "206ec8fb42ee41028d980a04aeccac07": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "09e423842625404183bfac7b56b587b6": { + "model_module": "@jupyter-widgets/output", + "model_name": "OutputModel", + "model_module_version": "1.0.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/output", + "_model_module_version": "1.0.0", + "_model_name": "OutputModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/output", + "_view_module_version": "1.0.0", + "_view_name": "OutputView", + "layout": "IPY_MODEL_2dbc7866ea4d420791b8fe4403fec35b", + "msg_id": "", + "outputs": [ + { + "output_type": "display_data", + "data": { + "text/plain": "\u001b[34m╭─\u001b[0m\u001b[34m \u001b[0m\u001b[1;34mAgent: Deep-Thought\u001b[0m\u001b[34m \u001b[0m\u001b[34m───────────────────────────────────────────────────────────────────────────\u001b[0m\u001b[34m─╮\u001b[0m\n\u001b[34m│\u001b[0m \u001b[34m│\u001b[0m\n\u001b[34m│\u001b[0m I have completed the task of creating the outline for the research on \"The Life and Legacy of \u001b[34m│\u001b[0m\n\u001b[34m│\u001b[0m Alfred Adler.\" If there are any additional tasks or revisions required, please let me know. \u001b[34m│\u001b[0m\n\u001b[34m│\u001b[0m \u001b[34m│\u001b[0m\n\u001b[34m╰─\u001b[0m\u001b[34m───────────────────────────────────────────────────────────────────────────────────\u001b[0m\u001b[34m \u001b[0m\u001b[3;34m 5:00:28 AM\u001b[0m\u001b[34m \u001b[0m\u001b[34m─╯\u001b[0m\n", + "text/html": "
╭─ Agent: Deep-Thought ────────────────────────────────────────────────────────────────────────────╮\n                                                                                                  \n  I have completed the task of creating the outline for the research on \"The Life and Legacy of   \n  Alfred Adler.\" If there are any additional tasks or revisions required, please let me know.     \n                                                                                                  \n╰────────────────────────────────────────────────────────────────────────────────────  5:00:28 AM ─╯\n
\n" + }, + "metadata": {} + } + ] + } + }, + "2dbc7866ea4d420791b8fe4403fec35b": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "2bed669da5d54b5c845a2ebc601f96f7": { + "model_module": "@jupyter-widgets/output", + "model_name": "OutputModel", + "model_module_version": "1.0.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/output", + "_model_module_version": "1.0.0", + "_model_name": "OutputModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/output", + "_view_module_version": "1.0.0", + "_view_name": "OutputView", + "layout": "IPY_MODEL_731472bf5eee4b2eb3a092e8e87d1f2d", + "msg_id": "", + "outputs": [ + { + "output_type": "display_data", + "data": { + "text/plain": "\u001b[34m╭─\u001b[0m\u001b[34m \u001b[0m\u001b[1;34mAgent: Deep-Thought\u001b[0m\u001b[34m \u001b[0m\u001b[34m───────────────────────────────────────────────────────────────────────────\u001b[0m\u001b[34m─╮\u001b[0m\n\u001b[34m│\u001b[0m \u001b[34m│\u001b[0m\n\u001b[34m│\u001b[0m I have completed the task of creating the outline for the research on \"The Life and Legacy of \u001b[34m│\u001b[0m\n\u001b[34m│\u001b[0m Alfred Adler.\" If there are any further tasks or modifications needed, feel free to assign \u001b[34m│\u001b[0m\n\u001b[34m│\u001b[0m them. \u001b[34m│\u001b[0m\n\u001b[34m│\u001b[0m \u001b[34m│\u001b[0m\n\u001b[34m╰─\u001b[0m\u001b[34m───────────────────────────────────────────────────────────────────────────────────\u001b[0m\u001b[34m \u001b[0m\u001b[3;34m 5:00:30 AM\u001b[0m\u001b[34m \u001b[0m\u001b[34m─╯\u001b[0m\n", + "text/html": "
╭─ Agent: Deep-Thought ────────────────────────────────────────────────────────────────────────────╮\n                                                                                                  \n  I have completed the task of creating the outline for the research on \"The Life and Legacy of   \n  Alfred Adler.\" If there are any further tasks or modifications needed, feel free to assign      \n  them.                                                                                           \n                                                                                                  \n╰────────────────────────────────────────────────────────────────────────────────────  5:00:30 AM ─╯\n
\n" + }, + "metadata": {} + } + ] + } + }, + "731472bf5eee4b2eb3a092e8e87d1f2d": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "a7a748b3465b4174ab2b80c64046f8a0": { + "model_module": "@jupyter-widgets/output", + "model_name": "OutputModel", + "model_module_version": "1.0.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/output", + "_model_module_version": "1.0.0", + "_model_name": "OutputModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/output", + "_view_module_version": "1.0.0", + "_view_name": "OutputView", + "layout": "IPY_MODEL_11b563ccfe6c48038835e34d3f070987", + "msg_id": "", + "outputs": [ + { + "output_type": "display_data", + "data": { + "text/plain": "\u001b[34m╭─\u001b[0m\u001b[34m \u001b[0m\u001b[1;34mAgent: Deep-Thought\u001b[0m\u001b[34m \u001b[0m\u001b[34m───────────────────────────────────────────────────────────────────────────\u001b[0m\u001b[34m─╮\u001b[0m\n\u001b[34m│\u001b[0m \u001b[34m│\u001b[0m\n\u001b[34m│\u001b[0m I have successfully created the outline for the research on \"The Life and Legacy of Alfred \u001b[34m│\u001b[0m\n\u001b[34m│\u001b[0m Adler.\" The outline has been submitted. If there are any further tasks or modifications \u001b[34m│\u001b[0m\n\u001b[34m│\u001b[0m needed, feel free to assign them. \u001b[34m│\u001b[0m\n\u001b[34m│\u001b[0m \u001b[34m│\u001b[0m\n\u001b[34m╰─\u001b[0m\u001b[34m───────────────────────────────────────────────────────────────────────────────────\u001b[0m\u001b[34m \u001b[0m\u001b[3;34m 5:00:32 AM\u001b[0m\u001b[34m \u001b[0m\u001b[34m─╯\u001b[0m\n", + "text/html": "
╭─ Agent: Deep-Thought ────────────────────────────────────────────────────────────────────────────╮\n                                                                                                  \n  I have successfully created the outline for the research on \"The Life and Legacy of Alfred      \n  Adler.\" The outline has been submitted. If there are any further tasks or modifications         \n  needed, feel free to assign them.                                                               \n                                                                                                  \n╰────────────────────────────────────────────────────────────────────────────────────  5:00:32 AM ─╯\n
\n" + }, + "metadata": {} + } + ] + } + }, + "11b563ccfe6c48038835e34d3f070987": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "25d7456fd34547399fa02b85dc44a96c": { + "model_module": "@jupyter-widgets/output", + "model_name": "OutputModel", + "model_module_version": "1.0.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/output", + "_model_module_version": "1.0.0", + "_model_name": "OutputModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/output", + "_view_module_version": "1.0.0", + "_view_name": "OutputView", + "layout": "IPY_MODEL_1c87e6b9340f494789bb3fc70841edcb", + "msg_id": "", + "outputs": [ + { + "output_type": "display_data", + "data": { + "text/plain": "\u001b[34m╭─\u001b[0m\u001b[34m \u001b[0m\u001b[1;34mAgent: Deep-Thought\u001b[0m\u001b[34m \u001b[0m\u001b[34m───────────────────────────────────────────────────────────────────────────\u001b[0m\u001b[34m─╮\u001b[0m\n\u001b[34m│\u001b[0m \u001b[34m│\u001b[0m\n\u001b[34m│\u001b[0m I have completed the task of creating the outline for the research on \"The Life and Legacy of \u001b[34m│\u001b[0m\n\u001b[34m│\u001b[0m Alfred Adler.\" If there are any additional tasks or revisions required, please let me know. \u001b[34m│\u001b[0m\n\u001b[34m│\u001b[0m \u001b[34m│\u001b[0m\n\u001b[34m╰─\u001b[0m\u001b[34m───────────────────────────────────────────────────────────────────────────────────\u001b[0m\u001b[34m \u001b[0m\u001b[3;34m 5:00:35 AM\u001b[0m\u001b[34m \u001b[0m\u001b[34m─╯\u001b[0m\n", + "text/html": "
╭─ Agent: Deep-Thought ────────────────────────────────────────────────────────────────────────────╮\n                                                                                                  \n  I have completed the task of creating the outline for the research on \"The Life and Legacy of   \n  Alfred Adler.\" If there are any additional tasks or revisions required, please let me know.     \n                                                                                                  \n╰────────────────────────────────────────────────────────────────────────────────────  5:00:35 AM ─╯\n
\n" + }, + "metadata": {} + } + ] + } + }, + "1c87e6b9340f494789bb3fc70841edcb": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "0e00810b872342ee9d57fa40be33b56e": { + "model_module": "@jupyter-widgets/output", + "model_name": "OutputModel", + "model_module_version": "1.0.0", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/output", + "_model_module_version": "1.0.0", + "_model_name": "OutputModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/output", + "_view_module_version": "1.0.0", + "_view_name": "OutputView", + "layout": "IPY_MODEL_2c8efc835a91416e9b2059b7e0455f36", + "msg_id": "", + "outputs": [ + { + "output_type": "display_data", + "data": { + "text/plain": "\u001b[34m╭─\u001b[0m\u001b[34m \u001b[0m\u001b[1;34mAgent: Deep-Thought\u001b[0m\u001b[34m \u001b[0m\u001b[34m───────────────────────────────────────────────────────────────────────────\u001b[0m\u001b[34m─╮\u001b[0m\n\u001b[34m│\u001b[0m \u001b[34m│\u001b[0m\n\u001b[34m│\u001b[0m ✅ Tool call: \"mark_task_62a1f_successful\" \u001b[34m│\u001b[0m\n\u001b[34m│\u001b[0m \u001b[34m│\u001b[0m\n\u001b[34m╰─\u001b[0m\u001b[34m───────────────────────────────────────────────────────────────────────────────────\u001b[0m\u001b[34m \u001b[0m\u001b[3;34m 5:00:36 AM\u001b[0m\u001b[34m \u001b[0m\u001b[34m─╯\u001b[0m\n", + "text/html": "
╭─ Agent: Deep-Thought ────────────────────────────────────────────────────────────────────────────╮\n                                                                                                  \n  ✅ Tool call: \"mark_task_62a1f_successful\"                                                      \n                                                                                                  \n╰────────────────────────────────────────────────────────────────────────────────────  5:00:36 AM ─╯\n
\n" + }, + "metadata": {} + } + ] + } + }, + "2c8efc835a91416e9b2059b7e0455f36": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "model_module_version": "1.2.0", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + } + } + } + }, + "cells": [ + { + "cell_type": "markdown", + "source": [ + "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1ZdivP_IbfTWcrM6sBI_XG8N2do9Gc9qD?usp=sharing)" + ], + "metadata": { + "id": "fYLdQ6R1FViO" + } + }, + { + "cell_type": "markdown", + "source": [ + "## Monitoring ControlFlow Agents with Portkey\n", + "\n", + "[ControlFlow](https://github.com/PrefectHQ/ControlFlow) is a Python framework for building agentic AI workflows.\n", + "\n", + "ControlFlow provides a structured, developer-focused framework for defining workflows and delegating work to LLMs, without sacrificing control or transparency\n", + "\n", + "\n", + "\n", + "[Portkey](https://app.portkey.ai/) is the Control Panel for AI apps. With it's popular AI Gateway and Observability Suite, hundreds of teams ship reliable, cost-efficient, and fast apps.\n", + "\n", + "Portkey brings production readiness to Langchain. With Portkey, you can\n", + "\n", + " - Connect to 150+ models through a unified API,\n", + " - View 42+ metrics & logs for all requests,\n", + " - Enable semantic cache to reduce latency & costs,\n", + " - Implement automatic retries & fallbacks for failed requests,\n", + " - Add custom tags to requests for better tracking and analysis and more." + ], + "metadata": { + "id": "g5C1KoX2FkpY" + } + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "-ZLwvj8y9YEj", + "outputId": "61900bab-6c01-484e-87b0-13d8a359e42d" + }, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m92.7/92.7 kB\u001b[0m \u001b[31m1.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m75.9/75.9 kB\u001b[0m \u001b[31m3.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m75.6/75.6 kB\u001b[0m \u001b[31m5.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m12.7/12.7 MB\u001b[0m \u001b[31m20.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m327.5/327.5 kB\u001b[0m \u001b[31m19.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m6.0/6.0 MB\u001b[0m \u001b[31m50.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m332.8/332.8 kB\u001b[0m \u001b[31m23.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m40.6/40.6 kB\u001b[0m \u001b[31m3.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m562.2/562.2 kB\u001b[0m \u001b[31m33.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.1/1.1 MB\u001b[0m \u001b[31m43.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m863.5/863.5 kB\u001b[0m \u001b[31m40.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m127.4/127.4 kB\u001b[0m \u001b[31m7.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m77.9/77.9 kB\u001b[0m \u001b[31m1.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m58.3/58.3 kB\u001b[0m \u001b[31m5.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m233.0/233.0 kB\u001b[0m \u001b[31m18.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.2/1.2 MB\u001b[0m \u001b[31m51.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m2.7/2.7 MB\u001b[0m \u001b[31m38.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m295.0/295.0 kB\u001b[0m \u001b[31m20.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m147.8/147.8 kB\u001b[0m \u001b[31m9.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m122.2/122.2 kB\u001b[0m \u001b[31m7.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m126.8/126.8 kB\u001b[0m \u001b[31m9.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m86.8/86.8 kB\u001b[0m \u001b[31m7.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m92.0/92.0 kB\u001b[0m \u001b[31m5.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m145.0/145.0 kB\u001b[0m \u001b[31m5.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m384.9/384.9 kB\u001b[0m \u001b[31m20.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m117.8/117.8 kB\u001b[0m \u001b[31m2.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m53.6/53.6 kB\u001b[0m \u001b[31m2.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m60.5/60.5 kB\u001b[0m \u001b[31m3.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m130.2/130.2 kB\u001b[0m \u001b[31m7.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m80.3/80.3 kB\u001b[0m \u001b[31m4.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m78.6/78.6 kB\u001b[0m \u001b[31m5.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m318.9/318.9 kB\u001b[0m \u001b[31m17.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m71.9/71.9 kB\u001b[0m \u001b[31m5.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m62.4/62.4 kB\u001b[0m \u001b[31m6.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m57.5/57.5 kB\u001b[0m \u001b[31m5.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m526.7/526.7 kB\u001b[0m \u001b[31m23.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m307.7/307.7 kB\u001b[0m \u001b[31m22.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m62.4/62.4 kB\u001b[0m \u001b[31m2.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m60.8/60.8 kB\u001b[0m \u001b[31m5.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m341.4/341.4 kB\u001b[0m \u001b[31m20.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m3.4/3.4 MB\u001b[0m \u001b[31m63.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.2/1.2 MB\u001b[0m \u001b[31m41.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25h\u001b[31mERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.\n", + "jupyter-server 1.24.0 requires anyio<4,>=3.1.0, but you have anyio 4.4.0 which is incompatible.\n", + "tensorflow 2.15.0 requires wrapt<1.15,>=1.11.0, but you have wrapt 1.16.0 which is incompatible.\u001b[0m\u001b[31m\n", + "\u001b[0m" + ] + } + ], + "source": [ + "!pip install -qU portkey-ai controlflow" + ] + }, + { + "cell_type": "code", + "source": [ + "import os\n", + "from google.colab import userdata\n", + "\n", + "os.environ[\"OPENAI_API_KEY\"] = userdata.get('OPENAI_API_KEY')" + ], + "metadata": { + "id": "BeYRmhbw9h9x" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "import controlflow as cf\n", + "from pydantic import BaseModel\n", + "from langchain_openai import ChatOpenAI\n", + "from portkey_ai import createHeaders, PORTKEY_GATEWAY_URL\n", + "\n", + "portkey_headers = createHeaders(api_key= userdata.get(\"PORTKEY_API_KEY\"), ## Grab from https://app.portkey.ai/\n", + " provider=\"openai\"\n", + " )\n", + "\n", + "gpt3 = ChatOpenAI(model = \"gpt-3.5-turbo-0125\",\n", + " api_key= userdata.get(\"OPENAI_API_KEY\"),\n", + " base_url=PORTKEY_GATEWAY_URL,\n", + " default_headers=portkey_headers)\n", + "\n", + "# create an agent to write a research report\n", + "author = cf.Agent(\n", + " name=\"Deep Thought\",\n", + " instructions=\"Use a formal tone and clear language\",\n", + " model = gpt3\n", + ")\n", + "\n", + "\n", + "class ResearchTopic(BaseModel):\n", + " title: str\n", + " keywords: list[str]" + ], + "metadata": { + "id": "rd9cDqfcCN4A" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "@cf.flow\n", + "def research_workflow() -> str:\n", + " # Task 1: the default agent will work with the user to choose a topic\n", + " topic = cf.Task(\n", + " \"Work with the user to come up with a research topic\",\n", + " result_type=ResearchTopic,\n", + " user_access=True,\n", + " )\n", + "\n", + " # Task 2: the default agent will create an outline based on the topic\n", + " outline = cf.Task(\"Create an outline\", context=dict(topic=topic))\n", + "\n", + " # Task 3: the author agent will write a first draft\n", + " draft = cf.Task(\n", + " \"Write a first draft\",\n", + " context=dict(outline=outline),\n", + " agents=[author]\n", + " )\n", + "\n", + " return draft\n", + "\n", + "\n", + "# run the workflow\n", + "result = research_workflow()\n", + "print(result)" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 1000, + "referenced_widgets": [ + "e5698f7d1b15481ab164e814675a4af0", + "930e4b3f459d4acfa075a16e047af215", + "4b50856d5eaa4944b55235f697d558df", + "02dbc72a194f4fb6893c440c60179efd", + "b609bca6df264d25b555130dc1a40ce2", + "2a0cdb110ae44a24bd96ae575312ed71", + "7cd40a0ea98f443fbd0d18a096056148", + "9e0047e8d54d4f50b10e74deb10e5038", + "99d15b4c89b44a7288b600a55eb1e502", + "2d3613d4aafb4f76a72587d65a863a44", + "a2be162983b342028105c2cceafe4cba", + "15a3c7bd6dd04cfd80508f37a0bf67d9", + "c09a1972136c42f79c1df2bfa2933045", + "3d37bab68c73487485e37ce0fc47fdd4", + "7c6a7a3e3dad4843b80c486fc80849be", + "e9ef92673e774e2eb4532f9a89622443", + "5d09aae0fdb14ef6ab937911f34b66d8", + "206ec8fb42ee41028d980a04aeccac07", + "09e423842625404183bfac7b56b587b6", + "2dbc7866ea4d420791b8fe4403fec35b", + "2bed669da5d54b5c845a2ebc601f96f7", + "731472bf5eee4b2eb3a092e8e87d1f2d", + "a7a748b3465b4174ab2b80c64046f8a0", + "11b563ccfe6c48038835e34d3f070987", + "25d7456fd34547399fa02b85dc44a96c", + "1c87e6b9340f494789bb3fc70841edcb", + "0e00810b872342ee9d57fa40be33b56e", + "2c8efc835a91416e9b2059b7e0455f36" + ] + }, + "id": "VPbTBj6K91If", + "outputId": "e9c56935-6711-49e5-acf4-74cb6c34784b" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "display_data", + "data": { + "text/plain": [ + "Output()" + ], + "application/vnd.jupyter.widget-view+json": { + "version_major": 2, + "version_minor": 0, + "model_id": "e5698f7d1b15481ab164e814675a4af0" + } + }, + "metadata": {} + }, + { + "output_type": "display_data", + "data": { + "text/plain": [], + "text/html": [ + "
\n"
+            ]
+          },
+          "metadata": {}
+        },
+        {
+          "output_type": "display_data",
+          "data": {
+            "text/plain": [
+              "\n",
+              "\u001b[1;34m🤖 Agent:\u001b[0m \u001b[34mHello! I'd be happy to help you come up with a research topic. Do you have any specific areas of interest\u001b[0m\n",
+              "\u001b[34mor fields you are passionate about? For example, technology, health, environment, social sciences, etc.?\u001b[0m\n",
+              "Type your response: "
+            ],
+            "text/html": [
+              "
\n",
+              "🤖 Agent: Hello! I'd be happy to help you come up with a research topic. Do you have any specific areas of interest\n",
+              "or fields you are passionate about? For example, technology, health, environment, social sciences, etc.?\n",
+              "Type your response: 
\n" + ] + }, + "metadata": {} + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Alfred Alder's life lies\n" + ] + }, + { + "output_type": "display_data", + "data": { + "text/plain": [ + "Output()" + ], + "application/vnd.jupyter.widget-view+json": { + "version_major": 2, + "version_minor": 0, + "model_id": "4b50856d5eaa4944b55235f697d558df" + } + }, + "metadata": {} + }, + { + "output_type": "stream", + "name": "stdout", + "text": [ + "\n" + ] + }, + { + "output_type": "display_data", + "data": { + "text/plain": [], + "text/html": [ + "
\n"
+            ]
+          },
+          "metadata": {}
+        },
+        {
+          "output_type": "display_data",
+          "data": {
+            "text/plain": [
+              "Output()"
+            ],
+            "application/vnd.jupyter.widget-view+json": {
+              "version_major": 2,
+              "version_minor": 0,
+              "model_id": "b609bca6df264d25b555130dc1a40ce2"
+            }
+          },
+          "metadata": {}
+        },
+        {
+          "output_type": "display_data",
+          "data": {
+            "text/plain": [],
+            "text/html": [
+              "
\n"
+            ]
+          },
+          "metadata": {}
+        },
+        {
+          "output_type": "display_data",
+          "data": {
+            "text/plain": [
+              "Output()"
+            ],
+            "application/vnd.jupyter.widget-view+json": {
+              "version_major": 2,
+              "version_minor": 0,
+              "model_id": "7cd40a0ea98f443fbd0d18a096056148"
+            }
+          },
+          "metadata": {}
+        },
+        {
+          "output_type": "display_data",
+          "data": {
+            "text/plain": [],
+            "text/html": [
+              "
\n"
+            ]
+          },
+          "metadata": {}
+        },
+        {
+          "output_type": "display_data",
+          "data": {
+            "text/plain": [
+              "\n",
+              "\u001b[1;34m🤖 Agent:\u001b[0m \u001b[34mHere are a few potential research topics related to Alfred Adler:\u001b[0m\n",
+              "\n",
+              "\u001b[34m1. **The Life and Legacy of Alfred Adler**: An in-depth look at Adler's biography, major contributions to \u001b[0m\n",
+              "\u001b[34mpsychology, and his lasting impact on the field.\u001b[0m\n",
+              "\u001b[34m2. **Adlerian Psychology and Its Influence on Modern Therapy**: How Adler's theories have shaped contemporary \u001b[0m\n",
+              "\u001b[34mtherapeutic practices.\u001b[0m\n",
+              "\u001b[34m3. **Comparing Alfred Adler's Theories with Freud and Jung**: An analysis of how Adler's ideas contrast with those \u001b[0m\n",
+              "\u001b[34mof his contemporaries.\u001b[0m\n",
+              "\u001b[34m4. **The Application of Adlerian Principles in Education**: Exploring how Adler's theories on individual psychology\u001b[0m\n",
+              "\u001b[34mcan be applied to educational settings.\u001b[0m\n",
+              "\u001b[34m5. **Adler's Concept of Inferiority Complex and Its Relevance Today**: Investigating the modern-day implications of\u001b[0m\n",
+              "\u001b[34mAdler's theory on inferiority complex.\u001b[0m\n",
+              "\n",
+              "\u001b[34mDo any of these topics interest you, or is there a specific angle or aspect of Adler's life and work you would like\u001b[0m\n",
+              "\u001b[34mto focus on?\u001b[0m\n",
+              "Type your response: "
+            ],
+            "text/html": [
+              "
\n",
+              "🤖 Agent: Here are a few potential research topics related to Alfred Adler:\n",
+              "\n",
+              "1. **The Life and Legacy of Alfred Adler**: An in-depth look at Adler's biography, major contributions to \n",
+              "psychology, and his lasting impact on the field.\n",
+              "2. **Adlerian Psychology and Its Influence on Modern Therapy**: How Adler's theories have shaped contemporary \n",
+              "therapeutic practices.\n",
+              "3. **Comparing Alfred Adler's Theories with Freud and Jung**: An analysis of how Adler's ideas contrast with those \n",
+              "of his contemporaries.\n",
+              "4. **The Application of Adlerian Principles in Education**: Exploring how Adler's theories on individual psychology\n",
+              "can be applied to educational settings.\n",
+              "5. **Adler's Concept of Inferiority Complex and Its Relevance Today**: Investigating the modern-day implications of\n",
+              "Adler's theory on inferiority complex.\n",
+              "\n",
+              "Do any of these topics interest you, or is there a specific angle or aspect of Adler's life and work you would like\n",
+              "to focus on?\n",
+              "Type your response: 
\n" + ] + }, + "metadata": {} + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "end\n" + ] + }, + { + "output_type": "display_data", + "data": { + "text/plain": [ + "Output()" + ], + "application/vnd.jupyter.widget-view+json": { + "version_major": 2, + "version_minor": 0, + "model_id": "99d15b4c89b44a7288b600a55eb1e502" + } + }, + "metadata": {} + }, + { + "output_type": "stream", + "name": "stdout", + "text": [ + "\n" + ] + }, + { + "output_type": "display_data", + "data": { + "text/plain": [], + "text/html": [ + "
\n"
+            ]
+          },
+          "metadata": {}
+        },
+        {
+          "output_type": "display_data",
+          "data": {
+            "text/plain": [
+              "Output()"
+            ],
+            "application/vnd.jupyter.widget-view+json": {
+              "version_major": 2,
+              "version_minor": 0,
+              "model_id": "a2be162983b342028105c2cceafe4cba"
+            }
+          },
+          "metadata": {}
+        },
+        {
+          "output_type": "display_data",
+          "data": {
+            "text/plain": [],
+            "text/html": [
+              "
\n"
+            ]
+          },
+          "metadata": {}
+        },
+        {
+          "output_type": "display_data",
+          "data": {
+            "text/plain": [
+              "Output()"
+            ],
+            "application/vnd.jupyter.widget-view+json": {
+              "version_major": 2,
+              "version_minor": 0,
+              "model_id": "c09a1972136c42f79c1df2bfa2933045"
+            }
+          },
+          "metadata": {}
+        },
+        {
+          "output_type": "display_data",
+          "data": {
+            "text/plain": [],
+            "text/html": [
+              "
\n"
+            ]
+          },
+          "metadata": {}
+        },
+        {
+          "output_type": "display_data",
+          "data": {
+            "text/plain": [
+              "Output()"
+            ],
+            "application/vnd.jupyter.widget-view+json": {
+              "version_major": 2,
+              "version_minor": 0,
+              "model_id": "7c6a7a3e3dad4843b80c486fc80849be"
+            }
+          },
+          "metadata": {}
+        },
+        {
+          "output_type": "display_data",
+          "data": {
+            "text/plain": [],
+            "text/html": [
+              "
\n"
+            ]
+          },
+          "metadata": {}
+        },
+        {
+          "output_type": "display_data",
+          "data": {
+            "text/plain": [
+              "Output()"
+            ],
+            "application/vnd.jupyter.widget-view+json": {
+              "version_major": 2,
+              "version_minor": 0,
+              "model_id": "5d09aae0fdb14ef6ab937911f34b66d8"
+            }
+          },
+          "metadata": {}
+        },
+        {
+          "output_type": "display_data",
+          "data": {
+            "text/plain": [],
+            "text/html": [
+              "
\n"
+            ]
+          },
+          "metadata": {}
+        },
+        {
+          "output_type": "display_data",
+          "data": {
+            "text/plain": [
+              "Output()"
+            ],
+            "application/vnd.jupyter.widget-view+json": {
+              "version_major": 2,
+              "version_minor": 0,
+              "model_id": "09e423842625404183bfac7b56b587b6"
+            }
+          },
+          "metadata": {}
+        },
+        {
+          "output_type": "display_data",
+          "data": {
+            "text/plain": [],
+            "text/html": [
+              "
\n"
+            ]
+          },
+          "metadata": {}
+        },
+        {
+          "output_type": "display_data",
+          "data": {
+            "text/plain": [
+              "Output()"
+            ],
+            "application/vnd.jupyter.widget-view+json": {
+              "version_major": 2,
+              "version_minor": 0,
+              "model_id": "2bed669da5d54b5c845a2ebc601f96f7"
+            }
+          },
+          "metadata": {}
+        },
+        {
+          "output_type": "display_data",
+          "data": {
+            "text/plain": [],
+            "text/html": [
+              "
\n"
+            ]
+          },
+          "metadata": {}
+        },
+        {
+          "output_type": "display_data",
+          "data": {
+            "text/plain": [
+              "Output()"
+            ],
+            "application/vnd.jupyter.widget-view+json": {
+              "version_major": 2,
+              "version_minor": 0,
+              "model_id": "a7a748b3465b4174ab2b80c64046f8a0"
+            }
+          },
+          "metadata": {}
+        },
+        {
+          "output_type": "display_data",
+          "data": {
+            "text/plain": [],
+            "text/html": [
+              "
\n"
+            ]
+          },
+          "metadata": {}
+        },
+        {
+          "output_type": "display_data",
+          "data": {
+            "text/plain": [
+              "Output()"
+            ],
+            "application/vnd.jupyter.widget-view+json": {
+              "version_major": 2,
+              "version_minor": 0,
+              "model_id": "25d7456fd34547399fa02b85dc44a96c"
+            }
+          },
+          "metadata": {}
+        },
+        {
+          "output_type": "display_data",
+          "data": {
+            "text/plain": [],
+            "text/html": [
+              "
\n"
+            ]
+          },
+          "metadata": {}
+        },
+        {
+          "output_type": "display_data",
+          "data": {
+            "text/plain": [
+              "Output()"
+            ],
+            "application/vnd.jupyter.widget-view+json": {
+              "version_major": 2,
+              "version_minor": 0,
+              "model_id": "0e00810b872342ee9d57fa40be33b56e"
+            }
+          },
+          "metadata": {}
+        },
+        {
+          "output_type": "display_data",
+          "data": {
+            "text/plain": [],
+            "text/html": [
+              "
\n"
+            ]
+          },
+          "metadata": {}
+        },
+        {
+          "output_type": "stream",
+          "name": "stdout",
+          "text": [
+            "The outline for the research on 'The Life and Legacy of Alfred Adler' has been successfully created.\n"
+          ]
+        }
+      ]
+    },
+    {
+      "cell_type": "markdown",
+      "source": [
+        "## Observability with Portkey\n",
+        "\n",
+        "By routing requests through Portkey you can track a number of metrics like - tokens used, latency, cost, etc.\n",
+        "\n",
+        "\"CrewAI"
+      ],
+      "metadata": {
+        "id": "0QneYrPzHUoa"
+      }
+    },
+    {
+      "cell_type": "code",
+      "source": [],
+      "metadata": {
+        "id": "DH3NzWGjBtN_"
+      },
+      "execution_count": null,
+      "outputs": []
+    }
+  ]
+}
\ No newline at end of file