22using MaIN . Domain . Entities . Agents ;
33using MaIN . Domain . Entities . Agents . AgentSource ;
44using MaIN . Domain . Models ;
5- using MaIN . Services . Dtos ;
6- using MaIN . Services . Mappers ;
75using MaIN . Services . Services . Abstract ;
86using MaIN . Services . Services . Models ;
97
@@ -13,6 +11,7 @@ public class AgentContext
1311{
1412 private readonly IAgentService _agentService ;
1513 private InferenceParams ? _inferenceParams ;
14+ private MemoryParams ? _memoryParams ;
1615 private Agent _agent ;
1716
1817 internal AgentContext ( IAgentService agentService )
@@ -84,7 +83,13 @@ public AgentContext WithInferenceParams(InferenceParams inferenceParams)
8483 _inferenceParams = inferenceParams ;
8584 return this ;
8685 }
87-
86+
87+ public AgentContext WithMemoryParams ( MemoryParams memoryParams )
88+ {
89+ _memoryParams = memoryParams ;
90+ return this ;
91+ }
92+
8893 public AgentContext WithCustomModel ( string model , string path )
8994 {
9095 KnownModels . AddModel ( model , path ) ;
@@ -115,13 +120,13 @@ public AgentContext WithBehaviour(string name, string instruction)
115120
116121 public async Task < AgentContext > CreateAsync ( bool flow = false , bool interactiveResponse = false )
117122 {
118- await _agentService . CreateAgent ( _agent , flow , interactiveResponse , _inferenceParams ) ;
123+ await _agentService . CreateAgent ( _agent , flow , interactiveResponse , _inferenceParams , _memoryParams ) ;
119124 return this ;
120125 }
121126
122127 public AgentContext Create ( bool flow = false , bool interactiveResponse = false )
123128 {
124- _ = _agentService . CreateAgent ( _agent , flow , interactiveResponse , _inferenceParams ) . Result ;
129+ _ = _agentService . CreateAgent ( _agent , flow , interactiveResponse , _inferenceParams , _memoryParams ) . Result ;
125130 return this ;
126131 }
127132
0 commit comments