foundry-trace-inspector-cli
v0.2.2
Published
Command-line tool to fetch and inspect Microsoft Foundry agent traces from your terminal.
Maintainers
Readme
foundry-trace-inspector-cli
Fetch and inspect Microsoft Foundry agent traces from your terminal.
Fetch responses and conversations from a Microsoft Foundry project and print
them as a readable tree or JSON — straight from the command line. Built on
foundry-trace-inspector-core.
Works for any model hosted on Foundry (GPT, Claude, Grok, Kimi, and others).
Usage
Run without installing:
npx foundry-trace-inspector-cli show resp_abc123 \
--endpoint https://my-hub.services.ai.azure.com/api/projects/my-projectOr install globally to get the foundry-trace command:
npm install -g foundry-trace-inspector-cli
foundry-trace show resp_abc123 --endpoint <url>Commands
foundry-trace show <resp_...> [<resp_...> ...] Fetch and print one or more responses
foundry-trace conversation <conv_...> Fetch and print a full conversationOptions
| Flag | Description |
| --- | --- |
| --endpoint <url> | Foundry project endpoint (or FOUNDRY_PROJECT_ENDPOINT) |
| --api-key <key> | Use API-key auth (or FOUNDRY_API_KEY). Omit to use Entra ID / az login. |
| --json | Print the normalized trace as JSON instead of a readable tree |
| --quiet | Suppress diagnostic logging |
| -h, --help | Show help |
Authentication
- With
--api-key(orFOUNDRY_API_KEY) the key is sent as theapi-keyheader. - Otherwise
DefaultAzureCredentialis used:az login, managed identity, environment variables, and the rest of the Azure credential chain.
Examples
# One response, readable output, via az login
foundry-trace show resp_abc123 --endpoint https://my-hub.services.ai.azure.com/api/projects/my-project
# A whole conversation as JSON, using env vars
export FOUNDRY_PROJECT_ENDPOINT=https://my-hub.services.ai.azure.com/api/projects/my-project
export FOUNDRY_API_KEY=...
foundry-trace conversation conv_xyz --jsonFind response IDs (resp_...) and conversation IDs (conv_...) in the Foundry
portal under Agents → your agent → Traces.
License
MIT © Jubin Soni
