Unstructured API MCP Server

Official
{ "cells": [ { "cell_type": "code", "id": "dd74d3ac5677b80a", "metadata": { "ExecuteTime": { "end_time": "2025-03-21T14:16:46.432461Z", "start_time": "2025-03-21T14:16:46.429943Z" } }, "source": [ "from pathlib import Path\n", "import os\n", "\n", "# Set working directory at top level or repository\n", "os.chdir(Path.cwd().parent)" ], "outputs": [], "execution_count": 1 }, { "metadata": { "ExecuteTime": { "end_time": "2025-03-21T14:16:46.703107Z", "start_time": "2025-03-21T14:16:46.434838Z" } }, "cell_type": "code", "source": "from minimal_client.client import MCPClient", "id": "2bdb7a4f5bdef9c7", "outputs": [], "execution_count": 2 }, { "metadata": { "ExecuteTime": { "end_time": "2025-03-21T14:16:46.757148Z", "start_time": "2025-03-21T14:16:46.755515Z" } }, "cell_type": "code", "source": [ "query = \"\"\"\n", "Hello, I would like you to create: a new S3 source connector and S3 destination connector. Call them 'MyExampleSourceS3-1' and 'MyExampleDestinationS3-1' respectively. S3 uri is 's3://crag-protected-but-non-sensitive/pluto/example_input/' and 's3://crag-protected-but-non-sensitive/pluto/example_output/'. Then I would like you to create and execute workflow with platinum strategy and previously created connectors MyExampleSourceS3-1 and MyExampleDestinationS3-1\n", "\"\"\"" ], "id": "f01b8741d0649d3a", "outputs": [], "execution_count": 3 }, { "metadata": { "ExecuteTime": { "end_time": "2025-03-21T14:17:52.128033Z", "start_time": "2025-03-21T14:16:46.764461Z" } }, "cell_type": "code", "source": [ "client = MCPClient()\n", "try:\n", " await client.connect_to_server('uns_mcp/server.py')\n", " await client.chat_loop()\n", "finally:\n", " await client.cleanup()" ], "id": "4c47528e3609376c", "outputs": [ { "data": { "text/plain": [ "\n", "\u001B[1;32mQuery\u001B[0m (q/quit to end chat): " ], "text/html": [ "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">\n", "<span style=\"color: #008000; text-decoration-color: #008000; font-weight: bold\">Query</span> (q/quit to end chat): </pre>\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/plain": [ "\n" ], "text/html": [ "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">\n", "</pre>\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/plain": [ "\n", "\u001B[1;31mASSISTANT\u001B[0m\n", "I'll help you create the S3 source and destination connectors, create a workflow connecting them, and execute it. \n", "I'll break this down into steps:\n", "\n", "\u001B[1;36m1\u001B[0m. First, let's create the S3 source connector:\n" ], "text/html": [ "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">\n", "<span style=\"color: #800000; text-decoration-color: #800000; font-weight: bold\">ASSISTANT</span>\n", "I'll help you create the S3 source and destination connectors, create a workflow connecting them, and execute it. \n", "I'll break this down into steps:\n", "\n", "<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">1</span>. First, let's create the S3 source connector:\n", "</pre>\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/plain": [ "\n", "\u001B[1;36mTOOL CALL\u001B[0m\n", "Accept execution of create_s3_source with args {'name': 'MyExampleSourceS3-1', 'remote_url': \n", "'s3://crag-protected-but-non-sensitive/pluto/example_input/'}? \u001B[1;35m[y/n]\u001B[0m \u001B[1;36m(y)\u001B[0m: " ], "text/html": [ "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">\n", "<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">TOOL CALL</span>\n", "Accept execution of create_s3_source with args {'name': 'MyExampleSourceS3-1', 'remote_url': \n", "'s3://crag-protected-but-non-sensitive/pluto/example_input/'}? <span style=\"color: #800080; text-decoration-color: #800080; font-weight: bold\">[y/n]</span> <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">(y)</span>: </pre>\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/plain": [ "\n", "\u001B[1;36mTOOL OUTPUT\u001B[0m:\n", "S3 Source Connector Created:\n", "Name: MyExampleSourceS3-\u001B[1;36m1\u001B[0m\n", "ID: \u001B[93me6882f0e-3e02-4099-aef9-72f63f8faf79\u001B[0m\n", "\n" ], "text/html": [ "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">\n", "<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">TOOL OUTPUT</span>:\n", "S3 Source Connector Created:\n", "Name: MyExampleSourceS3-<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">1</span>\n", "ID: <span style=\"color: #ffff00; text-decoration-color: #ffff00\">e6882f0e-3e02-4099-aef9-72f63f8faf79</span>\n", "\n", "</pre>\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/plain": [ "\n", "\u001B[1;31mASSISTANT\u001B[0m\n", "\u001B[1;36m2\u001B[0m. Now, let's create the S3 destination connector:\n" ], "text/html": [ "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">\n", "<span style=\"color: #800000; text-decoration-color: #800000; font-weight: bold\">ASSISTANT</span>\n", "<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2</span>. Now, let's create the S3 destination connector:\n", "</pre>\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/plain": [ "\n", "\u001B[1;36mTOOL CALL\u001B[0m\n", "Accept execution of create_s3_destination with args {'name': 'MyExampleDestinationS3-1', 'remote_url': \n", "'s3://crag-protected-but-non-sensitive/pluto/example_output/'}? \u001B[1;35m[y/n]\u001B[0m \u001B[1;36m(y)\u001B[0m: " ], "text/html": [ "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">\n", "<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">TOOL CALL</span>\n", "Accept execution of create_s3_destination with args {'name': 'MyExampleDestinationS3-1', 'remote_url': \n", "'s3://crag-protected-but-non-sensitive/pluto/example_output/'}? <span style=\"color: #800080; text-decoration-color: #800080; font-weight: bold\">[y/n]</span> <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">(y)</span>: </pre>\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/plain": [ "\n", "\u001B[1;36mTOOL OUTPUT\u001B[0m:\n", "S3 Destination Connector Created:\n", "Name: MyExampleDestinationS3-\u001B[1;36m1\u001B[0m\n", "ID: \u001B[93mf89b88e0-2c5b-4199-9f2a-fa7f5401b592\u001B[0m\n", "\n" ], "text/html": [ "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">\n", "<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">TOOL OUTPUT</span>:\n", "S3 Destination Connector Created:\n", "Name: MyExampleDestinationS3-<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">1</span>\n", "ID: <span style=\"color: #ffff00; text-decoration-color: #ffff00\">f89b88e0-2c5b-4199-9f2a-fa7f5401b592</span>\n", "\n", "</pre>\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/plain": [ "\n", "\u001B[1;31mASSISTANT\u001B[0m\n", "\u001B[1;36m3\u001B[0m. Now, let's create a workflow using these connectors with a platinum strategy:\n" ], "text/html": [ "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">\n", "<span style=\"color: #800000; text-decoration-color: #800000; font-weight: bold\">ASSISTANT</span>\n", "<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">3</span>. Now, let's create a workflow using these connectors with a platinum strategy:\n", "</pre>\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/plain": [ "\n", "\u001B[1;36mTOOL CALL\u001B[0m\n", "Accept execution of create_workflow with args {'workflow_config': {'name': 'MyExampleWorkflow', 'workflow_type': \n", "'platinum', 'source_id': 'e6882f0e-3e02-4099-aef9-72f63f8faf79', 'destination_id': \n", "'f89b88e0-2c5b-4199-9f2a-fa7f5401b592'}}? \u001B[1;35m[y/n]\u001B[0m \u001B[1;36m(y)\u001B[0m: " ], "text/html": [ "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">\n", "<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">TOOL CALL</span>\n", "Accept execution of create_workflow with args {'workflow_config': {'name': 'MyExampleWorkflow', 'workflow_type': \n", "'platinum', 'source_id': 'e6882f0e-3e02-4099-aef9-72f63f8faf79', 'destination_id': \n", "'f89b88e0-2c5b-4199-9f2a-fa7f5401b592'}}? <span style=\"color: #800080; text-decoration-color: #800080; font-weight: bold\">[y/n]</span> <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">(y)</span>: </pre>\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/plain": [ "\n", "\u001B[1;36mTOOL OUTPUT\u001B[0m:\n", "Workflow Information:\n", "Name: MyExampleWorkflow\n", "ID: \u001B[93m0bc29f6a-6e8d-4a61-8bbc-59290202dc3d\u001B[0m\n", "Status: WorkflowState.ACTIVE\n", "Type: WorkflowType.PLATINUM\n", "\n", "Sources:\n", " - \u001B[93me6882f0e-3e02-4099-aef9-72f63f8faf79\u001B[0m\n", "\n", "Destinations:\n", " - \u001B[93mf89b88e0-2c5b-4199-9f2a-fa7f5401b592\u001B[0m\n", "\n", "Schedule:\n", "\n" ], "text/html": [ "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">\n", "<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">TOOL OUTPUT</span>:\n", "Workflow Information:\n", "Name: MyExampleWorkflow\n", "ID: <span style=\"color: #ffff00; text-decoration-color: #ffff00\">0bc29f6a-6e8d-4a61-8bbc-59290202dc3d</span>\n", "Status: WorkflowState.ACTIVE\n", "Type: WorkflowType.PLATINUM\n", "\n", "Sources:\n", " - <span style=\"color: #ffff00; text-decoration-color: #ffff00\">e6882f0e-3e02-4099-aef9-72f63f8faf79</span>\n", "\n", "Destinations:\n", " - <span style=\"color: #ffff00; text-decoration-color: #ffff00\">f89b88e0-2c5b-4199-9f2a-fa7f5401b592</span>\n", "\n", "Schedule:\n", "\n", "</pre>\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/plain": [ "\n", "\u001B[1;31mASSISTANT\u001B[0m\n", "\u001B[1;36m4\u001B[0m. Finally, let's execute the workflow:\n" ], "text/html": [ "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">\n", "<span style=\"color: #800000; text-decoration-color: #800000; font-weight: bold\">ASSISTANT</span>\n", "<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">4</span>. Finally, let's execute the workflow:\n", "</pre>\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/plain": [ "\n", "\u001B[1;36mTOOL CALL\u001B[0m\n", "Accept execution of run_workflow with args {'workflow_id': '0bc29f6a-6e8d-4a61-8bbc-59290202dc3d'}? \u001B[1;35m[y/n]\u001B[0m \u001B[1;36m(y)\u001B[0m: " ], "text/html": [ "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">\n", "<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">TOOL CALL</span>\n", "Accept execution of run_workflow with args {'workflow_id': '0bc29f6a-6e8d-4a61-8bbc-59290202dc3d'}? <span style=\"color: #800080; text-decoration-color: #800080; font-weight: bold\">[y/n]</span> <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">(y)</span>: </pre>\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/plain": [ "\n", "\u001B[1;36mTOOL OUTPUT\u001B[0m:\n", "Workflow execution initiated: \u001B[1m<\u001B[0m\u001B[1;95mResponse\u001B[0m\u001B[39m \u001B[0m\u001B[1;39m[\u001B[0m\u001B[1;36m202\u001B[0m\u001B[39m Accepted\u001B[0m\u001B[1;39m]\u001B[0m\u001B[1m>\u001B[0m\n", "\n" ], "text/html": [ "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">\n", "<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">TOOL OUTPUT</span>:\n", "Workflow execution initiated: <span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">Response</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #000000; text-decoration-color: #000000; font-weight: bold\">[</span><span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">202</span><span style=\"color: #000000; text-decoration-color: #000000\"> Accepted</span><span style=\"color: #000000; text-decoration-color: #000000; font-weight: bold\">]</span><span style=\"font-weight: bold\">&gt;</span>\n", "\n", "</pre>\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/plain": [ "\n", "\u001B[1;31mASSISTANT\u001B[0m\n", "I've completed all the requested steps:\n", "\u001B[1;36m1\u001B[0m. Created an S3 source connector named \u001B[32m\"MyExampleSourceS3-1\"\u001B[0m\n", "\u001B[1;36m2\u001B[0m. Created an S3 destination connector named \u001B[32m\"MyExampleDestinationS3-1\"\u001B[0m\n", "\u001B[1;36m3\u001B[0m. Created a workflow with platinum strategy connecting these connectors\n", "\u001B[1;36m4\u001B[0m. Executed the workflow\n", "\n", "The workflow has been created and execution has been initiated. You can monitor the progress of the workflow \n", "execution using the workflow ID: \u001B[93m0bc29f6a-6e8d-4a61-8bbc-59290202dc3d\u001B[0m or check the jobs associated with this \n", "workflow using the list_jobs function if needed.\n" ], "text/html": [ "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">\n", "<span style=\"color: #800000; text-decoration-color: #800000; font-weight: bold\">ASSISTANT</span>\n", "I've completed all the requested steps:\n", "<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">1</span>. Created an S3 source connector named <span style=\"color: #008000; text-decoration-color: #008000\">\"MyExampleSourceS3-1\"</span>\n", "<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2</span>. Created an S3 destination connector named <span style=\"color: #008000; text-decoration-color: #008000\">\"MyExampleDestinationS3-1\"</span>\n", "<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">3</span>. Created a workflow with platinum strategy connecting these connectors\n", "<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">4</span>. Executed the workflow\n", "\n", "The workflow has been created and execution has been initiated. You can monitor the progress of the workflow \n", "execution using the workflow ID: <span style=\"color: #ffff00; text-decoration-color: #ffff00\">0bc29f6a-6e8d-4a61-8bbc-59290202dc3d</span> or check the jobs associated with this \n", "workflow using the list_jobs function if needed.\n", "</pre>\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/plain": [ "\n", "\u001B[1;32mQuery\u001B[0m (q/quit to end chat): " ], "text/html": [ "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">\n", "<span style=\"color: #008000; text-decoration-color: #008000; font-weight: bold\">Query</span> (q/quit to end chat): </pre>\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/plain": [ "\n" ], "text/html": [ "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">\n", "</pre>\n" ] }, "metadata": {}, "output_type": "display_data" } ], "execution_count": 4 }, { "metadata": { "ExecuteTime": { "end_time": "2025-03-21T14:18:41.303666Z", "start_time": "2025-03-21T14:18:41.300758Z" } }, "cell_type": "code", "source": [ "query = \"\"\"\n", "I would like you to create and execute workflow with auto strategy and previously created connectors MyExampleSourceS3-1 and MyExampleDestinationS3-1. Call it S3toS3AutoWorkflow and run\n", "\"\"\"" ], "id": "184f86b3048f1060", "outputs": [], "execution_count": 5 }, { "metadata": { "ExecuteTime": { "end_time": "2025-03-21T14:19:33.371506Z", "start_time": "2025-03-21T14:18:43.108662Z" } }, "cell_type": "code", "source": [ "client = MCPClient()\n", "try:\n", " await client.connect_to_server('uns_mcp/server.py')\n", " await client.chat_loop()\n", "finally:\n", " await client.cleanup()" ], "id": "56cc846bff300daf", "outputs": [ { "data": { "text/plain": [ "\n", "\u001B[1;32mQuery\u001B[0m (q/quit to end chat): " ], "text/html": [ "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">\n", "<span style=\"color: #008000; text-decoration-color: #008000; font-weight: bold\">Query</span> (q/quit to end chat): </pre>\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/plain": [ "\n" ], "text/html": [ "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">\n", "</pre>\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/plain": [ "\n", "\u001B[1;31mASSISTANT\u001B[0m\n", "I'll help you create and execute a workflow using the auto strategy with the specified source and destination \n", "connectors. We'll need to create the workflow first and then run it.\n", "\n", "Let me first create the workflow. Since you want to use the auto strategy, I'll create a \u001B[32m\"basic\"\u001B[0m workflow type \n", "\u001B[1m(\u001B[0mwhich uses auto partitioning by default\u001B[1m)\u001B[0m:\n" ], "text/html": [ "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">\n", "<span style=\"color: #800000; text-decoration-color: #800000; font-weight: bold\">ASSISTANT</span>\n", "I'll help you create and execute a workflow using the auto strategy with the specified source and destination \n", "connectors. We'll need to create the workflow first and then run it.\n", "\n", "Let me first create the workflow. Since you want to use the auto strategy, I'll create a <span style=\"color: #008000; text-decoration-color: #008000\">\"basic\"</span> workflow type \n", "<span style=\"font-weight: bold\">(</span>which uses auto partitioning by default<span style=\"font-weight: bold\">)</span>:\n", "</pre>\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/plain": [ "\n", "\u001B[1;36mTOOL CALL\u001B[0m\n", "Accept execution of create_workflow with args {'workflow_config': {'name': 'S3toS3AutoWorkflow', 'workflow_type': \n", "'basic', 'source_id': 'MyExampleSourceS3-1', 'destination_id': 'MyExampleDestinationS3-1'}}? \u001B[1;35m[y/n]\u001B[0m \u001B[1;36m(y)\u001B[0m: " ], "text/html": [ "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">\n", "<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">TOOL CALL</span>\n", "Accept execution of create_workflow with args {'workflow_config': {'name': 'S3toS3AutoWorkflow', 'workflow_type': \n", "'basic', 'source_id': 'MyExampleSourceS3-1', 'destination_id': 'MyExampleDestinationS3-1'}}? <span style=\"color: #800080; text-decoration-color: #800080; font-weight: bold\">[y/n]</span> <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">(y)</span>: </pre>\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/plain": [ "\n", "\u001B[1;36mTOOL OUTPUT\u001B[0m:\n", "Error creating workflow: \u001B[1m{\u001B[0m\u001B[32m\"detail\"\u001B[0m:\u001B[1m[\u001B[0m\u001B[1m{\u001B[0m\u001B[32m\"loc\"\u001B[0m:\u001B[1m[\u001B[0m\u001B[32m\"body\"\u001B[0m,\u001B[32m\"source_id\"\u001B[0m\u001B[1m]\u001B[0m,\u001B[32m\"msg\"\u001B[0m:\u001B[32m\"Input should be a valid UUID, invalid \u001B[0m\n", "\u001B[32mcharacter: expected an optional prefix of `urn:uuid:` followed by \u001B[0m\u001B[32m[\u001B[0m\u001B[32m0-9a-fA-F-\u001B[0m\u001B[32m]\u001B[0m\u001B[32m, found `M` at \u001B[0m\n", "\u001B[32m1\"\u001B[0m,\u001B[32m\"type\"\u001B[0m:\u001B[32m\"uuid_parsing\"\u001B[0m\u001B[1m}\u001B[0m,\u001B[1m{\u001B[0m\u001B[32m\"loc\"\u001B[0m:\u001B[1m[\u001B[0m\u001B[32m\"body\"\u001B[0m,\u001B[32m\"destination_id\"\u001B[0m\u001B[1m]\u001B[0m,\u001B[32m\"msg\"\u001B[0m:\u001B[32m\"Input should be a valid UUID, invalid character: \u001B[0m\n", "\u001B[32mexpected an optional prefix of `urn:uuid:` followed by \u001B[0m\u001B[32m[\u001B[0m\u001B[32m0-9a-fA-F-\u001B[0m\u001B[32m]\u001B[0m\u001B[32m, found `M` at 1\"\u001B[0m,\u001B[32m\"type\"\u001B[0m:\u001B[32m\"uuid_parsing\"\u001B[0m\u001B[1m}\u001B[0m\u001B[1m]\u001B[0m\u001B[1m}\u001B[0m\n", "\n" ], "text/html": [ "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">\n", "<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">TOOL OUTPUT</span>:\n", "Error creating workflow: <span style=\"font-weight: bold\">{</span><span style=\"color: #008000; text-decoration-color: #008000\">\"detail\"</span>:<span style=\"font-weight: bold\">[{</span><span style=\"color: #008000; text-decoration-color: #008000\">\"loc\"</span>:<span style=\"font-weight: bold\">[</span><span style=\"color: #008000; text-decoration-color: #008000\">\"body\"</span>,<span style=\"color: #008000; text-decoration-color: #008000\">\"source_id\"</span><span style=\"font-weight: bold\">]</span>,<span style=\"color: #008000; text-decoration-color: #008000\">\"msg\"</span>:<span style=\"color: #008000; text-decoration-color: #008000\">\"Input should be a valid UUID, invalid </span>\n", "<span style=\"color: #008000; text-decoration-color: #008000\">character: expected an optional prefix of `urn:uuid:` followed by [0-9a-fA-F-], found `M` at </span>\n", "<span style=\"color: #008000; text-decoration-color: #008000\">1\"</span>,<span style=\"color: #008000; text-decoration-color: #008000\">\"type\"</span>:<span style=\"color: #008000; text-decoration-color: #008000\">\"uuid_parsing\"</span><span style=\"font-weight: bold\">}</span>,<span style=\"font-weight: bold\">{</span><span style=\"color: #008000; text-decoration-color: #008000\">\"loc\"</span>:<span style=\"font-weight: bold\">[</span><span style=\"color: #008000; text-decoration-color: #008000\">\"body\"</span>,<span style=\"color: #008000; text-decoration-color: #008000\">\"destination_id\"</span><span style=\"font-weight: bold\">]</span>,<span style=\"color: #008000; text-decoration-color: #008000\">\"msg\"</span>:<span style=\"color: #008000; text-decoration-color: #008000\">\"Input should be a valid UUID, invalid character: </span>\n", "<span style=\"color: #008000; text-decoration-color: #008000\">expected an optional prefix of `urn:uuid:` followed by [0-9a-fA-F-], found `M` at 1\"</span>,<span style=\"color: #008000; text-decoration-color: #008000\">\"type\"</span>:<span style=\"color: #008000; text-decoration-color: #008000\">\"uuid_parsing\"</span><span style=\"font-weight: bold\">}]}</span>\n", "\n", "</pre>\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/plain": [ "\n", "\u001B[1;31mASSISTANT\u001B[0m\n", "I apologize for the error. It seems we need to get the actual UUIDs for your source and destination connectors \n", "first. Let me fetch those:\n" ], "text/html": [ "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">\n", "<span style=\"color: #800000; text-decoration-color: #800000; font-weight: bold\">ASSISTANT</span>\n", "I apologize for the error. It seems we need to get the actual UUIDs for your source and destination connectors \n", "first. Let me fetch those:\n", "</pre>\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/plain": [ "\n", "\u001B[1;36mTOOL CALL\u001B[0m\n", "Accept execution of list_sources with args {}? \u001B[1;35m[y/n]\u001B[0m \u001B[1;36m(y)\u001B[0m: " ], "text/html": [ "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">\n", "<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">TOOL CALL</span>\n", "Accept execution of list_sources with args {}? <span style=\"color: #800080; text-decoration-color: #800080; font-weight: bold\">[y/n]</span> <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">(y)</span>: </pre>\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/plain": [ "\n", "\u001B[1;36mTOOL OUTPUT\u001B[0m:\n", "Available sources:\n", "- MyExampleSourceS3-\u001B[1;36m1\u001B[0m \u001B[1m(\u001B[0mID: \u001B[93me6882f0e-3e02-4099-aef9-72f63f8faf79\u001B[0m\u001B[1m)\u001B[0m\n", "\n" ], "text/html": [ "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">\n", "<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">TOOL OUTPUT</span>:\n", "Available sources:\n", "- MyExampleSourceS3-<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">1</span> <span style=\"font-weight: bold\">(</span>ID: <span style=\"color: #ffff00; text-decoration-color: #ffff00\">e6882f0e-3e02-4099-aef9-72f63f8faf79</span><span style=\"font-weight: bold\">)</span>\n", "\n", "</pre>\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/plain": [ "\n", "\u001B[1;36mTOOL CALL\u001B[0m\n", "Accept execution of list_destinations with args {}? \u001B[1;35m[y/n]\u001B[0m \u001B[1;36m(y)\u001B[0m: " ], "text/html": [ "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">\n", "<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">TOOL CALL</span>\n", "Accept execution of list_destinations with args {}? <span style=\"color: #800080; text-decoration-color: #800080; font-weight: bold\">[y/n]</span> <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">(y)</span>: </pre>\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/plain": [ "\n", "\u001B[1;36mTOOL OUTPUT\u001B[0m:\n", "Available destinations:\n", "- MyExampleDestinationS3-\u001B[1;36m1\u001B[0m \u001B[1m(\u001B[0mID: \u001B[93mf89b88e0-2c5b-4199-9f2a-fa7f5401b592\u001B[0m\u001B[1m)\u001B[0m\n", "\n" ], "text/html": [ "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">\n", "<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">TOOL OUTPUT</span>:\n", "Available destinations:\n", "- MyExampleDestinationS3-<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">1</span> <span style=\"font-weight: bold\">(</span>ID: <span style=\"color: #ffff00; text-decoration-color: #ffff00\">f89b88e0-2c5b-4199-9f2a-fa7f5401b592</span><span style=\"font-weight: bold\">)</span>\n", "\n", "</pre>\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/plain": [ "\n", "\u001B[1;31mASSISTANT\u001B[0m\n", "Now I'll create the workflow with the correct UUIDs:\n" ], "text/html": [ "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">\n", "<span style=\"color: #800000; text-decoration-color: #800000; font-weight: bold\">ASSISTANT</span>\n", "Now I'll create the workflow with the correct UUIDs:\n", "</pre>\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/plain": [ "\n", "\u001B[1;36mTOOL CALL\u001B[0m\n", "Accept execution of create_workflow with args {'workflow_config': {'name': 'S3toS3AutoWorkflow', 'workflow_type': \n", "'basic', 'source_id': 'e6882f0e-3e02-4099-aef9-72f63f8faf79', 'destination_id': \n", "'f89b88e0-2c5b-4199-9f2a-fa7f5401b592'}}? \u001B[1;35m[y/n]\u001B[0m \u001B[1;36m(y)\u001B[0m: " ], "text/html": [ "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">\n", "<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">TOOL CALL</span>\n", "Accept execution of create_workflow with args {'workflow_config': {'name': 'S3toS3AutoWorkflow', 'workflow_type': \n", "'basic', 'source_id': 'e6882f0e-3e02-4099-aef9-72f63f8faf79', 'destination_id': \n", "'f89b88e0-2c5b-4199-9f2a-fa7f5401b592'}}? <span style=\"color: #800080; text-decoration-color: #800080; font-weight: bold\">[y/n]</span> <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">(y)</span>: </pre>\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/plain": [ "\n", "\u001B[1;36mTOOL OUTPUT\u001B[0m:\n", "Workflow Information:\n", "Name: S3toS3AutoWorkflow\n", "ID: \u001B[93mf1818ab0-1d7f-407d-8eb3-1e9566086f42\u001B[0m\n", "Status: WorkflowState.ACTIVE\n", "Type: WorkflowType.BASIC\n", "\n", "Sources:\n", " - \u001B[93me6882f0e-3e02-4099-aef9-72f63f8faf79\u001B[0m\n", "\n", "Destinations:\n", " - \u001B[93mf89b88e0-2c5b-4199-9f2a-fa7f5401b592\u001B[0m\n", "\n", "Schedule:\n", "\n" ], "text/html": [ "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">\n", "<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">TOOL OUTPUT</span>:\n", "Workflow Information:\n", "Name: S3toS3AutoWorkflow\n", "ID: <span style=\"color: #ffff00; text-decoration-color: #ffff00\">f1818ab0-1d7f-407d-8eb3-1e9566086f42</span>\n", "Status: WorkflowState.ACTIVE\n", "Type: WorkflowType.BASIC\n", "\n", "Sources:\n", " - <span style=\"color: #ffff00; text-decoration-color: #ffff00\">e6882f0e-3e02-4099-aef9-72f63f8faf79</span>\n", "\n", "Destinations:\n", " - <span style=\"color: #ffff00; text-decoration-color: #ffff00\">f89b88e0-2c5b-4199-9f2a-fa7f5401b592</span>\n", "\n", "Schedule:\n", "\n", "</pre>\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/plain": [ "\n", "\u001B[1;31mASSISTANT\u001B[0m\n", "Great! Now that the workflow is created, let's run it:\n" ], "text/html": [ "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">\n", "<span style=\"color: #800000; text-decoration-color: #800000; font-weight: bold\">ASSISTANT</span>\n", "Great! Now that the workflow is created, let's run it:\n", "</pre>\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/plain": [ "\n", "\u001B[1;36mTOOL CALL\u001B[0m\n", "Accept execution of run_workflow with args {'workflow_id': 'f1818ab0-1d7f-407d-8eb3-1e9566086f42'}? \u001B[1;35m[y/n]\u001B[0m \u001B[1;36m(y)\u001B[0m: " ], "text/html": [ "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">\n", "<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">TOOL CALL</span>\n", "Accept execution of run_workflow with args {'workflow_id': 'f1818ab0-1d7f-407d-8eb3-1e9566086f42'}? <span style=\"color: #800080; text-decoration-color: #800080; font-weight: bold\">[y/n]</span> <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">(y)</span>: </pre>\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/plain": [ "\n", "\u001B[1;36mTOOL OUTPUT\u001B[0m:\n", "Workflow execution initiated: \u001B[1m<\u001B[0m\u001B[1;95mResponse\u001B[0m\u001B[39m \u001B[0m\u001B[1;39m[\u001B[0m\u001B[1;36m202\u001B[0m\u001B[39m Accepted\u001B[0m\u001B[1;39m]\u001B[0m\u001B[1m>\u001B[0m\n", "\n" ], "text/html": [ "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">\n", "<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">TOOL OUTPUT</span>:\n", "Workflow execution initiated: <span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">Response</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #000000; text-decoration-color: #000000; font-weight: bold\">[</span><span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">202</span><span style=\"color: #000000; text-decoration-color: #000000\"> Accepted</span><span style=\"color: #000000; text-decoration-color: #000000; font-weight: bold\">]</span><span style=\"font-weight: bold\">&gt;</span>\n", "\n", "</pre>\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/plain": [ "\n", "\u001B[1;31mASSISTANT\u001B[0m\n", "Perfect! I've completed both tasks:\n", "\u001B[1;36m1\u001B[0m. Created a workflow named \u001B[32m\"S3toS3AutoWorkflow\"\u001B[0m connecting your S3 source and destination connectors\n", "\u001B[1;36m2\u001B[0m. Started the workflow execution\n", "\n", "The workflow has been created and started running. The response indicates the execution was accepted \u001B[1m(\u001B[0m\u001B[1;36m202\u001B[0m status \n", "code\u001B[1m)\u001B[0m. You can monitor the progress of this job using the list_jobs or get_job_info functions if you'd like to \n", "check its status.\n", "\n", "Would you like me to check the status of the workflow execution for you?\n" ], "text/html": [ "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">\n", "<span style=\"color: #800000; text-decoration-color: #800000; font-weight: bold\">ASSISTANT</span>\n", "Perfect! I've completed both tasks:\n", "<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">1</span>. Created a workflow named <span style=\"color: #008000; text-decoration-color: #008000\">\"S3toS3AutoWorkflow\"</span> connecting your S3 source and destination connectors\n", "<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2</span>. Started the workflow execution\n", "\n", "The workflow has been created and started running. The response indicates the execution was accepted <span style=\"font-weight: bold\">(</span><span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">202</span> status \n", "code<span style=\"font-weight: bold\">)</span>. You can monitor the progress of this job using the list_jobs or get_job_info functions if you'd like to \n", "check its status.\n", "\n", "Would you like me to check the status of the workflow execution for you?\n", "</pre>\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/plain": [ "\n", "\u001B[1;32mQuery\u001B[0m (q/quit to end chat): " ], "text/html": [ "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">\n", "<span style=\"color: #008000; text-decoration-color: #008000; font-weight: bold\">Query</span> (q/quit to end chat): </pre>\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/plain": [ "\n" ], "text/html": [ "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">\n", "</pre>\n" ] }, "metadata": {}, "output_type": "display_data" } ], "execution_count": 6 }, { "metadata": {}, "cell_type": "code", "outputs": [], "execution_count": null, "source": "", "id": "577992412b485848" } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.12.3" } }, "nbformat": 4, "nbformat_minor": 5 }