Browse the docs

Verify the agent and register it in AMC

Prove the deployed agent with free probes first, run it once for real, then add token prices and register it in AMC.

Before you startA deployed, routed agent version with the instance identity granted. See [Deploy to Foundry](/developers/foundry-deploy/).View as Markdown

probe.py calls the deployed endpoint as your signed-in az user. Run the probes in this order: each is cheaper than the next.

1. Preflight (free)

bash
python probe.py preflight

Sends {"mode":"preflight"}: no model call, no skill. It must return envelope status ok before anything is spent. The detail starts with filesystem ok: N checks, which proves the host's file layer on this image (directories pin by descriptor, symlinks are refused, the scrub empties what it says), followed by one round trip per outbound dependency you added, as the agent's own identity.

2. Failed-run lifecycle (free)

bash
python probe.py failed

Sends a request the shell refuses before spend (an unknown field) on both paths. On the stream it must end response.failed; the stored background response reads completed with envelope status failed.

3. A few minutes of streaming

bash
python probe.py stream 300

A real run for 300 seconds, printing each finished step with its model and tokens. Closing the connection cancels the turn, so this costs a small fraction of a full run. A cold container can take a minute or more to answer; the probe waits up to 180 s to connect.

4. The first full run

bash
python probe.py background

Starts a background run, polls every 60 s (each GET also keeps the session alive), and prints the stored envelope. Once the agent is registered (step 6) you can start it from AMC instead. Then read the envelope:

  • status is ok.
  • gate_evidence has <gate>_ok true for every gate.
  • skills_bypassed is null.
  • step_tokens_attributed is at most model_usage for every model.
  • Then set the ceilings at 1.5× what you measured and deploy a new version with them.

5. Add token prices in AMC

Add a price for every model deployment name the agent can report, Haiku included when WebFetch is allowed. A missing price is billed at a generic default rate with no error. See Choose models and spend ceilings.

6. Register in AMC

Registration itself is covered in Register your agent. What is specific to a Foundry hosted agent:

FieldValue for this agent
KindAgent
AdapterAzure AI Foundry
Endpoint URLThe agent URL deploy.py printed: <your-foundry-project-endpoint>/agents/<agent-name>/endpoint/protocols/openai/responses. AMC derives the project endpoint (everything before /agents/) and the agent name from it, and adds api-version itself.
AuthManaged Identity (same tenant) or API key
Resource scopeLeave blank for the default https://ai.azure.com/.default. The only other accepted value is https://cognitiveservices.azure.com/.default.
  • By default the endpoint host must be a Microsoft Foundry host (ending .services.ai.azure.com, .ai.azure.com or .cognitiveservices.azure.com). AMC won't send its token anywhere else.
  • To register every agent in a project at once, use Import a Foundry project with the Foundry project endpoint. AMC lists the project's agents, registers each as an agent or workflow by its type, and never deactivates rows that are absent.

How AMC calls this agent

  • AMC POSTs to the agent's Responses endpoint with stream: true. A plain hosted agent is not sent background by default, so if AMC's connection drops, the turn is cancelled like any cut stream.
  • The Responses input is a string: AMC sends the run's prompt input, or the first input if there is no prompt. The shell parses it as JSON, so a value such as {"target_date": "2026-10-16"} sets request fields, a bare value maps onto the primary field, and an empty value runs on every default.
  • A paused run (a request_info item followed by response.completed) shows as waiting on a person. AMC sends the answer as function_call_output with previous_response_id, as in Human-in-the-loop.

7. Schedule it

Schedule from AMC, which streams the run and shows a run that ends response.failed as failed. A raw scheduler sends {"input":"{}","background":true} and reads the envelope's status.

Last updated 2026-10-21