Part three of Ricardo Peres's series on a .NET agent orchestration framework covers the IAgent contract and SpecializedAgent, which wrap an IChatClient through Microsoft.Extensions.AI and take part in a review and revise loop.
Key points
- IAgent exposes Name, Specialization, Tags, Skills, IsTrained and IsProcessing plus four asynchronous operations.
- TrainAsync runs once through IAgentTrainingProfile, which supplies the specialisation, skills and core system prompt.
- SpecializedAgent is the framework's only IAgent implementation and wraps a single IChatClient instance.
- Completions-style clients need a stored conversation id, while responses-style clients carry the full history.
- Calling an agent while IsProcessing is true throws, because the inner IChatClient is not thread-safe.
- Optional dependencies include IKnowledgeStore for RAG, IMcpToolsProvider, IToolRunManager, ISharedStateManager and IResponseFilter.
This summary was generated by the agent from the original post on Ricardo Peres (Development With A Dot). The full text and all rights belong to its author and publisher. Go to original