### Serve Ollama Source: https://github.com/temporalio/samples-python/blob/main/openai_agents/model_providers/README.md Starts the Ollama server, which is required for the GPT-OSS with Ollama example. Ensure Ollama is installed. ```bash ollama serve ``` -------------------------------- ### Run Main Application Source: https://github.com/temporalio/samples-python/blob/main/worker_versioning/README.md Start the main application to guide through the worker versioning sample. ```bash uv run worker_versioning/app.py ``` -------------------------------- ### Running the Basic LLM Workflow Source: https://github.com/temporalio/samples-python/blob/main/langsmith_tracing/basic/README.md Use these commands to start the worker and run the workflow. Ensure you have the necessary prerequisites installed. ```bash # Terminal 1 — start the worker uv run --group langsmith-tracing python -m langsmith_tracing.basic.worker # Terminal 2 — run the workflow uv run --group langsmith-tracing python -m langsmith_tracing.basic.starter ``` -------------------------------- ### Start Worker Source: https://github.com/temporalio/samples-python/blob/main/openai_agents/handoffs/README.md Starts the Temporal worker for the agent handoff examples. Ensure prerequisites are met before running. ```bash uv run openai_agents/handoffs/run_worker.py ``` -------------------------------- ### Run Worker Source: https://github.com/temporalio/samples-python/blob/main/openai_agents/reasoning_content/README.md Starts the Temporal worker for the example. Ensure your OPENAI_API_KEY is set and you are using a model that supports reasoning content. ```bash uv run openai_agents/reasoning_content/run_worker.py ``` -------------------------------- ### Start LLM Worker Source: https://github.com/temporalio/samples-python/blob/main/workflow_streams/README.md To run scenario 5, first install the LLM group dependencies, export your OpenAI API key, and then start the LLM worker. This worker is essential for LLM-based stream processing. ```bash uv sync --group llm-stream export OPENAI_API_KEY=... uv run workflow_streams/run_llm_worker.py ``` -------------------------------- ### Start Shared Worker Source: https://github.com/temporalio/samples-python/blob/main/workflow_streams/README.md Use this command to start the shared worker for scenarios 1-4. Ensure you have the necessary dependencies installed. ```bash uv run workflow_streams/run_worker.py ``` -------------------------------- ### Start Temporal Dev Server Source: https://github.com/temporalio/samples-python/blob/main/hello_standalone_activity/README.md Starts the Temporal development server. This is the first step before running any Temporal applications. ```bash temporal server start-dev ``` -------------------------------- ### Run GPT-OSS Workflow Example Source: https://github.com/temporalio/samples-python/blob/main/openai_agents/model_providers/README.md Executes the workflow example that uses GPT-OSS with a local Ollama server. This demonstrates tool calling capabilities. ```bash uv run openai_agents/model_providers/run_gpt_oss_workflow.py ``` -------------------------------- ### Install trio_async Dependency Source: https://github.com/temporalio/samples-python/blob/main/trio_async/README.md Include the optional `trio_async` dependency group to use this sample. Run this command to install. ```bash uv sync --group trio_async ``` -------------------------------- ### Run LiteLLM Auto Workflow Example Source: https://github.com/temporalio/samples-python/blob/main/openai_agents/model_providers/README.md Executes the LiteLLM auto workflow example. This example defaults to Anthropic Claude but can be configured for other LiteLLM-supported providers. ```bash uv run openai_agents/model_providers/run_litellm_auto_workflow.py ``` -------------------------------- ### Run Worker and Start Schedule Source: https://github.com/temporalio/samples-python/blob/main/schedules/README.md Commands to run the Temporal worker and start a schedule. Replace `start_schedule.py` with other example filenames to run different schedule operations. ```bash uv run schedules/run_worker.py uv run schedules/start_schedule.py ``` ```bash uv run schedules/backfill_schedule.py ``` ```bash uv run schedules/delete_schedule.py ``` ```bash uv run schedules/describe_schedule.py ``` ```bash uv run schedules/list_schedule.py ``` ```bash uv run schedules/pause_schedule.py ``` ```bash uv run schedules/trigger_schedule.py ``` ```bash uv run schedules/update_schedule.py ``` -------------------------------- ### Start Initial Workflow Source: https://github.com/temporalio/samples-python/blob/main/patching/README.md Starts a new workflow using the initial code. This is the first step before applying any patches. ```bash uv run patching/starter.py --start-workflow initial-workflow-id ``` -------------------------------- ### Install Dependencies Source: https://github.com/temporalio/samples-python/blob/main/langgraph_plugin/README.md Install the necessary dependencies for the LangGraph plugin. ```bash uv sync --group langgraph ``` -------------------------------- ### Run Worker Source: https://github.com/temporalio/samples-python/blob/main/openai_agents/basic/README.md Starts the Temporal worker that supports all basic agent examples. Ensure this is running before executing individual workflows. ```bash uv run openai_agents/basic/run_worker.py ``` -------------------------------- ### Run Workflow Starter Source: https://github.com/temporalio/samples-python/blob/main/message_passing/waiting_for_handlers_and_compensation/README.md Execute the starter script to initiate a workflow. This command starts the workflow using 'uv'. ```bash uv run message_passing/waiting_for_handlers_and_compensation/starter.py ``` -------------------------------- ### Run Worker Source: https://github.com/temporalio/samples-python/blob/main/openai_agents/agent_patterns/README.md Starts the Temporal worker that supports all agent patterns. Ensure this is running before executing individual examples. ```bash uv run openai_agents/agent_patterns/run_worker.py ``` -------------------------------- ### Example Query - Bash Source: https://github.com/temporalio/samples-python/blob/main/openai_agents/financial_research_agent/README.md An example of a query to input when running the financial research workflow. You can also press Enter to use the default query. ```bash Write up an analysis of Apple Inc.'s most recent quarter. ``` -------------------------------- ### Starter Script Output Source: https://github.com/temporalio/samples-python/blob/main/worker_multiprocessing/README.md Example output from the starter script, illustrating the execution of multiple workflows with associated activity PIDs. ```bash uv run worker_multiprocessing/starter.py wf-starting-pid:19178 | activity-pid:19180 | wf-ending-pid:19178 wf-starting-pid:19179 | activity-pid:19180 | wf-ending-pid:19179 wf-starting-pid:19178 | activity-pid:19180 | wf-ending-pid:19178 wf-starting-pid:19179 | activity-pid:19180 | wf-ending-pid:19179 wf-starting-pid:19178 | activity-pid:19180 | wf-ending-pid:19178 wf-starting-pid:19179 | activity-pid:19180 | wf-ending-pid:19179 wf-starting-pid:19178 | activity-pid:19180 | wf-ending-pid:19178 wf-starting-pid:19179 | activity-pid:19180 | wf-ending-pid:19179 wf-starting-pid:19178 | activity-pid:19180 | wf-ending-pid:19178 wf-starting-pid:19179 | activity-pid:19180 | wf-ending-pid:19179 wf-starting-pid:19178 | activity-pid:19180 | wf-ending-pid:19178 wf-starting-pid:19179 | activity-pid:19180 | wf-ending-pid:19179 wf-starting-pid:19178 | activity-pid:19180 | wf-ending-pid:19178 wf-starting-pid:19179 | activity-pid:19180 | wf-ending-pid:19179 wf-starting-pid:19178 | activity-pid:19180 | wf-ending-pid:19178 wf-starting-pid:19179 | activity-pid:19180 | wf-ending-pid:19179 wf-starting-pid:19178 | activity-pid:19180 | wf-ending-pid:19178 wf-starting-pid:19179 | activity-pid:19180 | wf-ending-pid:19179 wf-starting-pid:19179 | activity-pid:19180 | wf-ending-pid:19179 wf-starting-pid:19178 | activity-pid:19180 | wf-ending-pid:19178 wf-starting-pid:19179 | activity-pid:19180 | wf-ending-pid:19179 wf-starting-pid:19178 | activity-pid:19180 | wf-ending-pid:19178 wf-starting-pid:19179 | activity-pid:19180 | wf-ending-pid:19179 wf-starting-pid:19178 | activity-pid:19180 | wf-ending-pid:19178 wf-starting-pid:19178 | activity-pid:19180 | wf-ending-pid:19178 ``` -------------------------------- ### Install Python Version with uv Source: https://github.com/temporalio/samples-python/blob/main/README.md Use uv to install a specific Python version, such as 3.13, for your project. ```bash uv python install 3.13 ``` -------------------------------- ### Synchronize Dependencies with uv Source: https://github.com/temporalio/samples-python/blob/main/README.md After cloning the repository, run this command at the root to install all required dependencies using uv. ```bash uv sync ``` -------------------------------- ### Run LangGraph Workflow Starter Source: https://github.com/temporalio/samples-python/blob/main/langgraph_plugin/README.md Start the workflow for a LangGraph sample. Replace and with the specific API style and sample name. ```bash uv run langgraph_plugin///run_workflow.py ``` -------------------------------- ### Start Dev Server with Update Workflow Enabled Source: https://github.com/temporalio/samples-python/blob/main/hello/README.md Start the Temporal development server with the 'enableUpdateWorkflowExecution' dynamic config value set to true to enable workflow updates. ```bash temporal server start-dev --dynamic-config-value frontend.enableUpdateWorkflowExecution=true ``` -------------------------------- ### Start Standalone Activity (Without Waiting) Source: https://github.com/temporalio/samples-python/blob/main/hello_standalone_activity/README.md Starts a standalone activity, obtains a handle, and then waits for the result. This can be achieved via a Python script or the Temporal CLI. ```bash uv run hello_standalone_activity/start_activity.py ``` ```bash temporal activity start \ --type compose_greeting \ --activity-id my-standalone-activity-id \ --task-queue my-standalone-activity-task-queue \ --start-to-close-timeout 10s \ --input '{"greeting": "Hello", "name": "World"}' ``` -------------------------------- ### Start Worker Source: https://github.com/temporalio/samples-python/blob/main/updatable_timer/README.md Starts the worker process for hosting Workflow Executions. Ensure this is running before starting workflows. ```bash uv run updatable_timer/worker.py ``` -------------------------------- ### Run LangGraph Tracing Sample Source: https://github.com/temporalio/samples-python/blob/main/langgraph_plugin/graph_api/langsmith_tracing/README.md Execute the main Python script to start a Temporal Worker and run the LangGraph workflow with LangSmith tracing enabled. Ensure you have the necessary prerequisites installed and a Temporal dev server running. ```bash uv run langgraph_plugin/graph_api/langsmith_tracing/main.py ``` -------------------------------- ### Start OpenTelemetry Collector Source: https://github.com/temporalio/samples-python/blob/main/open_telemetry/README.md Launch the Aspire OTEL collector using Docker Compose. Ensure this is running before starting the Temporal worker and starter. ```bash docker compose up ``` -------------------------------- ### Install Dependencies for LangSmith Tracing Source: https://github.com/temporalio/samples-python/blob/main/langsmith_tracing/README.md Installs the necessary dependencies for LangSmith tracing. Ensure you are in the correct project directory. ```bash uv sync --group langsmith-tracing ``` -------------------------------- ### Start Workflow Execution Source: https://github.com/temporalio/samples-python/blob/main/updatable_timer/README.md Initiates a Workflow Execution. This should be run after the worker has started. ```bash uv run updatable_timer/starter.py ``` -------------------------------- ### Install Gevent Dependency Source: https://github.com/temporalio/samples-python/blob/main/gevent_async/README.md Include the optional 'gevent' dependency group to enable gevent support. Run this command to install. ```bash uv sync --group gevent ``` -------------------------------- ### Run the Worker Source: https://github.com/temporalio/samples-python/blob/main/external_storage/README.md Starts the Temporal worker process for the external storage sample. ```bash uv run external_storage/worker.py ``` -------------------------------- ### Run Nexus Caller App Source: https://github.com/temporalio/samples-python/blob/main/nexus_cancel/README.md Start the Nexus caller application using uv. ```bash uv run nexus_cancel/caller/app.py ``` -------------------------------- ### Start Workflow Execution Source: https://github.com/temporalio/samples-python/blob/main/lambda_worker/README.md Use the starter program to initiate a Workflow execution on the Lambda worker. Ensure the TEMPORAL_CONFIG_FILE environment variable points to your `temporal.toml` configuration. ```bash TEMPORAL_CONFIG_FILE=temporal.toml uv run python starter.py ``` -------------------------------- ### Run Resource User Workflows Starter Source: https://github.com/temporalio/samples-python/blob/main/resource_pool/README.md Execute this command in a separate terminal to start several ResourceUserWorkflows that will request resources from the pool. ```bash uv run resource_pool/starter.py ``` -------------------------------- ### Start Worker Version 1.1 Source: https://github.com/temporalio/samples-python/blob/main/worker_versioning/README.md Run the worker for version 1.1 of the application. ```bash uv run worker_versioning/workerv1_1.py ``` -------------------------------- ### Run Prompt Server MCP Server Source: https://github.com/temporalio/samples-python/blob/main/openai_agents/mcp/README.md Starts the MCP server for the Prompt Server transport. This should be run before starting the worker. ```bash uv run openai_agents/mcp/servers/prompt_server.py ``` -------------------------------- ### Start Patched Workflow Source: https://github.com/temporalio/samples-python/blob/main/patching/README.md Starts a new workflow using the patched code. This demonstrates running new workflows with updated logic. ```bash uv run patching/starter.py --start-workflow patched-workflow-id ``` -------------------------------- ### Start Worker Version 1.0 Source: https://github.com/temporalio/samples-python/blob/main/worker_versioning/README.md Run the worker for version 1.0 of the application. ```bash uv run worker_versioning/workerv1.py ``` -------------------------------- ### Run Nexus Handler Worker Source: https://github.com/temporalio/samples-python/blob/main/nexus_cancel/README.md Start the Nexus handler worker using uv. ```bash uv run nexus_cancel/handler/worker.py ``` -------------------------------- ### Run SSE MCP Server Source: https://github.com/temporalio/samples-python/blob/main/openai_agents/mcp/README.md Starts the MCP server for the SSE (Server-Sent Events) transport. This should be run before starting the worker. ```bash uv run openai_agents/mcp/servers/tools_server.py --transport=sse ``` -------------------------------- ### Run Trio Async Starter Source: https://github.com/temporalio/samples-python/blob/main/trio_async/README.md Execute the workflow starter in a separate terminal after the worker has started. This command initiates the Temporal workflow. ```bash uv run trio_async/starter.py ``` -------------------------------- ### Start Worker Version 2.0 Source: https://github.com/temporalio/samples-python/blob/main/worker_versioning/README.md Run the worker for version 2.0 of the application. ```bash uv run worker_versioning/workerv2.py ``` -------------------------------- ### Install Sentry Dependency Group Source: https://github.com/temporalio/samples-python/blob/main/sentry/README.md To include the optional `sentry` dependency group, run this command. Ensure `gevent` is not installed to avoid conflicts. ```bash uv sync --no-default-groups --dev --group sentry ``` -------------------------------- ### Run Worker Source: https://github.com/temporalio/samples-python/blob/main/langgraph_plugin/functional_api/continue_as_new/README.md Registers tasks and entrypoint with LangGraphPlugin and starts the Worker. Ensure Temporal dev server is running. ```bash uv run langgraph_plugin/functional_api/continue_as_new/run_worker.py ``` -------------------------------- ### Run Hello World Workflow Source: https://github.com/temporalio/samples-python/blob/main/openai_agents/basic/README.md Executes a basic 'Hello World' agent workflow that responds in haikus. Run this in a separate terminal after starting the worker. ```bash uv run openai_agents/basic/run_hello_world_workflow.py ``` -------------------------------- ### Run the Starter Source: https://github.com/temporalio/samples-python/blob/main/external_storage/README.md Initiates the workflow execution for the external storage sample. ```bash uv run external_storage/starter.py ``` -------------------------------- ### Start Deprecated Patch Workflow Source: https://github.com/temporalio/samples-python/blob/main/patching/README.md Starts a new workflow using the deprecated patch code. This shows how to initiate workflows after deprecating the original code. ```bash uv run patching/starter.py --start-workflow patch-deprecated-workflow-id ``` -------------------------------- ### Run hello_activity.py Sample Source: https://github.com/temporalio/samples-python/blob/main/hello/README.md Execute the hello_activity.py sample from the root directory. Ensure prerequisites are met by consulting the main README.md. ```bash uv run hello/hello_activity.py ``` -------------------------------- ### Run Initial Worker Source: https://github.com/temporalio/samples-python/blob/main/patching/README.md Starts the worker with the initial workflow code. Use this for existing running workflows. ```bash uv run patching/worker.py --workflow initial ``` -------------------------------- ### Run Bedrock Worker Source: https://github.com/temporalio/samples-python/blob/main/bedrock/basic/README.md Execute this command in a terminal to start the worker process for the Bedrock sample. ```bash uv run bedrock/basic/run_worker.py ``` -------------------------------- ### Run Resource Pool Worker Source: https://github.com/temporalio/samples-python/blob/main/resource_pool/README.md Execute this command from the root directory to start the worker for the resource pool sample. ```bash uv run resource_pool/worker.py ``` -------------------------------- ### Setup Knowledge Base Source: https://github.com/temporalio/samples-python/blob/main/openai_agents/tools/README.md Run this script to create a vector store with sample documents for file search testing. It uploads files to OpenAI, creates an assistant with vector store capabilities, and updates workflow files. ```bash uv run openai_agents/tools/setup_knowledge_base.py ``` -------------------------------- ### Run a Sample with uv Source: https://github.com/temporalio/samples-python/blob/main/README.md Execute a sample script, like 'hello_activity.py', using uv to ensure it runs with the correct environment and dependencies. ```bash uv run hello/hello_activity.py ``` -------------------------------- ### Run Chatbot Worker and Starter Source: https://github.com/temporalio/samples-python/blob/main/langsmith_tracing/chatbot/README.md Start the chatbot worker in one terminal and the interactive CLI in another to run the application. ```bash # Terminal 1 — start the worker uv run --group langsmith-tracing python -m langsmith_tracing.chatbot.worker # Terminal 2 — interactive CLI uv run --group langsmith-tracing python -m langsmith_tracing.chatbot.starter ``` -------------------------------- ### Run Codec Server Source: https://github.com/temporalio/samples-python/blob/main/encryption/README.md Starts the codec server, which is necessary to decrypt and view workflow data when using external Temporal tools. ```bash uv run encryption/codec_server.py ``` -------------------------------- ### Starter Script Help Source: https://github.com/temporalio/samples-python/blob/main/worker_multiprocessing/README.md View the command-line arguments for the starter script to control the number of workflows to execute. ```bash uv run worker_multiprocessing/starter.py -h ``` -------------------------------- ### Run Routing Workflow Source: https://github.com/temporalio/samples-python/blob/main/openai_agents/agent_patterns/README.md Executes an agent routing workflow example. This pattern routes requests to specialized agents based on content analysis. ```bash uv run openai_agents/agent_patterns/run_routing_workflow.py ``` -------------------------------- ### Run Input Guardrails Workflow Source: https://github.com/temporalio/samples-python/blob/main/openai_agents/agent_patterns/README.md Executes an input guardrails workflow example. This pattern demonstrates pre-execution validation to prevent unwanted requests. ```bash uv run openai_agents/agent_patterns/run_input_guardrails_workflow.py ``` -------------------------------- ### Run Output Guardrails Workflow Source: https://github.com/temporalio/samples-python/blob/main/openai_agents/agent_patterns/README.md Executes an output guardrails workflow example. This pattern demonstrates post-execution validation to detect sensitive content. ```bash uv run openai_agents/agent_patterns/run_output_guardrails_workflow.py ``` -------------------------------- ### Run Worker for MCP Workflows Source: https://github.com/temporalio/samples-python/blob/main/openai_agents/hosted_mcp/README.md Start the Temporal worker that supports all MCP workflows. This is a prerequisite for running the example workflows. ```bash uv run openai_agents/hosted_mcp/run_worker.py ``` -------------------------------- ### Run LLM-as-a-Judge Workflow Source: https://github.com/temporalio/samples-python/blob/main/openai_agents/agent_patterns/README.md Executes an LLM-as-a-Judge workflow example. This pattern uses iterative feedback loops for content generation and evaluation. ```bash uv run openai_agents/agent_patterns/run_llm_as_a_judge_workflow.py ``` -------------------------------- ### Install OpenTelemetry Dependency Source: https://github.com/temporalio/samples-python/blob/main/open_telemetry/README.md Include the optional 'open_telemetry' dependency group to enable OpenTelemetry support. Run this command in your terminal. ```bash uv sync --group open-telemetry ``` -------------------------------- ### Run Starter Source: https://github.com/temporalio/samples-python/blob/main/context_propagation/README.md Execute the workflow starter to initiate a workflow. This will trigger the execution and demonstrate context propagation. ```bash uv run context_propagation/starter.py ``` -------------------------------- ### Install Pydantic Converter Dependency Source: https://github.com/temporalio/samples-python/blob/main/pydantic_converter/README.md Include the optional `pydantic-converter` dependency group to enable Pydantic support. ```bash uv sync --group pydantic-converter ``` -------------------------------- ### Run LiteLLM Provider Worker Source: https://github.com/temporalio/samples-python/blob/main/openai_agents/model_providers/README.md Starts the LiteLLM provider worker. Ensure the required environment variable for your chosen provider is set. ```bash # Set the required environment variable for your chosen provider export ANTHROPIC_API_KEY="your_anthropic_api_key" # For Anthropic uv run openai_agents/model_providers/run_litellm_provider_worker.py ``` -------------------------------- ### Run Encryption Worker Source: https://github.com/temporalio/samples-python/blob/main/encryption/README.md Starts the Temporal worker that handles encryption/decryption logic. Ensure the 'encryption' dependency group is installed. ```bash uv run encryption/worker.py ``` -------------------------------- ### Run Worker Source: https://github.com/temporalio/samples-python/blob/main/openai_agents/tools/README.md Start the Temporal worker that supports all integrated OpenAI agent tools. This command should be run before executing individual example workflows. ```bash uv run openai_agents/tools/run_worker.py ``` -------------------------------- ### Run Custom Converter Starter Source: https://github.com/temporalio/samples-python/blob/main/custom_converter/README.md Execute the starter script to run a workflow that utilizes the custom converter. This verifies the custom converter's integration. ```bash uv run custom_converter/starter.py ``` -------------------------------- ### Pull GPT-OSS Model Source: https://github.com/temporalio/samples-python/blob/main/openai_agents/model_providers/README.md Downloads the `gpt-oss` model from Ollama. This step is necessary before running the GPT-OSS worker and example. ```bash ollama pull gpt-oss:20b ``` -------------------------------- ### Run Parallelization Workflow Source: https://github.com/temporalio/samples-python/blob/main/openai_agents/agent_patterns/README.md Executes a parallelization workflow example. This pattern runs multiple agents concurrently to improve quality or reduce latency. ```bash uv run openai_agents/agent_patterns/run_parallelization_workflow.py ``` -------------------------------- ### Worker Script Output Source: https://github.com/temporalio/samples-python/blob/main/worker_multiprocessing/README.md Example output when running the worker script, showing the startup and shutdown of workflow and activity workers. ```bash uv run worker_multiprocessing/worker.py starting 2 workflow worker(s) and 1 activity worker(s) waiting for keyboard interrupt or for all workers to exit workflow-worker:0 starting workflow-worker:1 starting activity-worker:0 starting workflow-worker:0 shutting down activity-worker:0 shutting down workflow-worker:1 shutting down ``` -------------------------------- ### Run Trio Async Worker Source: https://github.com/temporalio/samples-python/blob/main/trio_async/README.md Start the Temporal worker using Trio asyncio. This command should be run from the root directory of the project. ```bash uv run trio_async/worker.py ``` -------------------------------- ### Running the ReAct Agent Sample Source: https://github.com/temporalio/samples-python/blob/main/langgraph_plugin/functional_api/react_agent/README.md Provides commands to run the ReAct agent sample. Ensure prerequisites like `uv sync --group langgraph` and a running Temporal dev server are met before execution. ```bash # Terminal 1 uv run langgraph_plugin/functional_api/react_agent/run_worker.py # Terminal 2 uv run langgraph_plugin/functional_api/react_agent/run_workflow.py ``` -------------------------------- ### Run Custom Converter Worker Source: https://github.com/temporalio/samples-python/blob/main/custom_converter/README.md Start the Temporal worker with the custom converter configured. Ensure prerequisites are met before running. ```bash uv run custom_converter/worker.py ``` -------------------------------- ### Run Temporal Worker Source: https://github.com/temporalio/samples-python/blob/main/cloud_export_to_parquet/README.md Start the Temporal worker for the cloud export to parquet sample. Ensure prerequisites are met before running. ```bash uv run cloud_export_to_parquet/run_worker.py ``` -------------------------------- ### Create Nexus Namespaces and Endpoint Source: https://github.com/temporalio/samples-python/blob/main/nexus_multiple_args/README.md Sets up the necessary Temporal namespaces and a Nexus endpoint for the sample. Ensure a Temporal server is running before executing. ```bash temporal operator namespace create --namespace nexus-multiple-args-handler-namespace temporal operator namespace create --namespace nexus-multiple-args-caller-namespace temporal operator nexus endpoint create \ --name nexus-multiple-args-nexus-endpoint \ --target-namespace nexus-multiple-args-handler-namespace \ --target-task-queue nexus-multiple-args-handler-task-queue ``` -------------------------------- ### Run Worker and Workflow Source: https://github.com/temporalio/samples-python/blob/main/langgraph_plugin/functional_api/control_flow/README.md These commands start the Temporal worker and the workflow respectively. Ensure a Temporal dev server is running before execution. ```bash # Terminal 1 uv run langgraph_plugin/functional_api/control_flow/run_worker.py # Terminal 2 uv run langgraph_plugin/functional_api/control_flow/run_workflow.py ``` -------------------------------- ### Run Tools Workflow Source: https://github.com/temporalio/samples-python/blob/main/openai_agents/basic/README.md Executes a workflow demonstrating an agent with access to external tools, such as a simulated weather API. Run this in a separate terminal after starting the worker. ```bash uv run openai_agents/basic/run_tools_workflow.py ``` -------------------------------- ### Start Handler Worker Source: https://github.com/temporalio/samples-python/blob/main/nexus_messaging/callerpattern/README.md Start the handler worker process for the Nexus messaging system. ```bash uv run python -m nexus_messaging.callerpattern.handler.worker ``` -------------------------------- ### Run LangGraph Worker Source: https://github.com/temporalio/samples-python/blob/main/langgraph_plugin/README.md Start the Temporal worker for a LangGraph sample. Replace and with the specific API style and sample name. ```bash uv run langgraph_plugin///run_worker.py ``` -------------------------------- ### Query Initial Workflow Source: https://github.com/temporalio/samples-python/blob/main/patching/README.md Queries the status of a workflow started with the initial code. This helps verify the workflow's state before patching. ```bash uv run patching/starter.py --query-workflow initial-workflow-id ``` -------------------------------- ### Run Pydantic Converter Starter Source: https://github.com/temporalio/samples-python/blob/main/pydantic_converter/README.md Execute the starter script to initiate a workflow that utilizes Pydantic models. ```bash uv run pydantic_converter/starter.py ``` -------------------------------- ### Run Deterministic Workflow Source: https://github.com/temporalio/samples-python/blob/main/openai_agents/agent_patterns/README.md Executes a deterministic flow example. This pattern breaks complex tasks into smaller, sequential agent steps with validation. ```bash uv run openai_agents/agent_patterns/run_deterministic_workflow.py ``` -------------------------------- ### Create Nexus Namespace and Endpoint Source: https://github.com/temporalio/samples-python/blob/main/nexus_cancel/README.md Use Temporal CLI commands to set up the necessary namespaces and Nexus endpoint for the cancellation sample. ```bash temporal operator namespace create --namespace nexus-cancel-handler-namespace temporal operator namespace create --namespace nexus-cancel-caller-namespace temporal operator nexus endpoint create \ --name nexus-cancel-endpoint \ --target-namespace nexus-cancel-handler-namespace \ --target-task-queue nexus-cancel-handler-task-queue ``` -------------------------------- ### Start Mock S3 Service Source: https://github.com/temporalio/samples-python/blob/main/external_storage/README.md Launches a local S3-compatible mock service on port 5000. This service is required for the sample to function without an AWS account or Docker. ```bash uv run external_storage/s3.py ``` -------------------------------- ### Run Encryption Starter Source: https://github.com/temporalio/samples-python/blob/main/encryption/README.md Executes the starter script to initiate a workflow that utilizes the encryption codec. This requires the worker to be running. ```bash uv run encryption/starter.py ``` -------------------------------- ### Run SSE MCP Worker Source: https://github.com/temporalio/samples-python/blob/main/openai_agents/mcp/README.md Starts the worker for the SSE MCP transport. This command should be run after the MCP server is started. ```bash uv run openai_agents/mcp/run_sse_worker.py ``` -------------------------------- ### Run Temporal Workflow Starter with Gevent Source: https://github.com/temporalio/samples-python/blob/main/gevent_async/README.md Execute the starter script to initiate a workflow. This script is designed to work with the gevent-patched worker. ```bash uv run gevent_async/starter.py ``` -------------------------------- ### Run Streamable HTTP Worker Source: https://github.com/temporalio/samples-python/blob/main/openai_agents/mcp/README.md Starts the worker for the Streamable HTTP MCP transport. This command should be run after starting the MCP server. ```bash uv run openai_agents/mcp/run_streamable_http_worker.py ``` -------------------------------- ### Start Codec Server Source: https://github.com/temporalio/samples-python/blob/main/external_storage/README.md Launches the codec server, which decompresses payloads on demand for the Temporal Web UI. This is optional but useful for inspecting compressed and externally stored data. ```bash uv run external_storage/codec_server.py ``` -------------------------------- ### Run Agents as Tools Workflow Source: https://github.com/temporalio/samples-python/blob/main/openai_agents/agent_patterns/README.md Executes an agents as tools workflow example. This pattern demonstrates using agents as callable tools within other agents for composition and delegation. ```bash uv run openai_agents/agent_patterns/run_agents_as_tools_workflow.py ``` -------------------------------- ### Run Streamable HTTP MCP Worker Source: https://github.com/temporalio/samples-python/blob/main/openai_agents/mcp/README.md Starts the worker for the Streamable HTTP MCP transport. This command should be run before starting the workflow. ```bash uv run openai_agents/mcp/servers/tools_server.py --transport=streamable-http ``` -------------------------------- ### Run Prompt Server MCP Worker Source: https://github.com/temporalio/samples-python/blob/main/openai_agents/mcp/README.md Starts the worker for the Prompt Server MCP transport. This command should be run after the MCP server is started. ```bash uv run openai_agents/mcp/run_prompt_server_worker.py ``` -------------------------------- ### Run Web Search Workflow Source: https://github.com/temporalio/samples-python/blob/main/openai_agents/tools/README.md Execute the workflow that demonstrates the Web Search tool for searching the web with location context. ```bash uv run openai_agents/tools/run_web_search_workflow.py ``` -------------------------------- ### Run Caller Worker and Start Workflow Source: https://github.com/temporalio/samples-python/blob/main/nexus_multiple_args/README.md Starts the Temporal worker in the caller namespace and initiates the caller workflow. This workflow will interact with the Nexus endpoint. ```bash uv run nexus_multiple_args/caller/app.py ``` -------------------------------- ### Start Patch Complete Workflow Source: https://github.com/temporalio/samples-python/blob/main/patching/README.md Starts a new workflow using the patch complete code. This signifies the final state after all patching and deprecation stages are finished. ```bash uv run patching/starter.py --start-workflow patch-complete-workflow-id ``` -------------------------------- ### Run Temporal Workflow Starter Source: https://github.com/temporalio/samples-python/blob/main/sentry/README.md Execute the workflow starter script in a separate terminal to initiate a workflow that is expected to fail and report errors to Sentry. ```bash uv run sentry/starter.py ``` -------------------------------- ### Run Worker and Starter Scripts Source: https://github.com/temporalio/samples-python/blob/main/worker_multiprocessing/README.md Execute the worker and starter scripts from the root directory. These scripts accept arguments to modify their behavior. ```bash uv run worker_multiprocessing/worker.py ``` ```bash uv run worker_multiprocessing/starter.py ``` -------------------------------- ### Create Namespaces and Nexus Endpoint Source: https://github.com/temporalio/samples-python/blob/main/nexus_messaging/callerpattern/README.md Create necessary namespaces and a Nexus endpoint for the messaging system. ```bash temporal operator namespace create --namespace nexus-messaging-handler-namespace temporal operator namespace create --namespace nexus-messaging-caller-namespace temporal operator nexus endpoint create \ --name nexus-messaging-nexus-endpoint \ --target-namespace nexus-messaging-handler-namespace \ --target-task-queue nexus-messaging-handler-task-queue ``` -------------------------------- ### Run Simple MCP Connection Workflow Source: https://github.com/temporalio/samples-python/blob/main/openai_agents/hosted_mcp/README.md Execute a Temporal workflow that connects to a hosted MCP server without requiring approval for trusted servers. ```bash uv run openai_agents/hosted_mcp/run_simple_mcp_workflow.py ``` -------------------------------- ### Run Forcing Tool Use Workflow Source: https://github.com/temporalio/samples-python/blob/main/openai_agents/agent_patterns/README.md Executes a forcing tool use workflow example. This pattern controls tool execution strategies, allowing selection between different approaches. ```bash uv run openai_agents/agent_patterns/run_forcing_tool_use_workflow.py ``` -------------------------------- ### Run Research Bot Workflow Source: https://github.com/temporalio/samples-python/blob/main/openai_agents/research_bot/README.md Executes the main research workflow. This should be run after the worker has started. ```bash uv run openai_agents/research_bot/run_research_workflow.py ``` -------------------------------- ### Run Worker with LangGraph Plugin Source: https://github.com/temporalio/samples-python/blob/main/langgraph_plugin/graph_api/continue_as_new/README.md Builds the graph, registers it with the LangGraphPlugin, and starts the Temporal worker. ```python from temporalio import workflow from temporalio.worker import Worker from langgraph_plugin import LangGraphPlugin from .workflow import PipelineWorkflow def main(): # Build graph and register with LangGraphPlugin plugin = LangGraphPlugin() plugin.register_graph(PipelineWorkflow) # Start Worker worker = Worker( client=workflow.client, task_queue="langgraph-continue-as-new", workflows=[PipelineWorkflow], plugins=[plugin], ) worker.run() if __name__ == "__main__": main() ``` -------------------------------- ### Run LangGraph Worker Source: https://github.com/temporalio/samples-python/blob/main/langgraph_plugin/graph_api/human_in_the_loop/README.md Starts the LangGraph worker to process workflows. Ensure Temporal is running. ```bash uv run langgraph_plugin/graph_api/human_in_the_loop/run_worker.py ``` -------------------------------- ### Run Temporal Worker Source: https://github.com/temporalio/samples-python/blob/main/replay/README.md Start the Temporal worker to process workflows. Ensure prerequisites are met before running. ```bash uv run replay/worker.py ``` -------------------------------- ### Run SSE MCP Workflow Source: https://github.com/temporalio/samples-python/blob/main/openai_agents/mcp/README.md Executes the workflow for the SSE MCP transport. This should be run after the worker is started. ```bash uv run openai_agents/mcp/run_sse_workflow.py ``` -------------------------------- ### Run Worker Source: https://github.com/temporalio/samples-python/blob/main/context_propagation/README.md Start the Temporal worker to process workflows and activities. Ensure prerequisites are met before running. ```bash uv run context_propagation/worker.py ``` -------------------------------- ### Run Pydantic Converter Worker Source: https://github.com/temporalio/samples-python/blob/main/pydantic_converter/README.md Start the Temporal worker that will process workflows and activities using Pydantic models. ```bash uv run pydantic_converter/worker.py ``` -------------------------------- ### Create Namespaces and Nexus Endpoint Source: https://github.com/temporalio/samples-python/blob/main/hello_nexus/README.md Use Temporal operator commands to create necessary namespaces and configure the Nexus endpoint, specifying target namespace, task queue, and a description file. ```bash temporal operator namespace create --namespace hello-nexus-basic-handler-namespace temporal operator namespace create --namespace hello-nexus-basic-caller-namespace temporal operator nexus endpoint create \ --name hello-nexus-basic-nexus-endpoint \ --target-namespace hello-nexus-basic-handler-namespace \ --target-task-queue my-handler-task-queue \ --description-file hello_nexus/endpoint_description.md ``` -------------------------------- ### Run Streamable HTTP Workflow Source: https://github.com/temporalio/samples-python/blob/main/openai_agents/mcp/README.md Executes the workflow for the Streamable HTTP MCP transport. This should be run after the worker is started. ```bash uv run openai_agents/mcp/run_streamable_http_workflow.py ``` -------------------------------- ### Run Customer Service Client Source: https://github.com/temporalio/samples-python/blob/main/openai_agents/customer_service/README.md Initiate a customer service conversation using the client. Provide a unique conversation ID to start a new chat or resume an existing one. ```bash uv run openai_agents/customer_service/run_customer_service_client.py --conversation-id my-conversation-123 ``` -------------------------------- ### Run Research Bot Worker Source: https://github.com/temporalio/samples-python/blob/main/openai_agents/research_bot/README.md Starts the Temporal worker for the research bot. Ensure this is running before executing the workflow. ```bash uv run openai_agents/research_bot/run_worker.py ``` -------------------------------- ### Run Stdio MCP Worker Source: https://github.com/temporalio/samples-python/blob/main/openai_agents/mcp/README.md Starts the worker for the Stdio MCP transport. Ensure the worker and workflow are on the same machine. ```bash uv run openai_agents/mcp/run_file_system_worker.py ``` -------------------------------- ### Run Worker - Bash Source: https://github.com/temporalio/samples-python/blob/main/openai_agents/financial_research_agent/README.md Start the Temporal worker for the financial research agent. Ensure this is running before executing the workflow. ```bash uv run openai_agents/financial_research_agent/run_worker.py ```