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.
Node.js 20 or newer, Python 3.11 or newer, uv, and either an Azure OpenAI resource or an OpenAI API key.
git clone https://github.com/cacheplane/angular-agent-framework.git
cd angular-agent-framework
npm ciCopy 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/.envAzure OpenAI is the default path. Setting AZURE_OPENAI_ENDPOINT selects it; leaving it unset selects the OpenAI fallback.
| Variable | Required | Purpose |
|---|---|---|
AZURE_OPENAI_ENDPOINT | For Azure | Resource endpoint. Its presence is what selects the Azure path. |
AZURE_OPENAI_API_KEY | For Azure | Key authentication against that resource. |
AZURE_OPENAI_MODEL | For Azure | Deployment name of a chat model, not a public model id. |
AZURE_OPENAI_API_VERSION | No | Defaults to 2024-12-01-preview. |
OPENAI_API_KEY | For the fallback | Used only when AZURE_OPENAI_ENDPOINT is unset. |
OPENAI_CHAT_MODEL | No | Model name for the fallback path. |
OPENAI_BASE_URL | No | Redirects the OpenAI client. The end-to-end fixture harness sets this to replay recorded calls. |
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.
npx tsx apps/cockpit/scripts/serve-example.ts --capability=rt-mafThe script runs uv sync in cockpit/runtimes/microsoft-agent-framework/python on the way, so the first start takes longer than later ones.
Visit http://localhost:4330. The backend answers on http://localhost:5330/agent, with an unauthenticated health check at http://localhost:5330/ok.
- "What is the policy on client dinners?" — streams a message and calls
lookup_expense_policy. - "Submit a 96 dollar client dinner from last Tuesday." — the
expenseargument streams into shared state while the model writes it, thensubmit_expensepauses for approval. - 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.