docs: enhance architecture documentation for Author and AuthorAgent r… - #31
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The new documentation has a title typo and a few Markdown/accuracy issues (notably code formatting and hosted service naming) that should be corrected before approval.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR updates the architecture documentation to better explain how the deployed Foundry hosted Author agent relates to the local AuthorAgent workflow component in the main app.
Changes:
- Adds a new section describing the relationship between
HostedAgents/Authorand the localAuthorAgentadapter. - Documents the runtime call flow (state → prompt → remote agent call → state update) and clarifies that the two halves communicate over the Foundry Responses endpoint rather than via project references.
File summaries
| File | Description |
|---|---|
| docs/architecture.md | Adds a new “Hosted Agent vs local Agent” relationship section for Author/AuthorAgent to clarify the distributed design. |
Review details
Suppressed comments (1)
docs/architecture.md:66
- This sentence references filenames as plain text; formatting them as code (and optionally including the HostedAgents path) makes it clearer these are concrete source files that need to stay in sync.
One detail to maintain: the Author instructions are duplicated in Prompts.cs and AgentPrompt.cs. The hosted copy is used at deployment/runtime, while the root copy documents or supports the local architecture, so changes should keep both aligned.
- Files reviewed: 1/1 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| console app never issues a raw HTTP call to an agent endpoint.** This is a hard | ||
| constraint of this codebase (see `AGENTS.md`), not just a convention. | ||
|
|
||
| ## Relationship betwen Hosted Agents and Agents |
Comment on lines
+58
to
+62
| `Author` is the deployable Azure AI Foundry Hosted Agent. Its Program.cs creates an `AIAgent` with the Author instructions and exposes it through the `Responses` protocol. azure.yaml packages and deploys it as the `Author/blogwriter-author service`. | ||
|
|
||
| `AuthorAgent.cs` is the local workflow adapter. The main app connects to the hosted agent by name in Program.cs, wraps the remote endpoint as an `AIAgent`, and passes that client into `AuthorAgent`. | ||
|
|
||
| During execution, `AuthorAgent` converts `ResearchState` into a prompt, calls the remote hosted agent with _agent.RunAsync(...), then writes the returned draft back into ResearchState. It also owns workflow concerns such as logging, tracing, revision counting, error handling, and fallback drafts. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…elationship