Items marked (preview) in this article are currently in public preview. This preview is provided without a service-level agreement, and we don’t recommend it for production workloads. Certain features might not be supported or might have constrained capabilities. For more information, see Supplemental Terms of Use for Microsoft Azure Previews.
Prerequisites
- An initialized hosted agent project. To create one, see Initialize an agent project.
- The azd Foundry extensions installed. For installation steps, see Install the azd Foundry extensions.
- An authenticated Azure Developer CLI session. Run
azd auth loginif needed. - A local agent to inspect. To start one, see Run a hosted agent locally with the Azure Developer CLI.
azure.ai.inspector) and is installed automatically by the microsoft.foundry meta-package. It’s also pulled in as a dependency of azure.ai.agents, so installing just the agent extension is enough.
The inspector only targets a local agent on
http://localhost:8088 by default. It doesn’t authenticate to or proxy a deployed Foundry agent. For the deployed agent, use azd ai agent invoke and azd ai agent monitor.Start the agent locally
-
Start the agent in one terminal:
By default,
azd ai agent runopens the inspector for you when the local server starts listening. -
To skip the auto-launch, pass
--no-inspector:
Launch the inspector manually
If you started the agent yourself, for example withpython app.py or dotnet run, or if you closed the inspector tab and want to reopen it, launch the inspector manually.
-
Run the launch command:
The UI is served on
http://localhost:8087by default and connects to an agent onhttp://localhost:8088. -
Configure both ports if needed:
-
To seed the inspector with an existing conversation or session ID for replaying a specific run, pass the IDs explicitly:
Inspect local traffic
When the inspector is open, the single-page app streams the agent’s responses over SSE and mirrors them in your terminal as well. You can:- Inspect the full request and response payloads for each turn.
- Continue an existing conversation by reusing the conversation ID across turns.
- Reset to a fresh session at any time.
azure.yaml. It’s purely a runtime view.
Related content
- Run a hosted agent locally with the Azure Developer CLI to start the local agent.
- Invoke a hosted agent with the Azure Developer CLI for terminal-based local and deployed invocation.
- Isolate hosted agent sessions per user to test isolation against a deployed agent.