Register and test in AMC
Import a Foundry project or register one hosted agent, name it so AMC classifies it correctly, and confirm steps and tokens arrive.
The general registration steps are in Register your agent. This page covers what is specific to a Foundry-hosted Agent Framework agent.
Give AMC access to the project
AMC lists and runs Foundry agents either with its own managed identity or with a project API key.
- Managed Identity (same tenant): grant AMC's managed identity a least-privilege role on the project, such as Azure AI User. Without it, AMC reports Access not granted.
- API key: paste the project key. AMC stores it and never shows it again.
Import a whole project
- Go to Agents and select Import from Foundry.
- Enter the Foundry project endpoint: the project URL, such as
https://<resource>.services.ai.azure.com/api/projects/<project>, not an individual agent URL. - Choose the Department. Every imported agent is scoped to it.
- Choose the authentication mode and select Import project.
AMC adds one registration per agent and workflow in the project. Running the import again is safe: existing registrations stay, and only new ones are added.
Register one agent
- Go to Agents and select Register.
- Set Adapter to Azure AI Foundry.
- Set Kind to Workflow or Agent. It can't change after registration.
- Set Endpoint URL to the agent's URL in the project,
<project-endpoint>/agents/<agent-name>/.... AMC reads the agent name from the segment after/agents/. - Choose the department and authentication, then save.
Name agents and workflows deliberately
Foundry doesn't tell AMC whether a hosted agent is a workflow, so AMC classifies by the deployed name, ignoring case:
| Name contains | AMC treats it as | Effect |
|---|---|---|
subagent | An internal helper | Hidden from AMC's catalog. It can't be run on its own. |
agent (and not subagent) | A single agent | Imported with Kind Agent. |
| Neither | A workflow | Imported with Kind Workflow. |
Kind matters at run time. AMC runs a workflow in background mode (background: true, store: true), which is what lets it reconnect to a run after a dropped connection. By default, a registration is run in the older foreground shape only when its Kind is Agent and its type doesn't name a workflow.
Test it
- Before AMC, run the client script from Host and deploy on Foundry with
x-ms-debug-mode-enabled. Confirm oneresponse.output_item.doneper step whose itemnameis the step id and whoseargumentsJSON hasdelivered, the token counts andmodel. - In AMC, select Run now for the registration and open the run.
- Check that each executor shows as its own step with its result and model usage, and that the run total is not zero.
- For a workflow, force a failure (for example, an invalid model name) and check the failed step shows the
failure_reasontext. A single agent has no per-step failure; the run itself fails. - For a human-input workflow, check the Human input step shows your question, answer it, and confirm the run continues to completion.
- If you send
activity_log, select Show details on the step and check the rows.
Make sure every model the agent can run has a token rate configured in AMC, or its steps are priced at AMC's default rate.
Related
Last updated 2026-10-21