Imported from microsoft-foundry/foundry-samples (
samples/python/hosted-agents/agent-framework/responses/21-harness-scaling-capabilities/AGENTS.md). Install upstream withnpx skills add microsoft-foundry/foundry-samples --skill 21-harness-scaling-capabilities. Copyright stays with the author.
Coding Agent Instructions - Harness scaling capabilities
This sample is a Microsoft Foundry hosted agent. It ports the Microsoft Agent Framework personal-finance harness sample to the Foundry Responses v2 protocol while preserving its file skills, background research, confined shell, CodeAct provider, and simulated trade tool. It runs in Foundry Agent Service, which manages hosting, security, scaling, and observability so contributors can focus on the agent logic.
Deployment mode
- Direct code deployment:
codeConfigurationinazure.yamldeclares the Python runtime andmain.pyentry point. A Dockerfile is not required.
Key files
azure.yaml-azdmanifest for the Foundry project, model deployment, hosted agent, environment variables, and direct code deploymentsrc/harness-scaling-capabilities-responses/main.py- agent implementation and Responses server entry pointsrc/harness-scaling-capabilities-responses/requirements.txt- Python dependenciessrc/harness-scaling-capabilities-responses/skills/- bundled valuation and risk-scoring skillssrc/harness-scaling-capabilities-responses/working/- seed portfolio and trade-confirmation files copied into writable session storageREADME.md- prerequisites and supported local run, test, and deployment paths
Do not commit .vscode launch or task files generated when the Foundry Toolkit scaffolds a local
workspace. Keep the project's .venv in src/harness-scaling-capabilities-responses/, next to
requirements.txt.
Development workflow
The Azure Developer CLI (azd) manages the hosted-agent lifecycle. From an initialized agent
project:
azd provision # Provision declared Azure resources, if needed
azd ai agent run # Run locally on http://localhost:8088
azd ai agent invoke --local "your message" # Test the local agent
azd deploy # Deploy to Foundry
azd ai agent invoke "your message" # Invoke the deployed agent
azd down # Remove resources created for the project
Consecutive invokes reuse the Responses conversation, which lets the README's multi-turn capability trajectory build on earlier turns.
Microsoft Foundry Skill
Install the Microsoft Foundry Skill for guided deployment, evaluation, and troubleshooting workflows.
Direct install (preferred, works with any coding agent):
npx skills add https://github.com/microsoft/azure-skills --skill microsoft-foundry
Or install the Azure Skills Plugin:
- Copilot CLI:
/plugin marketplace add microsoft/azure-skillsthen/plugin install azure@azure-skills - Claude Code:
/plugin install azure@claude-plugins-official
Then ask naturally, for example:
Use the Microsoft Foundry Skill to deploy this agent.