Files
agent-framework/python/samples/04-hosting/azure_functions
T
Eduard van Valkenburg 3446eb8d5d Python: [BREAKING] update to v1.0.0 (#5062)
* updates to final deprecated pieces and versions

* fix mypy

* fix readme links
3446eb8d5d · 2026-04-02 15:26:30 +00:00
History
..

These are common instructions for setting up your environment for every sample in this directory. These samples illustrate the Durable extensibility for Agent Framework running in Azure Functions.

All of these samples are set up to run in Azure Functions. Azure Functions has a local development tool called CoreTools which we will set up to run these samples locally.

Environment Setup

1. Install dependencies and create appropriate services

2. Create and activate a virtual environment

Windows (PowerShell):

python -m venv .venv
.venv\Scripts\Activate.ps1

Linux/macOS:

python -m venv .venv
source .venv/bin/activate

3. Running the samples

  • Start the Azurite emulator

  • Inside each sample:

    • Install Python dependencies from the sample directory, run pip install -r requirements.txt (or the equivalent in your active virtual environment).

    • Copy local.settings.json.template to local.settings.json, then update FOUNDRY_PROJECT_ENDPOINT and FOUNDRY_MODEL. The samples use AzureCliCredential, so ensure you're logged in via az login.

      • Keep TASKHUB_NAME set to default unless you plan to change the durable task hub name.
    • Run the command func start from the root of the sample

    • Follow each sample's README for scenario-specific steps, and use its demo.http file (or provided curl examples) to trigger the hosted HTTP endpoints.