Runtimes · Microsoft Agent Framework

Microsoft Agent Framework Quickstart

This runs the example from a clone of the monorepo. The backend is a uvicorn process on port 5330; the Angular dev server is on port 4330 and proxies /agent to it.

Prerequisites

Node.js 20 or newer, Python 3.11 or newer, uv, and either an Azure OpenAI resource or an OpenAI API key.

1
Install workspace dependencies
git clone https://github.com/cacheplane/angular-agent-framework.git
cd angular-agent-framework
npm ci
2
Configure the backend environment

Copy the example file and fill in whichever model path you are using.

cp cockpit/runtimes/microsoft-agent-framework/python/.env.example \
   cockpit/runtimes/microsoft-agent-framework/python/.env

Azure OpenAI is the default path. Setting AZURE_OPENAI_ENDPOINT selects it; leaving it unset selects the OpenAI fallback.

VariableRequiredPurpose
AZURE_OPENAI_ENDPOINTFor AzureResource endpoint. Its presence is what selects the Azure path.
AZURE_OPENAI_API_KEYFor AzureKey authentication against that resource.
AZURE_OPENAI_MODELFor AzureDeployment name of a chat model, not a public model id.
AZURE_OPENAI_API_VERSIONNoDefaults to 2024-12-01-preview.
OPENAI_API_KEYFor the fallbackUsed only when AZURE_OPENAI_ENDPOINT is unset.
OPENAI_CHAT_MODELNoModel name for the fallback path.
OPENAI_BASE_URLNoRedirects the OpenAI client. The end-to-end fixture harness sets this to replay recorded calls.
AZURE_OPENAI_MODEL is a deployment name

Azure addresses models by the deployment name you chose in your resource, which is frequently not the public model id. A valid key paired with a public model id fails as a missing deployment.

3
Start both halves
npx tsx apps/cockpit/scripts/serve-example.ts --capability=rt-maf

The script runs uv sync in cockpit/runtimes/microsoft-agent-framework/python on the way, so the first start takes longer than later ones.

4
Open the app

Visit http://localhost:4330. The backend answers on http://localhost:5330/agent, with an unauthenticated health check at http://localhost:5330/ok.

5
Exercise every surface
  1. "What is the policy on client dinners?" — streams a message and calls lookup_expense_policy.
  2. "Submit a 96 dollar client dinner from last Tuesday." — the expense argument streams into shared state while the model writes it, then submit_expense pauses for approval.
  3. Approve or decline the card — the run resumes and the agent confirms the outcome.

Next steps

  • How It Connects — the wire conventions this example relies on.
  • Overview — what the integration does and does not support.