{"id":3633,"date":"2026-03-13T12:19:52","date_gmt":"2026-03-13T19:19:52","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/azure-sdk\/?p=3633"},"modified":"2026-03-13T12:19:52","modified_gmt":"2026-03-13T19:19:52","slug":"azd-ai-agent-logs-status","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/azure-sdk\/azd-ai-agent-logs-status\/","title":{"rendered":"Azure Developer CLI (azd): Debug hosted AI agents from your terminal"},"content":{"rendered":"<p><em>When a hosted AI agent crashes, <code>azd<\/code> now shows you the status and streams live logs\u2014right from the CLI.<\/em><\/p>\n<hr \/>\n<h2>What&#8217;s new?<\/h2>\n<p>The <a href=\"https:\/\/learn.microsoft.com\/azure\/developer\/azure-developer-cli\/extensions\/azure-ai-foundry-extension\"><code>azure.ai.agents<\/code> extension<\/a> adds two commands: <code>azd ai agent show<\/code> displays your agent&#8217;s container status, health, and error details, while <code>azd ai agent monitor<\/code> streams container logs in real time.<\/p>\n<h2>Why it matters<\/h2>\n<p>When a hosted AI agent fails to start, debugging means hunting through portals and APIs for error messages buried across multiple surfaces. These commands bring that information to your terminal. You see container health, replica state, and crash details in one place\u2014no context-switching required.<\/p>\n<h2>How to use it<\/h2>\n<p>To check container status and health, run <code>azd ai agent show<\/code>. To stream logs, run <code>azd ai agent monitor<\/code>. Both commands accept <code>--name<\/code> and <code>--version<\/code> flags.<\/p>\n<pre><code class=\"language-bash\">azd ai agent show --name my-agent --version 1          # View status, health, and errors\r\nazd ai agent monitor --name my-agent --version 1       # Fetch recent logs\r\nazd ai agent monitor --name my-agent --version 1 -f    # Follow logs in real time\r\nazd ai agent monitor --name my-agent --version 1 --type system  # System logs<\/code><\/pre>\n<h2>Try it out<\/h2>\n<p>These commands are available starting with the <code>azure.ai.agents<\/code> extension <strong>v0.1.12-preview<\/strong>, included in <code>azd<\/code> <strong>1.23.7<\/strong> and later. If you already use <code>azd<\/code>, upgrade the extension to the latest version:<\/p>\n<pre><code class=\"language-bash\">azd extension upgrade azure.ai.agents<\/code><\/pre>\n<p>New to <code>azd<\/code>? <a href=\"https:\/\/learn.microsoft.com\/azure\/developer\/azure-developer-cli\/install-azd\">Install it<\/a> and run <code>azd ai agent init<\/code> to get started with hosted AI agents.<\/p>\n<h2>Feedback<\/h2>\n<p>Have questions or ideas? File an issue or start a discussion on <a href=\"https:\/\/github.com\/Azure\/azure-dev\">GitHub<\/a>. Want to help shape the future of <code>azd<\/code>? <a href=\"https:\/\/aka.ms\/azd-user-research-signup\">Sign up for user research<\/a>.<\/p>\n<hr \/>\n<p><em>This feature was introduced in <a href=\"https:\/\/github.com\/Azure\/azure-dev\/pull\/6895\">PR #6895<\/a>.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>New azd ai agent show and monitor commands help you diagnose hosted AI agent failures directly from the CLI.<\/p>\n","protected":false},"author":111321,"featured_media":3634,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[908,864],"class_list":["post-3633","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-azure-sdk","tag-azd","tag-azure-developer-cli"],"acf":[],"blog_post_summary":"<p>New azd ai agent show and monitor commands help you diagnose hosted AI agent failures directly from the CLI.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-json\/wp\/v2\/posts\/3633","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-json\/wp\/v2\/users\/111321"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-json\/wp\/v2\/comments?post=3633"}],"version-history":[{"count":1,"href":"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-json\/wp\/v2\/posts\/3633\/revisions"}],"predecessor-version":[{"id":3635,"href":"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-json\/wp\/v2\/posts\/3633\/revisions\/3635"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-json\/wp\/v2\/media\/3634"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-json\/wp\/v2\/media?parent=3633"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-json\/wp\/v2\/categories?post=3633"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-json\/wp\/v2\/tags?post=3633"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}