agentleFS
MicrosoftKnown publishermicrosoft-foundry/foundry-samples/samples/python/hosted-agents/agent-framework/responses/23-resilient-workflow/AGENTS.md

foundry-samples / 23-resilient-workflow

AGENTS.md454 starsChanged 3 months agoMITView on GitHub

This sample is a Microsoft Foundry hosted Agent Framework workflow served through the Responses protocol. It demonstrates durable checkpoint recovery for a stored background response after the hosted process is replaced. - Direct code deployment: azure.yaml declares the Python 3.13 runtime and main.py entry point. The Dockerfile remains available for equivalent local container and live protocol validation. Do not commit Foundry Toolkit generated .vscode files. Follow samples/python/hosted-agents/DEPENDENCY_POLICY.md. Use uv 0.11.7, run uv lock, and validate with uv sync --frozen. -…

The file

We split this AGENTS.md into the rules it gives an agent

6 rules. About 0 are common, 2 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Do not commit Foundry Toolkit generated .vscode files.

    line 22
  2. Very specific:

    Follow samples/python/hosted-agents/DEPENDENCY_POLICY.md.

    line 26
  3. Distinctive:

    Keep workflow and executor identities stable across replacement processes.

    line 31
  4. Very specific:

    Use background=true together with store=true.

    line 33
  5. Distinctive:

    Keep replayed work idempotent because recovery can execute the last boundary more than once.

    line 37
  6. Very specific:

    Use logging for hosted diagnostics.

    line 42

≈ “Common” is an estimate: at least 1 in 5 of the 16,597 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

Coding Agent Instructions - Resilient Workflow

This sample is a Microsoft Foundry hosted Agent Framework workflow served through the Responses protocol. It demonstrates durable checkpoint recovery for a stored background response after the hosted process is replaced.

Deployment mode

  • Direct code deployment: azure.yaml declares the Python 3.13 runtime and main.py entry point. The Dockerfile remains available for equivalent local container and live protocol validation.

Key files

  • azure.yaml - Foundry project and hosted-agent manifest
  • src/agent-framework-resilient-workflow-responses/main.py - workflow and host
  • src/agent-framework-resilient-workflow-responses/pyproject.toml and uv.lock
    • fully resolved runtime dependencies
  • src/agent-framework-resilient-workflow-responses/Dockerfile - Linux container
  • README.md - local, deployment, and crash-recovery validation

Do not commit Foundry Toolkit generated .vscode files.

Dependency workflow

Follow samples/python/hosted-agents/DEPENDENCY_POLICY.md. Use uv 0.11.7, run uv lock, and validate with uv sync --frozen.

Recovery invariants

  • Keep workflow and executor identities stable across replacement processes.
  • Store durable data only in workflow checkpoint state.
  • Use background=true together with store=true.
  • Retrieve the same response ID after a transport failure. Never resubmit under a replacement ID.
  • Allow the completed superstep to commit before terminating the process.
  • Keep replayed work idempotent because recovery can execute the last boundary more than once.

Runtime logging

Use logging for hosted diagnostics. Never log credentials, tokens, or isolation key values.

Development workflow

uv sync --frozen
uv run python main.py
azd ai agent run
azd deploy

References

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.