|
2 | 2 | "cells": [ |
3 | 3 | { |
4 | 4 | "cell_type": "code", |
5 | | - "execution_count": 1, |
| 5 | + "execution_count": null, |
6 | 6 | "id": "0", |
7 | 7 | "metadata": {}, |
8 | 8 | "outputs": [], |
|
14 | 14 | }, |
15 | 15 | { |
16 | 16 | "cell_type": "code", |
17 | | - "execution_count": 2, |
| 17 | + "execution_count": null, |
18 | 18 | "id": "1", |
19 | 19 | "metadata": {}, |
20 | 20 | "outputs": [], |
|
24 | 24 | }, |
25 | 25 | { |
26 | 26 | "cell_type": "code", |
27 | | - "execution_count": 3, |
| 27 | + "execution_count": null, |
28 | 28 | "id": "2", |
29 | 29 | "metadata": {}, |
30 | | - "outputs": [ |
31 | | - { |
32 | | - "name": "stdout", |
33 | | - "output_type": "stream", |
34 | | - "text": [ |
35 | | - "Task(id='5d950471-ac85-4847-8102-209d0a79b0a6', created_at=datetime.datetime(2025, 8, 13, 0, 15, 24, 722362, tzinfo=TzInfo(UTC)), name='93ec41a3-task', status='RUNNING', status_reason='Task created, forwarding to ACP server', updated_at=datetime.datetime(2025, 8, 13, 0, 15, 24, 722362, tzinfo=TzInfo(UTC)))\n" |
36 | | - ] |
37 | | - } |
38 | | - ], |
| 30 | + "outputs": [], |
39 | 31 | "source": [ |
40 | 32 | "# (REQUIRED) Create a new task. For Agentic agents, you must create a task for messages to be associated with.\n", |
41 | 33 | "import uuid\n", |
|
54 | 46 | }, |
55 | 47 | { |
56 | 48 | "cell_type": "code", |
57 | | - "execution_count": 4, |
| 49 | + "execution_count": null, |
58 | 50 | "id": "3", |
59 | 51 | "metadata": {}, |
60 | | - "outputs": [ |
61 | | - { |
62 | | - "name": "stdout", |
63 | | - "output_type": "stream", |
64 | | - "text": [ |
65 | | - "Event(id='75379175-48cc-4d45-93f5-0e2125e6465d', agent_id='71580630-2e43-4db2-912f-124a80d8aca4', sequence_id=1, task_id='5d950471-ac85-4847-8102-209d0a79b0a6', content=TextContent(author='user', content='Hello tell me the latest news about AI and AI startups', attachments=None, format='plain', style='static', type='text'), created_at=datetime.datetime(2025, 8, 13, 0, 15, 26, 693593, tzinfo=TzInfo(UTC)))\n" |
66 | | - ] |
67 | | - } |
68 | | - ], |
| 52 | + "outputs": [], |
69 | 53 | "source": [ |
70 | 54 | "# Send an event to the agent\n", |
71 | 55 | "\n", |
|
91 | 75 | }, |
92 | 76 | { |
93 | 77 | "cell_type": "code", |
94 | | - "execution_count": 5, |
| 78 | + "execution_count": null, |
95 | 79 | "id": "4", |
96 | 80 | "metadata": {}, |
97 | | - "outputs": [ |
98 | | - { |
99 | | - "data": { |
100 | | - "text/html": [ |
101 | | - "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #00ffff; text-decoration-color: #00ffff\">╭───────────────────────── </span><span style=\"color: #00ffff; text-decoration-color: #00ffff; font-weight: bold\">USER</span><span style=\"color: #00ffff; text-decoration-color: #00ffff\"> [08/13/2025 00:15:26] ─────────────────────────╮</span>\n", |
102 | | - "<span style=\"color: #00ffff; text-decoration-color: #00ffff\">│</span> Hello tell me the latest news about AI and AI startups <span style=\"color: #00ffff; text-decoration-color: #00ffff\">│</span>\n", |
103 | | - "<span style=\"color: #00ffff; text-decoration-color: #00ffff\">╰──────────────────────────────────────────────────────────────────────────────╯</span>\n", |
104 | | - "</pre>\n" |
105 | | - ], |
106 | | - "text/plain": [ |
107 | | - "\u001b[96m╭─\u001b[0m\u001b[96m────────────────────────\u001b[0m\u001b[96m \u001b[0m\u001b[1;96mUSER\u001b[0m\u001b[96m [08/13/2025 00:15:26] \u001b[0m\u001b[96m────────────────────────\u001b[0m\u001b[96m─╮\u001b[0m\n", |
108 | | - "\u001b[96m│\u001b[0m Hello tell me the latest news about AI and AI startups \u001b[96m│\u001b[0m\n", |
109 | | - "\u001b[96m╰──────────────────────────────────────────────────────────────────────────────╯\u001b[0m\n" |
110 | | - ] |
111 | | - }, |
112 | | - "metadata": {}, |
113 | | - "output_type": "display_data" |
114 | | - }, |
115 | | - { |
116 | | - "name": "stdout", |
117 | | - "output_type": "stream", |
118 | | - "text": [ |
119 | | - "Streaming timed out after 5 seconds - returning collected messages\n" |
120 | | - ] |
121 | | - } |
122 | | - ], |
| 81 | + "outputs": [], |
123 | 82 | "source": [ |
124 | 83 | "# Subscribe to the async task messages produced by the agent\n", |
125 | 84 | "from agentex.lib.utils.dev_tools import subscribe_to_async_task_messages\n", |
|
136 | 95 | }, |
137 | 96 | { |
138 | 97 | "cell_type": "code", |
139 | | - "execution_count": 6, |
| 98 | + "execution_count": null, |
140 | 99 | "id": "5", |
141 | 100 | "metadata": {}, |
142 | | - "outputs": [ |
143 | | - { |
144 | | - "name": "stdout", |
145 | | - "output_type": "stream", |
146 | | - "text": [ |
147 | | - "Event(id='f0bbedb7-95db-4708-acc0-e3094f34036a', agent_id='71580630-2e43-4db2-912f-124a80d8aca4', sequence_id=2, task_id='5d950471-ac85-4847-8102-209d0a79b0a6', content=TextContent(author='user', content='I want to know what viral news came up and which startups failed, got acquired, or became very successful or popular in the last 3 months', attachments=None, format='plain', style='static', type='text'), created_at=datetime.datetime(2025, 8, 13, 0, 15, 32, 633013, tzinfo=TzInfo(UTC)))\n" |
148 | | - ] |
149 | | - } |
150 | | - ], |
| 101 | + "outputs": [], |
151 | 102 | "source": [ |
152 | 103 | "# Send a follow up event to the agent in response to the agent's follow up question\n", |
153 | 104 | "\n", |
|
165 | 116 | }, |
166 | 117 | { |
167 | 118 | "cell_type": "code", |
168 | | - "execution_count": 7, |
| 119 | + "execution_count": null, |
169 | 120 | "id": "6", |
170 | 121 | "metadata": {}, |
171 | | - "outputs": [ |
172 | | - { |
173 | | - "data": { |
174 | | - "text/html": [ |
175 | | - "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #00ffff; text-decoration-color: #00ffff\">╭───────────────────────── </span><span style=\"color: #00ffff; text-decoration-color: #00ffff; font-weight: bold\">USER</span><span style=\"color: #00ffff; text-decoration-color: #00ffff\"> [08/13/2025 00:15:32] ─────────────────────────╮</span>\n", |
176 | | - "<span style=\"color: #00ffff; text-decoration-color: #00ffff\">│</span> I want to know what viral news came up and which startups failed, got <span style=\"color: #00ffff; text-decoration-color: #00ffff\">│</span>\n", |
177 | | - "<span style=\"color: #00ffff; text-decoration-color: #00ffff\">│</span> acquired, or became very successful or popular in the last 3 months <span style=\"color: #00ffff; text-decoration-color: #00ffff\">│</span>\n", |
178 | | - "<span style=\"color: #00ffff; text-decoration-color: #00ffff\">╰──────────────────────────────────────────────────────────────────────────────╯</span>\n", |
179 | | - "</pre>\n" |
180 | | - ], |
181 | | - "text/plain": [ |
182 | | - "\u001b[96m╭─\u001b[0m\u001b[96m────────────────────────\u001b[0m\u001b[96m \u001b[0m\u001b[1;96mUSER\u001b[0m\u001b[96m [08/13/2025 00:15:32] \u001b[0m\u001b[96m────────────────────────\u001b[0m\u001b[96m─╮\u001b[0m\n", |
183 | | - "\u001b[96m│\u001b[0m I want to know what viral news came up and which startups failed, got \u001b[96m│\u001b[0m\n", |
184 | | - "\u001b[96m│\u001b[0m acquired, or became very successful or popular in the last 3 months \u001b[96m│\u001b[0m\n", |
185 | | - "\u001b[96m╰──────────────────────────────────────────────────────────────────────────────╯\u001b[0m\n" |
186 | | - ] |
187 | | - }, |
188 | | - "metadata": {}, |
189 | | - "output_type": "display_data" |
190 | | - }, |
191 | | - { |
192 | | - "data": { |
193 | | - "text/html": [ |
194 | | - "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #008000; text-decoration-color: #008000\">╭──────────────────────── </span><span style=\"color: #008000; text-decoration-color: #008000; font-weight: bold\">AGENT</span><span style=\"color: #008000; text-decoration-color: #008000\"> [08/13/2025 00:15:32] ─────────────────────────╮</span>\n", |
195 | | - "<span style=\"color: #008000; text-decoration-color: #008000\">│</span> Starting deep research process based on your query and follow-up <span style=\"color: #008000; text-decoration-color: #008000\">│</span>\n", |
196 | | - "<span style=\"color: #008000; text-decoration-color: #008000\">│</span> responses... <span style=\"color: #008000; text-decoration-color: #008000\">│</span>\n", |
197 | | - "<span style=\"color: #008000; text-decoration-color: #008000\">╰──────────────────────────────────────────────────────────────────────────────╯</span>\n", |
198 | | - "</pre>\n" |
199 | | - ], |
200 | | - "text/plain": [ |
201 | | - "\u001b[32m╭─\u001b[0m\u001b[32m───────────────────────\u001b[0m\u001b[32m \u001b[0m\u001b[1;32mAGENT\u001b[0m\u001b[32m [08/13/2025 00:15:32] \u001b[0m\u001b[32m────────────────────────\u001b[0m\u001b[32m─╮\u001b[0m\n", |
202 | | - "\u001b[32m│\u001b[0m Starting deep research process based on your query and follow-up \u001b[32m│\u001b[0m\n", |
203 | | - "\u001b[32m│\u001b[0m responses... \u001b[32m│\u001b[0m\n", |
204 | | - "\u001b[32m╰──────────────────────────────────────────────────────────────────────────────╯\u001b[0m\n" |
205 | | - ] |
206 | | - }, |
207 | | - "metadata": {}, |
208 | | - "output_type": "display_data" |
209 | | - }, |
210 | | - { |
211 | | - "name": "stdout", |
212 | | - "output_type": "stream", |
213 | | - "text": [ |
214 | | - "Streaming timed out after 30 seconds - returning collected messages\n" |
215 | | - ] |
216 | | - } |
217 | | - ], |
| 122 | + "outputs": [], |
218 | 123 | "source": [ |
219 | 124 | "# Subscribe to the async task messages produced by the agent\n", |
220 | 125 | "from agentex.lib.utils.dev_tools import subscribe_to_async_task_messages\n", |
|
0 commit comments