Skip to content

Agent directed workflow samples python#273

Open
greenie-msft wants to merge 2 commits intomainfrom
agent-directed-workflow-samples-python
Open

Agent directed workflow samples python#273
greenie-msft wants to merge 2 commits intomainfrom
agent-directed-workflow-samples-python

Conversation

@greenie-msft
Copy link
Copy Markdown
Collaborator

This pull request introduces a new sample for building agent-directed workflows using Azure Durable Functions in Python. It provides a complete implementation of an LLM-driven agent loop, including durable entity management, Redis-based pub/sub for response streaming, and integration with Azure OpenAI and custom tools. The sample includes code, configuration, and documentation to help users run and extend the solution.

The most important changes are:

Core Implementation:

  • Added function_app.py implementing a durable entity-based chat agent, HTTP endpoints for interacting with the agent, Redis pub/sub for streaming responses, and integration with Azure OpenAI and tools.
  • Added tools.py defining tool schemas (e.g., get_weather) and execution logic, enabling the agent to call external functions as part of the agent loop.

Configuration and Dependencies:

  • Added host.json to configure Durable Task Scheduler integration, logging, and extension bundles for the Azure Functions host.
  • Added requirements.txt specifying all necessary Python dependencies, including Azure Functions, Durable Functions, Redis, OpenAI, and Azure Identity libraries.

Documentation:

  • Added a comprehensive README.md describing agent-directed workflows, how the sample works, setup instructions, API reference, and differences from the Durable Task SDK version.

greenie-msft and others added 2 commits April 20, 2026 14:48
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ctions

- Durable Task SDK sample: FastAPI app with durable entity-based chat agent,
  SSE streaming via Redis pub/sub, echo fallback when no Azure OpenAI configured
- Durable Functions sample: Azure Functions v2 (Python) with DFApp, entity-based
  chat agent, async Redis pub/sub collection via asyncio.to_thread()
- Both samples tested end-to-end with DTS emulator and Redis

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant