All skills
microsoft avatar

/microsoft-foundry

@04110d9
by microsoftmicrosoft/skills3.1k stars
351

Build, deploy, evaluate, optimize, fine-tune, and manage Microsoft Foundry agents, models, and resources end to end. USE FOR: foundry, azd ai agent, azd provision/deploy, hosted agent scaffold/develop/run/deploy/troubleshoot, prompt agent create, create agent, update agent, add tool to agent, invoke agent, agent.yaml, agent insights, pull agent insights, evaluate agent, batch eval, continuous eval, continuous monitoring, agent CI/CD, optimize prompt, improve prompt, prompt optimizer, optimize agent instructions, Agent Optimizer scaffold, dataset curation from traces, deploy model, model fine-tuning (SFT/DPO/RFT), Foundry project, RBAC, role assignment, permissions, quota, capacity, region, deployment failure, AI Services, create Foundry resource, knowledge index, customize deployment, onboard, availability, training-data, grader, distillation, large file upload. DO NOT USE FOR: Azure Functions, App Service, general Azure deploy (use azure-deploy), general Azure prep (use azure-prepare).

Use this Skill: https://skilld.dev/gh/microsoft/skills/microsoft-foundry

This session only. Nothing lands on disk.

foundry-agentinvokereferencesfile-operations.md

≈721 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Hosted Session File Operations with azd

Use azd ai agent files to manage files in a Hosted Agent session.

Resolve the Session

File commands use the last session saved by azd ai agent invoke or azd ai agent sessions create. Use --session-id <id> to select another session. Use --agent-name <service-name> when the project has multiple agent services.

Run a successful invoke first unless files must be uploaded before the first request. In that case, create a session explicitly and use the returned agent_session_id.

Commands

Upload a local file. The remote path defaults to the local filename:

azd ai agent files upload ./input.csv
azd ai agent files upload ./input.csv --target-path /data/input.csv

Download a remote file. The local path defaults to the remote basename:

azd ai agent files download /data/output.csv
azd ai agent files download /data/output.csv --target-path ./output.csv

List paths and inspect metadata:

azd ai agent files list
azd ai agent files list /data --output table
azd ai agent files stat /data/output.csv

mkdir will not automatically create missing parent directories. Create each missing parent directory first:

azd ai agent files mkdir /data
azd ai agent files mkdir /data/input

Delete a file or directory:

azd ai agent files delete /data/old.csv
azd ai agent files delete /data/temp --recursive

Recursive delete must be explicit. Do not add --recursive unless deleting the directory and all contents is intended.

Upload, Invoke, Download

azd ai agent sessions create
azd ai agent files mkdir /data/input
azd ai agent files upload ./input.csv --target-path /data/input/input.csv
azd ai agent invoke "Process /data/input/input.csv and write /data/output/result.csv"
azd ai agent files stat /data/output/result.csv
azd ai agent files download /data/output/result.csv --target-path ./result.csv
azd ai agent sessions stop <session-id>

The create command persists the new session, so the later file and invoke commands reuse it without repeating --session-id.

Filesystem Rules

Hosted session files persist under $HOME for the session lifetime. Files outside $HOME, such as /tmp, are ephemeral. Deleting the session permanently removes its persistent filesystem.

Error Handling

Error Resolution
No saved session Run azd ai agent invoke, create a session, or pass --session-id
Session is stopped or missing Run azd ai agent sessions show <id> or list; invoke to resume a stopped session
File not found Use azd ai agent files list and stat to verify the path
Directory is not empty Repeat delete with --recursive only after confirming the intended path
Header-based isolation fails Pass the same --user-identity used for invoke and session commands

Source: SKILL.md on GitHub

2 warnings3d4 checks · Risk SAFE
  • Gen Agent Trust Hub3d

    This skill provides a comprehensive environment for managing the end-to-end lifecycle of AI agents, models, and infrastructure on Microsoft Foundry. It includes sub-skills for deployment, evaluation, fine-tuning, and troubleshooting. The skill utilizes dynamic code execution and shell command wrappers, which are used within the context of local development and cloud orchestration. All external resources and dependencies originate from trusted organizations and well-known services.

  • Socket3d

    2 alerts: gptSecurity, gptAnomaly

  • Snyk3d

    Risk: LOW · No issues

  • Runlayer7mo

    36/36 files flagged

Signed by skilld at 04110d9. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated last week
metadata
{
  "author": "Microsoft",
  "version": "1.2.26"
}

README badge

README badge for microsoft/skills/microsoft-foundry