{"id":464,"date":"2026-07-10T05:04:52","date_gmt":"2026-07-10T12:04:52","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/go\/?p=464"},"modified":"2026-07-10T05:04:52","modified_gmt":"2026-07-10T12:04:52","slug":"microsoft-agent-framework-for-go-public-preview","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/go\/microsoft-agent-framework-for-go-public-preview\/","title":{"rendered":"Microsoft Agent Framework for Go public preview"},"content":{"rendered":"<p>We are excited to announce the public preview of <a href=\"https:\/\/github.com\/microsoft\/agent-framework-go\">Microsoft Agent Framework for Go<\/a>, a Go implementation of Microsoft Agent Framework for building, orchestrating, and deploying AI agents and multi-agent workflows.<\/p>\n<p><img decoding=\"async\" src=\".\/agent-framework-go-banner.png\" alt=\"Microsoft Agent Framework banner\" \/><\/p>\n<p>Microsoft Agent Framework is designed for developers who are moving from single prompt calls to production agent systems: agents that use tools, keep context, coordinate with other agents, stream results, and can be observed and governed as part of real applications. With the Go SDK, Go developers can start using those patterns in services, CLIs, workers, and cloud-native applications where Go is already a natural fit.<\/p>\n<p>To get started, add the module to your Go project:<\/p>\n<pre><code class=\"language-bash\">go get github.com\/microsoft\/agent-framework-go<\/code><\/pre>\n<p>Here is a small Microsoft Foundry-backed agent:<\/p>\n<pre><code class=\"language-go\">package main\r\n\r\nimport (\r\n    \"context\"\r\n    \"fmt\"\r\n    \"log\"\r\n    \"os\"\r\n\r\n    \"github.com\/Azure\/azure-sdk-for-go\/sdk\/azidentity\"\r\n    \"github.com\/microsoft\/agent-framework-go\/provider\/foundryprovider\"\r\n)\r\n\r\nfunc main() {\r\n    endpoint := os.Getenv(\"FOUNDRY_PROJECT_ENDPOINT\")\r\n    if endpoint == \"\" {\r\n        log.Fatal(\"FOUNDRY_PROJECT_ENDPOINT is required\")\r\n    }\r\n\r\n    model := os.Getenv(\"FOUNDRY_MODEL\")\r\n    if model == \"\" {\r\n        model = \"gpt-4o-mini\"\r\n    }\r\n\r\n    credential, err := azidentity.NewDefaultAzureCredential(nil)\r\n    if err != nil {\r\n        log.Fatalf(\"create credential: %v\", err)\r\n    }\r\n\r\n    agent := foundryprovider.NewAgent(\r\n        endpoint,\r\n        credential,\r\n        foundryprovider.ModelDeployment(model),\r\n        foundryprovider.AgentConfig{\r\n            Instructions: \"You are a helpful assistant.\",\r\n        },\r\n    )\r\n\r\n    msg := \"Write a haiku about Microsoft Agent Framework\"\r\n\r\n    ctx := context.Background()\r\n    resp, err := agent.RunText(ctx, msg).Collect()\r\n    if err != nil {\r\n        log.Fatalf(\"run agent: %v\", err)\r\n    }\r\n    fmt.Println(resp)\r\n}<\/code><\/pre>\n<p>To run the example, create a <a href=\"https:\/\/learn.microsoft.com\/en-us\/azure\/ai-foundry\/how-to\/create-projects\">Microsoft Foundry project<\/a>, set <code>FOUNDRY_PROJECT_ENDPOINT<\/code>, and authenticate with Azure, for example with <a href=\"https:\/\/learn.microsoft.com\/cli\/azure\/authenticate-azure-cli-interactively\"><code>az login<\/code><\/a>.<\/p>\n<p>The public preview includes:<\/p>\n<ul>\n<li>Providers for Microsoft Foundry, Azure OpenAI\/OpenAI-compatible models, Anthropic, Gemini, and A2A.<\/li>\n<li>Tools, MCP, middleware, context providers, approvals, and automatic tool calling.<\/li>\n<li>Multi-agent workflows with routing, checkpoints, streaming, and human review.<\/li>\n<li>OpenTelemetry tracing for agent runs.<\/li>\n<\/ul>\n<p>The Go SDK brings Microsoft Agent Framework concepts to Go alongside the existing <a href=\"https:\/\/github.com\/microsoft\/agent-framework\/tree\/main\/dotnet\">.NET SDK<\/a> and <a href=\"https:\/\/github.com\/microsoft\/agent-framework\/tree\/main\/python\">Python SDK<\/a> in the broader <a href=\"https:\/\/github.com\/microsoft\/agent-framework\">Microsoft Agent Framework<\/a> project.<\/p>\n<p>Because this is a public preview, APIs may evolve as we collect feedback. Try the Go SDK, explore the <a href=\"https:\/\/learn.microsoft.com\/en-us\/agent-framework\/\">Agent Framework documentation<\/a>, and file issues or feature requests in the <a href=\"https:\/\/github.com\/microsoft\/agent-framework-go\/issues\">agent-framework-go repository<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Microsoft Agent Framework for Go is entering public preview, bringing Agent Framework concepts to Go developers building agents and multi-agent workflows.<\/p>\n","protected":false},"author":145999,"featured_media":470,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[17,16,15,4,18],"class_list":["post-464","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-go","tag-agent-framework","tag-agents","tag-ai","tag-go","tag-public-preview"],"acf":[],"blog_post_summary":"<p>Microsoft Agent Framework for Go is entering public preview, bringing Agent Framework concepts to Go developers building agents and multi-agent workflows.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/go\/wp-json\/wp\/v2\/posts\/464","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/go\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/go\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/go\/wp-json\/wp\/v2\/users\/145999"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/go\/wp-json\/wp\/v2\/comments?post=464"}],"version-history":[{"count":3,"href":"https:\/\/devblogs.microsoft.com\/go\/wp-json\/wp\/v2\/posts\/464\/revisions"}],"predecessor-version":[{"id":473,"href":"https:\/\/devblogs.microsoft.com\/go\/wp-json\/wp\/v2\/posts\/464\/revisions\/473"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/go\/wp-json\/wp\/v2\/media\/470"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/go\/wp-json\/wp\/v2\/media?parent=464"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/go\/wp-json\/wp\/v2\/categories?post=464"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/go\/wp-json\/wp\/v2\/tags?post=464"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}