BlogWriter Architecture Part 1

In a previous blog post I promised to take apart the BlogWriter architecture and implementation. I thought today I’d start with the architecture.

The original design was to have 4 agents:
* BlogWriter (orchestrates the other agents)
* Researcher (searches the web and Microsoft Learn)
* Author (writes the blog post)
* Reviewer (either accepts the post or sends back fixes to the author)

Subsequently we moved the agents to Foundry (see this video and the diagram above). Critical to this new architecture is that the four Foundry-based agents are fully independent, and each lives in its own project. All the work is done by these agents.

The diagram is a bit hard to read, but it indicates that the local agents each talk via AsAiAgent().RunAsync() to the Foundry-based agents.

More precisely, Program.cs never builds an agent in-process. For each of the four roles it calls AIProjectClient.AsAIAgent(agentEndpoint, ...), which returns a MAF AIAgent that talks to the already-deployed hosted agent’s /responses endpoint.

There are no API keys anywhere in the application; it is all handled by Microsoft Entra. There are, though, numerous environment variables that are typically stored in user-secrets. Almost all of these are optional.

More on this can be found in the Architecture.md and Configuration.md files in the source.

There is a lot more to say about the architecture, but we’ll make that visible as we dive into the code in coming blog posts.

Unknown's avatar

About Jesse Liberty

Jesse Liberty has three decades of experience writing and delivering software projects and is the author of 2 dozen books and a couple dozen online courses. Liberty is a Senior AI Engineer at the University of Pittsburgh Medical Center, and was a Team Lead and Senior Software Engineer for various corporations, a Senior Technical Evangelist for Microsoft, a Distinguished Software Engineer for AT&T, a VP for Information Services for Citibank and a Software Architect for PBS. He is a 21 year Microsoft MVP.
This entry was posted in AI. Bookmark the permalink.