Skip to content

Commit ef0991d

Browse files
committed
Merge branch 'main' into stas/cli-fix
2 parents c30341e + fdb0d16 commit ef0991d

File tree

25 files changed

+134
-203
lines changed

25 files changed

+134
-203
lines changed

examples/tutorials/00_sync/000_hello_acp/tests/test_agent.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,13 @@
1717
"""
1818

1919
import os
20-
from agentex.types import TextContentParam, TextDelta, TextContent
21-
from agentex.types.agent_rpc_params import ParamsSendMessageRequest
22-
from agentex.types.task_message_update import StreamTaskMessageDelta, StreamTaskMessageFull
20+
2321
import pytest
24-
from agentex import Agentex
2522

23+
from agentex import Agentex
24+
from agentex.types import TextDelta, TextContent, TextContentParam
25+
from agentex.types.agent_rpc_params import ParamsSendMessageRequest
26+
from agentex.types.task_message_update import StreamTaskMessageFull, StreamTaskMessageDelta
2627

2728
# Configuration from environment variables
2829
AGENTEX_API_BASE_URL = os.environ.get("AGENTEX_API_BASE_URL", "http://localhost:5003")

examples/tutorials/00_sync/010_multiturn/project/acp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
from typing import Union, AsyncGenerator
33

44
from agentex.lib import adk
5+
from agentex.types import TextContent
56
from agentex.lib.types.acp import SendMessageParams
67
from agentex.lib.utils.model_utils import BaseModel
78
from agentex.lib.types.llm_messages import LLMConfig, UserMessage, SystemMessage, AssistantMessage
89
from agentex.lib.sdk.fastacp.fastacp import FastACP
910
from agentex.types.task_message_update import TaskMessageUpdate
1011
from agentex.types.task_message_content import TaskMessageContent
11-
from agentex.types import TextContent
1212

1313
# Create an ACP server
1414
acp = FastACP.create(

examples/tutorials/00_sync/010_multiturn/tests/test_agent.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,15 @@
1616
- AGENT_NAME: Name of the agent to test (default: s010-multiturn)
1717
"""
1818

19-
import enum
2019
import os
2120

22-
from agentex.lib.sdk.fastacp.base.base_acp_server import uuid
23-
from agentex.lib.types.acp import SendMessageParams
24-
25-
from test_utils.sync import collect_streaming_response, validate_text_in_string
26-
27-
from agentex.types import TaskMessageContentParam, TextContent, TextContentParam, task_list_params
28-
from agentex.types.agent_rpc_params import ParamsCreateTaskRequest, ParamsSendMessageRequest
2921
import pytest
30-
from agentex import Agentex
22+
from test_utils.sync import validate_text_in_string, collect_streaming_response
3123

24+
from agentex import Agentex
25+
from agentex.types import TextContent, TextContentParam
26+
from agentex.types.agent_rpc_params import ParamsCreateTaskRequest, ParamsSendMessageRequest
27+
from agentex.lib.sdk.fastacp.base.base_acp_server import uuid
3228

3329
# Configuration from environment variables
3430
AGENTEX_API_BASE_URL = os.environ.get("AGENTEX_API_BASE_URL", "http://localhost:5003")

examples/tutorials/00_sync/020_streaming/tests/test_agent.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,14 @@
1717
"""
1818

1919
import os
20+
2021
import pytest
22+
from test_utils.sync import collect_streaming_response
23+
2124
from agentex import Agentex
22-
from agentex.lib.sdk.fastacp.base.base_acp_server import uuid
2325
from agentex.types import TextContent, TextContentParam
2426
from agentex.types.agent_rpc_params import ParamsCreateTaskRequest, ParamsSendMessageRequest
25-
from test_utils.sync import collect_streaming_response, validate_text_in_string
26-
27+
from agentex.lib.sdk.fastacp.base.base_acp_server import uuid
2728

2829
# Configuration from environment variables
2930
AGENTEX_API_BASE_URL = os.environ.get("AGENTEX_API_BASE_URL", "http://localhost:5003")

examples/tutorials/10_agentic/00_base/000_hello_acp/tests/test_agent.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,19 @@
1616
"""
1717

1818
import os
19-
from agentex.types import TaskMessage
19+
import uuid
20+
import asyncio
21+
2022
import pytest
2123
import pytest_asyncio
22-
from agentex import AsyncAgentex
2324
from test_utils.agentic import (
24-
send_event_and_poll_yielding,
25-
stream_agent_response,
2625
poll_messages,
26+
stream_agent_response,
27+
send_event_and_poll_yielding,
2728
)
2829

29-
import uuid
30-
import asyncio
30+
from agentex import AsyncAgentex
31+
from agentex.types import TaskMessage
3132
from agentex.types.agent_rpc_params import ParamsCreateTaskRequest
3233
from agentex.types.text_content_param import TextContentParam
3334

@@ -64,7 +65,7 @@ class TestNonStreamingEvents:
6465
"""Test non-streaming event sending and polling."""
6566

6667
@pytest.mark.asyncio
67-
async def test_send_event_and_poll(self, client: AsyncAgentex, agent_name: str, agent_id: str):
68+
async def test_send_event_and_poll(self, client: AsyncAgentex, _agent_name: str, agent_id: str):
6869
"""Test sending an event and polling for the response."""
6970
# Create a task for this conversation
7071
task_response = await client.agents.create_task(agent_id, params=ParamsCreateTaskRequest(name=uuid.uuid1().hex))
@@ -103,7 +104,7 @@ class TestStreamingEvents:
103104
"""Test streaming event sending."""
104105

105106
@pytest.mark.asyncio
106-
async def test_send_event_and_stream(self, client: AsyncAgentex, agent_name: str, agent_id: str):
107+
async def test_send_event_and_stream(self, client: AsyncAgentex, _agent_name: str, agent_id: str):
107108
"""Test sending an event and streaming the response."""
108109
task_response = await client.agents.create_task(agent_id, params=ParamsCreateTaskRequest(name=uuid.uuid1().hex))
109110
task = task_response.result

examples/tutorials/10_agentic/00_base/010_multiturn/tests/test_agent.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,21 @@
1515
- AGENT_NAME: Name of the agent to test (default: ab010-multiturn)
1616
"""
1717

18-
from typing import List
1918
import os
2019
import uuid
21-
from agentex._utils import is_iterable
22-
from agentex.types import TaskMessage, TextContent
23-
from agentex.types.task import Task
20+
import asyncio
21+
from typing import List
22+
2423
import pytest
2524
import pytest_asyncio
26-
from agentex import AsyncAgentex
27-
from agentex.types.agent_rpc_params import ParamsCreateTaskRequest
2825
from test_utils.agentic import (
29-
send_event_and_poll_yielding,
3026
stream_agent_response,
27+
send_event_and_poll_yielding,
3128
)
32-
import asyncio
29+
30+
from agentex import AsyncAgentex
31+
from agentex.types import TextContent
32+
from agentex.types.agent_rpc_params import ParamsCreateTaskRequest
3333
from agentex.types.text_content_param import TextContentParam
3434

3535
# Configuration from environment variables
@@ -65,7 +65,7 @@ class TestNonStreamingEvents:
6565
"""Test non-streaming event sending and polling."""
6666

6767
@pytest.mark.asyncio
68-
async def test_send_event_and_poll(self, client: AsyncAgentex, agent_name: str, agent_id: str):
68+
async def test_send_event_and_poll(self, client: AsyncAgentex, _agent_name: str, agent_id: str):
6969
"""Test sending an event and polling for the response."""
7070
# TODO: Create a task for this conversation
7171
task_response = await client.agents.create_task(agent_id, params=ParamsCreateTaskRequest(name=uuid.uuid1().hex))

examples/tutorials/10_agentic/00_base/020_streaming/tests/test_agent.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,22 @@
1515
- AGENT_NAME: Name of the agent to test (default: ab020-streaming)
1616
"""
1717

18-
from typing import List
1918
import os
2019
import uuid
21-
from agentex.types import TaskMessage, TextContent
22-
from agentex.types.task import Task
20+
import asyncio
21+
from typing import List
22+
2323
import pytest
2424
import pytest_asyncio
25-
from agentex import AsyncAgentex
26-
from agentex.types.agent_rpc_params import ParamsCreateTaskRequest
2725
from test_utils.agentic import (
28-
send_event_and_poll_yielding,
2926
stream_agent_response,
27+
send_event_and_poll_yielding,
3028
)
31-
import asyncio
32-
from agentex.types.text_content_param import TextContentParam
3329

30+
from agentex import AsyncAgentex
31+
from agentex.types import TaskMessage, TextContent
32+
from agentex.types.agent_rpc_params import ParamsCreateTaskRequest
33+
from agentex.types.text_content_param import TextContentParam
3434

3535
# Configuration from environment variables
3636
AGENTEX_API_BASE_URL = os.environ.get("AGENTEX_API_BASE_URL", "http://localhost:5003")
@@ -65,7 +65,7 @@ class TestNonStreamingEvents:
6565
"""Test non-streaming event sending and polling."""
6666

6767
@pytest.mark.asyncio
68-
async def test_send_event_and_poll(self, client: AsyncAgentex, agent_name: str, agent_id: str):
68+
async def test_send_event_and_poll(self, client: AsyncAgentex, _agent_name: str, agent_id: str):
6969
"""Test sending an event and polling for the response."""
7070
# Create a task for this conversation
7171
task_response = await client.agents.create_task(agent_id, params=ParamsCreateTaskRequest(name=uuid.uuid1().hex))

examples/tutorials/10_agentic/00_base/030_tracing/tests/test_agent.py

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,11 @@
1616
"""
1717

1818
import os
19-
import uuid
19+
2020
import pytest
2121
import pytest_asyncio
22-
from agentex import AsyncAgentex
23-
from agentex.types.agent_rpc_params import ParamsCreateTaskRequest
24-
from test_utils.agentic import (
25-
stream_agent_response,
26-
validate_text_in_response,
27-
)
2822

23+
from agentex import AsyncAgentex
2924

3025
# Configuration from environment variables
3126
AGENTEX_API_BASE_URL = os.environ.get("AGENTEX_API_BASE_URL", "http://localhost:5003")
@@ -60,7 +55,7 @@ class TestNonStreamingEvents:
6055
"""Test non-streaming event sending and polling."""
6156

6257
@pytest.mark.asyncio
63-
async def test_send_event_and_poll(self, client: AsyncAgentex, agent_name: str, agent_id: str):
58+
async def test_send_event_and_poll(self, client: AsyncAgentex, _agent_name: str, agent_id: str):
6459
"""Test sending an event and polling for the response."""
6560
# TODO: Create a task for this conversation
6661
# task_response = await client.agents.create_task(agent_id, params=ParamsCreateTaskRequest(name=uuid.uuid1().hex))
@@ -88,7 +83,7 @@ class TestStreamingEvents:
8883
"""Test streaming event sending."""
8984

9085
@pytest.mark.asyncio
91-
async def test_send_event_and_stream(self, client: AsyncAgentex, agent_name: str, agent_id: str):
86+
async def test_send_event_and_stream(self, client: AsyncAgentex, _agent_name: str, agent_id: str):
9287
"""Test sending an event and streaming the response."""
9388
# TODO: Create a task for this conversation
9489
# task_response = await client.agents.create_task(agent_id, params=ParamsCreateTaskRequest(name=uuid.uuid1().hex))

examples/tutorials/10_agentic/00_base/040_other_sdks/tests/test_agent.py

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,23 +25,21 @@
2525
- AGENT_NAME: Name of the agent to test (default: ab040-other-sdks)
2626
"""
2727

28-
from curses import ALL_MOUSE_EVENTS
29-
from typing import List
3028
import os
3129
import uuid
32-
from agentex.types import TaskMessage, TextContent
33-
from agentex.types.task import Task
30+
import asyncio
31+
3432
import pytest
3533
import pytest_asyncio
36-
from agentex import AsyncAgentex
37-
from agentex.types.agent_rpc_params import ParamsCreateTaskRequest
3834
from test_utils.agentic import (
39-
send_event_and_poll_yielding,
4035
stream_agent_response,
36+
send_event_and_poll_yielding,
4137
)
42-
import asyncio
38+
39+
from agentex import AsyncAgentex
40+
from agentex.types import TaskMessage, TextContent
41+
from agentex.types.agent_rpc_params import ParamsCreateTaskRequest
4342
from agentex.types.text_content_param import TextContentParam
44-
from datetime import datetime
4543

4644
# Configuration from environment variables
4745
AGENTEX_API_BASE_URL = os.environ.get("AGENTEX_API_BASE_URL", "http://localhost:5003")
@@ -76,7 +74,7 @@ class TestNonStreamingEvents:
7674
"""Test non-streaming event sending and polling with MCP tools."""
7775

7876
@pytest.mark.asyncio
79-
async def test_send_event_and_poll_simple_query(self, client: AsyncAgentex, agent_name: str, agent_id: str):
77+
async def test_send_event_and_poll_simple_query(self, client: AsyncAgentex, _agent_name: str, agent_id: str):
8078
"""Test sending a simple event and polling for the response (no tool use)."""
8179
# Create a task for this conversation
8280
task_response = await client.agents.create_task(agent_id, params=ParamsCreateTaskRequest(name=uuid.uuid1().hex))

examples/tutorials/10_agentic/00_base/080_batch_events/tests/test_agent.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,22 @@
1616
"""
1717

1818
import os
19+
import re
1920
import uuid
20-
from agentex.types import TaskMessage
21+
import asyncio
22+
2123
import pytest
2224
import pytest_asyncio
23-
from agentex import AsyncAgentex
24-
from agentex.types.agent_rpc_params import ParamsCreateTaskRequest
2525
from test_utils.agentic import (
26-
send_event_and_poll_yielding,
2726
stream_agent_response,
28-
validate_text_in_response,
27+
send_event_and_poll_yielding,
2928
)
30-
import asyncio
29+
30+
from agentex import AsyncAgentex
31+
from agentex.types import TaskMessage
32+
from agentex.types.agent_rpc_params import ParamsCreateTaskRequest
3133
from agentex.types.text_content_param import TextContentParam
3234
from agentex.types.task_message_content import TextContent
33-
import re
3435

3536
# Configuration from environment variables
3637
AGENTEX_API_BASE_URL = os.environ.get("AGENTEX_API_BASE_URL", "http://localhost:5003")
@@ -65,7 +66,7 @@ class TestNonStreamingEvents:
6566
"""Test non-streaming event sending and polling."""
6667

6768
@pytest.mark.asyncio
68-
async def test_send_event_and_poll(self, client: AsyncAgentex, agent_name: str, agent_id: str):
69+
async def test_send_event_and_poll(self, client: AsyncAgentex, _agent_name: str, agent_id: str):
6970
"""Test sending a single event and polling for the response."""
7071
# Create a task for this conversation
7172
task_response = await client.agents.create_task(agent_id, params=ParamsCreateTaskRequest(name=uuid.uuid1().hex))

0 commit comments

Comments
 (0)