Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 19 additions & 13 deletions .github/workflows/agentex-tutorials-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,24 +145,30 @@ jobs:
working-directory: ./examples/tutorials
run: |
echo "🚨 Test failed for tutorial: ${{ matrix.tutorial }}"
echo "📋 Printing agent logs..."

# Look for agent log files in the tutorial directory
if find "${{ matrix.tutorial }}" -name "*.log" -type f 2>/dev/null | grep -q .; then
echo "Found agent log files:"
find "${{ matrix.tutorial }}" -name "*.log" -type f -exec echo "=== {} ===" \; -exec cat {} \;
# Print agent logs from /tmp (where run_agent_test.sh writes them)
tutorial_name=$(basename "${{ matrix.tutorial }}")
agent_log="/tmp/agentex-${tutorial_name}.log"
if [[ -f "$agent_log" ]]; then
echo "📋 Agent logs ($agent_log):"
echo "----------------------------------------"
tail -100 "$agent_log"
echo "----------------------------------------"
else
echo "No .log files found, checking for other common log locations..."
echo "⚠️ No agent log at $agent_log"
echo "Available /tmp/agentex-*.log files:"
ls -la /tmp/agentex-*.log 2>/dev/null || echo " (none)"
fi

# Check for any output files or dumps
if find "${{ matrix.tutorial }}" -name "agent_output*" -o -name "debug*" -o -name "*.out" 2>/dev/null | grep -q .; then
echo "Found other output files:"
find "${{ matrix.tutorial }}" -name "agent_output*" -o -name "debug*" -o -name "*.out" -exec echo "=== {} ===" \; -exec cat {} \;
fi
# Print Docker server logs
echo ""
echo "📋 AgentEx Server (Docker) logs:"
echo "----------------------------------------"
cd ../../scale-agentex/agentex && docker compose logs --tail=100 agentex 2>/dev/null || echo "Could not retrieve Docker logs"
echo "----------------------------------------"

# Print the last 50 lines of any python processes that might still be running
echo "🔍 Checking for running python processes..."
echo ""
echo "🔍 Running python processes:"
ps aux | grep python || echo "No python processes found"

- name: Record test result
Expand Down
4 changes: 3 additions & 1 deletion examples/tutorials/00_sync/020_streaming/project/acp.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@

from agentex.lib import adk
from agentex.lib.types.acp import SendMessageParams
from agentex.types.text_content import TextContent
from agentex.lib.types.converters import convert_task_messages_to_oai_agents_inputs
from agentex.lib.utils.model_utils import BaseModel
from agentex.lib.sdk.fastacp.fastacp import FastACP
from agentex.types.task_message_update import TaskMessageUpdate, StreamTaskMessageFull
from agentex.types.task_message_content import TextContent, TaskMessageContent
from agentex.types.task_message_content import TaskMessageContent
from agentex.lib.adk.providers._modules.sync_provider import (
SyncStreamingProvider,
convert_openai_to_agentex_events,
Expand Down Expand Up @@ -56,6 +57,7 @@ async def handle_message_send(
content="Hey, sorry I'm unable to respond to your message because you're running this example without an OpenAI API key. Please set the OPENAI_API_KEY environment variable to run this example. Do this by either by adding a .env file to the project/ directory or by setting the environment variable in your terminal.",
),
)
return

# Try to retrieve the state. If it doesn't exist, create it.
task_state = await adk.state.get_by_task_and_agent(task_id=params.task.id, agent_id=params.agent.id)
Expand Down
6 changes: 3 additions & 3 deletions src/agentex/lib/core/temporal/workers/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@
DefaultPayloadConverter,
CompositePayloadConverter,
JSONPlainPayloadConverter,
_JSONTypeConverterUnhandled,
)
from temporalio.contrib.openai_agents import OpenAIAgentsPlugin

from agentex.lib.utils.logging import make_logger
from agentex.lib.utils.registration import register_agent
Expand All @@ -45,7 +43,7 @@ def default(self, o: Any) -> Any:

class DateTimeJSONTypeConverter(JSONTypeConverter):
@override
def to_typed_value(self, hint: type, value: Any) -> Any | None | _JSONTypeConverterUnhandled:
def to_typed_value(self, hint: type, value: Any) -> Any | None:
if hint == datetime.datetime:
return datetime.datetime.fromisoformat(value)
return JSONTypeConverter.Unhandled
Expand Down Expand Up @@ -96,6 +94,8 @@ async def get_temporal_client(temporal_address: str, metrics_url: str | None = N
_validate_plugins(plugins)

# Check if OpenAI plugin is present - it needs to configure its own data converter
# Lazy import to avoid pulling in opentelemetry.sdk for non-Temporal agents
from temporalio.contrib.openai_agents import OpenAIAgentsPlugin
has_openai_plugin = any(
isinstance(p, OpenAIAgentsPlugin) for p in (plugins or [])
)
Expand Down
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading