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
4 changes: 1 addition & 3 deletions examples/tutorials/00_sync/000_hello_acp/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,8 @@ RUN uv pip install --system -r requirements.txt
# Copy the project code
COPY 000_hello_acp/project /app/project

WORKDIR /app/project

# Set environment variables
ENV PYTHONPATH=/app

# Run the agent using uvicorn
CMD ["uvicorn", "acp:acp", "--host", "0.0.0.0", "--port", "8000"]
CMD ["uvicorn", "project.acp:acp", "--host", "0.0.0.0", "--port", "8000"]
4 changes: 1 addition & 3 deletions examples/tutorials/00_sync/010_multiturn/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,8 @@ RUN uv pip install --system -r requirements.txt
# Copy the project code
COPY 010_multiturn/project /app/project

WORKDIR /app/project

# Set environment variables
ENV PYTHONPATH=/app

# Run the agent using uvicorn
CMD ["uvicorn", "acp:acp", "--host", "0.0.0.0", "--port", "8000"]
CMD ["uvicorn", "project.acp:acp", "--host", "0.0.0.0", "--port", "8000"]
4 changes: 1 addition & 3 deletions examples/tutorials/00_sync/020_streaming/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,8 @@ RUN uv pip install --system -r requirements.txt
# Copy the project code
COPY 020_streaming/project /app/project

WORKDIR /app/project

# Set environment variables
ENV PYTHONPATH=/app

# Run the agent using uvicorn
CMD ["uvicorn", "acp:acp", "--host", "0.0.0.0", "--port", "8000"]
CMD ["uvicorn", "project.acp:acp", "--host", "0.0.0.0", "--port", "8000"]
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,8 @@ RUN uv pip install --system -r requirements.txt
# Copy the project code
COPY 000_hello_acp/project /app/project

WORKDIR /app/project

# Set environment variables
ENV PYTHONPATH=/app

# Run the agent using uvicorn
CMD ["uvicorn", "acp:acp", "--host", "0.0.0.0", "--port", "8000"]
CMD ["uvicorn", "project.acp:acp", "--host", "0.0.0.0", "--port", "8000"]
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,8 @@ RUN uv pip install --system -r requirements.txt
# Copy the project code
COPY 010_multiturn/project /app/project

WORKDIR /app/project

# Set environment variables
ENV PYTHONPATH=/app

# Run the agent using uvicorn
CMD ["uvicorn", "acp:acp", "--host", "0.0.0.0", "--port", "8000"]
CMD ["uvicorn", "project.acp:acp", "--host", "0.0.0.0", "--port", "8000"]
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,8 @@ RUN uv pip install --system -r requirements.txt
# Copy the project code
COPY 020_streaming/project /app/project

WORKDIR /app/project

# Set environment variables
ENV PYTHONPATH=/app

# Run the agent using uvicorn
CMD ["uvicorn", "acp:acp", "--host", "0.0.0.0", "--port", "8000"]
CMD ["uvicorn", "project.acp:acp", "--host", "0.0.0.0", "--port", "8000"]
3 changes: 1 addition & 2 deletions examples/tutorials/10_agentic/00_base/030_tracing/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,9 @@ RUN uv pip install --system -r requirements.txt
# Copy the project code
COPY 030_tracing/project /app/project

WORKDIR /app/project

# Set environment variables
ENV PYTHONPATH=/app

# Run the agent using uvicorn
CMD ["uvicorn", "acp:acp", "--host", "0.0.0.0", "--port", "8000"]
CMD ["uvicorn", "project.acp:acp", "--host", "0.0.0.0", "--port", "8000"]
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,8 @@ RUN uv pip install --system -r requirements.txt
# Copy the project code
COPY 040_other_sdks/project /app/project

WORKDIR /app/project

# Set environment variables
ENV PYTHONPATH=/app

# Run the agent using uvicorn
CMD ["uvicorn", "acp:acp", "--host", "0.0.0.0", "--port", "8000"]
CMD ["uvicorn", "project.acp:acp", "--host", "0.0.0.0", "--port", "8000"]
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,18 @@ RUN uv pip install --system --upgrade pip setuptools wheel
ENV UV_HTTP_TIMEOUT=1000

# Copy just the requirements file to optimize caching
COPY 10_agentic/00_base/080_batch_events/requirements.txt /app/10_agentic/00_base/080_batch_events/requirements.txt
COPY 080_batch_events/requirements.txt /app/requirements.txt

WORKDIR /app/10_agentic/00_base/080_batch_events
WORKDIR /app/

# Install the required Python packages
RUN uv pip install --system -r requirements.txt

# Copy the project code
COPY 10_agentic/00_base/080_batch_events/project /app/10_agentic/00_base/080_batch_events/project

WORKDIR /app/10_agentic/00_base/080_batch_events/project
COPY 080_batch_events/project /app/project

# Set environment variables
ENV PYTHONPATH=/app

# Run the agent using uvicorn
CMD ["uvicorn", "acp:acp", "--host", "0.0.0.0", "--port", "8000"]
CMD ["uvicorn", "project.acp:acp", "--host", "0.0.0.0", "--port", "8000"]
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,8 @@ RUN uv pip install --system -r requirements.txt
# Copy the project code
COPY 000_hello_acp/project /app/project

WORKDIR /app/project

# Run the ACP server using uvicorn
CMD ["uvicorn", "acp:acp", "--host", "0.0.0.0", "--port", "8000"]
CMD ["uvicorn", "project.acp:acp", "--host", "0.0.0.0", "--port", "8000"]

# When we deploy the worker, we will replace the CMD with the following
# CMD ["python", "-m", "run_worker"]
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,8 @@ RUN uv pip install --system -r requirements.txt
# Copy the project code
COPY 010_agent_chat/project /app/project

WORKDIR /app/project

# Run the ACP server using uvicorn
CMD ["uvicorn", "acp:acp", "--host", "0.0.0.0", "--port", "8000"]
CMD ["uvicorn", "project.acp:acp", "--host", "0.0.0.0", "--port", "8000"]

# When we deploy the worker, we will replace the CMD with the following
# CMD ["python", "-m", "run_worker"]
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,18 @@ RUN uv pip install --system --upgrade pip setuptools wheel
ENV UV_HTTP_TIMEOUT=1000

# Copy just the requirements file to optimize caching
COPY 10_agentic/10_temporal/020_state_machine/requirements.txt /app/10_agentic/10_temporal/020_state_machine/requirements.txt
COPY 020_state_machine/requirements.txt /app/requirements.txt

WORKDIR /app/10_agentic/10_temporal/020_state_machine
WORKDIR /app/

# Install the required Python packages
RUN uv pip install --system -r requirements.txt

# Copy the project code
COPY 10_agentic/10_temporal/020_state_machine/project /app/10_agentic/10_temporal/020_state_machine/project

WORKDIR /app/10_agentic/10_temporal/020_state_machine/project
COPY 020_state_machine/project /app/project

# Run the ACP server using uvicorn
CMD ["uvicorn", "acp:acp", "--host", "0.0.0.0", "--port", "8000"]
CMD ["uvicorn", "project.acp:acp", "--host", "0.0.0.0", "--port", "8000"]

# When we deploy the worker, we will replace the CMD with the following
# CMD ["python", "-m", "run_worker"]
4 changes: 1 addition & 3 deletions src/agentex/lib/cli/templates/default/Dockerfile-uv.j2
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,8 @@ RUN uv pip install --system .
# Copy the project code
COPY {{ project_path_from_build_root }}/project /app/{{ project_path_from_build_root }}/project

WORKDIR /app/{{ project_path_from_build_root }}/project

# Set environment variables
ENV PYTHONPATH=/app

# Run the agent using uvicorn
CMD ["uvicorn", "acp:acp", "--host", "0.0.0.0", "--port", "8000"]
CMD ["uvicorn", "project.acp:acp", "--host", "0.0.0.0", "--port", "8000"]
4 changes: 1 addition & 3 deletions src/agentex/lib/cli/templates/default/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,8 @@ RUN uv pip install --system -r requirements.txt
# Copy the project code
COPY {{ project_path_from_build_root }}/project /app/{{ project_path_from_build_root }}/project

WORKDIR /app/{{ project_path_from_build_root }}/project

# Set environment variables
ENV PYTHONPATH=/app

# Run the agent using uvicorn
CMD ["uvicorn", "acp:acp", "--host", "0.0.0.0", "--port", "8000"]
CMD ["uvicorn", "project.acp:acp", "--host", "0.0.0.0", "--port", "8000"]
4 changes: 1 addition & 3 deletions src/agentex/lib/cli/templates/sync/Dockerfile-uv.j2
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,8 @@ RUN uv pip install --system .
# Copy the project code
COPY {{ project_path_from_build_root }}/project /app/{{ project_path_from_build_root }}/project

WORKDIR /app/{{ project_path_from_build_root }}/project

# Set environment variables
ENV PYTHONPATH=/app

# Run the agent using uvicorn
CMD ["uvicorn", "acp:acp", "--host", "0.0.0.0", "--port", "8000"]
CMD ["uvicorn", "project.acp:acp", "--host", "0.0.0.0", "--port", "8000"]
3 changes: 1 addition & 2 deletions src/agentex/lib/cli/templates/sync/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,9 @@ RUN uv pip install --system -r requirements.txt
# Copy the project code
COPY {{ project_path_from_build_root }}/project /app/{{ project_path_from_build_root }}/project

WORKDIR /app/{{ project_path_from_build_root }}/project

# Set environment variables
ENV PYTHONPATH=/app

# Run the agent using uvicorn
CMD ["uvicorn", "acp:acp", "--host", "0.0.0.0", "--port", "8000"]
CMD ["uvicorn", "project.acp:acp", "--host", "0.0.0.0", "--port", "8000"]
4 changes: 1 addition & 3 deletions src/agentex/lib/cli/templates/temporal/Dockerfile-uv.j2
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,8 @@ RUN uv pip install --system .
# Copy the project code
COPY {{ project_path_from_build_root }}/project /app/{{ project_path_from_build_root }}/project

WORKDIR /app/{{ project_path_from_build_root }}/project

# Run the ACP server using uvicorn
CMD ["uvicorn", "acp:acp", "--host", "0.0.0.0", "--port", "8000"]
CMD ["uvicorn", "project.acp:acp", "--host", "0.0.0.0", "--port", "8000"]

# When we deploy the worker, we will replace the CMD with the following
# CMD ["python", "-m", "run_worker"]
4 changes: 1 addition & 3 deletions src/agentex/lib/cli/templates/temporal/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,8 @@ RUN uv pip install --system -r requirements.txt
# Copy the project code
COPY {{ project_path_from_build_root }}/project /app/{{ project_path_from_build_root }}/project

WORKDIR /app/{{ project_path_from_build_root }}/project

# Run the ACP server using uvicorn
CMD ["uvicorn", "acp:acp", "--host", "0.0.0.0", "--port", "8000"]
CMD ["uvicorn", "project.acp:acp", "--host", "0.0.0.0", "--port", "8000"]

# When we deploy the worker, we will replace the CMD with the following
# CMD ["python", "-m", "run_worker"]
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ from agentex.lib.utils.logging import make_logger
from agentex.lib.utils.debug import setup_debug_if_enabled
from agentex.lib.environment_variables import EnvironmentVariables

from workflow import {{ workflow_class }}
from project.workflow import {{ workflow_class }}


environment_variables = EnvironmentVariables.refresh()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from typing import Any
from agentex.lib.core.clients.temporal.temporal_client import TemporalClient
from agentex.lib.core.clients.temporal.types import WorkflowState
from agentex.lib.core.temporal.types.workflow import SignalName
Expand All @@ -22,7 +23,7 @@ def __init__(
self._temporal_client = temporal_client
self._env_vars = env_vars

async def submit_task(self, agent: Agent, task: Task) -> str:
async def submit_task(self, agent: Agent, task: Task, params: dict[str, Any] | None) -> str:
"""
Submit a task to the async runtime for execution.

Expand All @@ -33,7 +34,7 @@ async def submit_task(self, agent: Agent, task: Task) -> str:
arg=CreateTaskParams(
agent=agent,
task=task,
params=None,
params=params,
),
id=task.id,
task_queue=self._env_vars.WORKFLOW_TASK_QUEUE,
Expand Down
2 changes: 1 addition & 1 deletion src/agentex/lib/sdk/fastacp/impl/temporal_acp.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def _setup_handlers(self):
async def handle_task_create(params: CreateTaskParams) -> None:
"""Default create task handler - logs the task"""
logger.info(f"TemporalACP received task create rpc call for task {params.task.id}")
await self._temporal_task_service.submit_task(agent=params.agent, task=params.task)
await self._temporal_task_service.submit_task(agent=params.agent, task=params.task, params=params.params)

@self.on_task_event_send
async def handle_event_send(params: SendEventParams) -> None:
Expand Down
Loading