You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: readme.md
+8-6Lines changed: 8 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -186,12 +186,14 @@ and `AIContext`. This package supports dynamic extension of a configured agent i
186
186
1. A keyed service `AIContextProviderFactory` with the same name as the agent will be set up just as if you had
187
187
set it manually as the [ChatClientAgentOptions.AIContextProviderFactory](https://learn.microsoft.com/en-us/dotnet/api/microsoft.agents.ai.chatclientagentoptions.aicontextproviderfactory)
188
188
in code.
189
-
2. A keyed service `AIContextProvider` with the same name as the agent.
190
-
3. A keyed service `AIContext` with the same name as the agent.
191
-
4. Aggregate of AI contexts pulled in via `use` setting for an agent.
192
-
193
-
The first three alternatives enable auto-wiring of context providers or contexts registered in the service collection and
194
-
are pretty self-explanatory. The last alternative allows even more declarative scenarios involving reusable and cross-cutting
189
+
2. Aggregate of AI contexts from:
190
+
a. Keyed service `AIContextProvider` with the same name as the agent.
191
+
b. Keyed service `AIContext` with the same name as the agent.
192
+
c. Other services pulled in via `use` setting for an agent registered as either `AIContextProvider` or `AIContext`
193
+
with a matching key.
194
+
195
+
The first option assumes you want full control of the context, so it does not allow futher composition.
196
+
The second alternative allows more declarative scenarios involving reusable and cross-cutting
195
197
context definitions.
196
198
197
199
For example, let's say you want to provide consistent tone for all your agents. It would be tedious, repetitive and harder
0 commit comments