@@ -5,11 +5,10 @@ import { Button } from "@/components/ui/button";
55import { Textarea } from "@/components/ui/textarea" ;
66import { Card , CardContent , CardHeader , CardTitle } from "@/components/ui/card" ;
77import { Loader2 , Settings2 , PlusCircle , Trash2 } from "lucide-react" ;
8- import { ModelConfig , MemoryResponse , AgentType } from "@/types" ;
8+ import { ModelConfig , AgentType } from "@/types" ;
99import { SystemPromptSection } from "@/components/create/SystemPromptSection" ;
1010import { ModelSelectionSection } from "@/components/create/ModelSelectionSection" ;
1111import { ToolsSection } from "@/components/create/ToolsSection" ;
12- import { MemorySelectionSection } from "@/components/create/MemorySelectionSection" ;
1312import { useRouter , useSearchParams } from "next/navigation" ;
1413import { useAgents } from "@/components/AgentsProvider" ;
1514import { LoadingState } from "@/components/LoadingState" ;
@@ -18,7 +17,6 @@ import KagentLogo from "@/components/kagent-logo";
1817import { AgentFormData } from "@/components/AgentsProvider" ;
1918import { Tool , EnvVar } from "@/types" ;
2019import { toast } from "sonner" ;
21- import { listMemories } from "@/app/actions/memories" ;
2220import { NamespaceCombobox } from "@/components/NamespaceCombobox" ;
2321import { Label } from "@/components/ui/label" ;
2422import { Checkbox } from "@/components/ui/checkbox" ;
@@ -33,7 +31,6 @@ interface ValidationErrors {
3331 model ?: string ;
3432 knowledgeSources ?: string ;
3533 tools ?: string ;
36- memory ?: string ;
3734}
3835
3936interface AgentPageContentProps {
@@ -70,8 +67,6 @@ function AgentPageContent({ isEditMode, agentName, agentNamespace }: AgentPageCo
7067 systemPrompt : string ;
7168 selectedModel : SelectedModelType | null ;
7269 selectedTools : Tool [ ] ;
73- availableMemories : MemoryResponse [ ] ;
74- selectedMemories : string [ ] ;
7570 byoImage : string ;
7671 byoCmd : string ;
7772 byoArgs : string ;
@@ -92,8 +87,6 @@ function AgentPageContent({ isEditMode, agentName, agentNamespace }: AgentPageCo
9287 systemPrompt : isEditMode ? "" : DEFAULT_SYSTEM_PROMPT ,
9388 selectedModel : null ,
9489 selectedTools : [ ] ,
95- availableMemories : [ ] ,
96- selectedMemories : [ ] ,
9790 byoImage : "" ,
9891 byoCmd : "" ,
9992 byoArgs : "" ,
@@ -161,11 +154,7 @@ function AgentPageContent({ isEditMode, agentName, agentNamespace }: AgentPageCo
161154 ) ) . concat ( ( agent . spec ?. byo ?. deployment ?. env || [ ] ) . length === 0 ? [ { name : "" , value : "" , isSecret : false } ] : [ ] ) ,
162155 } ) ) ;
163156 }
164-
165- // Set selected memories if they exist
166- if ( agentResponse . memoryRefs && Array . isArray ( agentResponse . memoryRefs ) ) {
167- setState ( prev => ( { ...prev , selectedMemories : agentResponse . memoryRefs } ) ) ;
168- }
157+
169158 } catch ( extractError ) {
170159 console . error ( "Error extracting assistant data:" , extractError ) ;
171160 toast . error ( "Failed to extract agent data" ) ;
@@ -185,19 +174,6 @@ function AgentPageContent({ isEditMode, agentName, agentNamespace }: AgentPageCo
185174 void fetchAgentData ( ) ;
186175 } , [ isEditMode , agentName , agentNamespace , getAgent ] ) ;
187176
188- useEffect ( ( ) => {
189- const fetchMemories = async ( ) => {
190- try {
191- const memories = await listMemories ( ) ;
192- setState ( prev => ( { ...prev , availableMemories : memories } ) ) ;
193- } catch ( error ) {
194- console . error ( "Error fetching memories:" , error ) ;
195- toast . error ( "Failed to load available memories." ) ;
196- }
197- } ;
198- fetchMemories ( ) ;
199- } , [ ] ) ;
200-
201177 const validateForm = ( ) => {
202178 const formData = {
203179 name : state . name ,
@@ -229,7 +205,6 @@ function AgentPageContent({ isEditMode, agentName, agentNamespace }: AgentPageCo
229205 case 'systemPrompt' : formData . systemPrompt = value ; break ;
230206 case 'model' : formData . modelName = value ; break ;
231207 case 'tools' : formData . tools = value ; break ;
232- case 'memory' : formData . memory = value ; break ;
233208 }
234209
235210 const fieldErrors = validateAgentData ( formData ) ;
@@ -265,7 +240,6 @@ function AgentPageContent({ isEditMode, agentName, agentNamespace }: AgentPageCo
265240 modelName : state . selectedModel ?. ref || "" ,
266241 stream : true ,
267242 tools : state . selectedTools ,
268- memory : state . selectedMemories ,
269243 // BYO
270244 byoImage : state . byoImage ,
271245 byoCmd : state . byoCmd || undefined ,
@@ -585,25 +559,6 @@ function AgentPageContent({ isEditMode, agentName, agentNamespace }: AgentPageCo
585559 </ Card >
586560 { state . agentType === "Declarative" && (
587561 < >
588- < Card >
589- < CardHeader >
590- < CardTitle className = "flex items-center gap-2" >
591- < Settings2 className = "h-5 w-5" />
592- Memory
593- </ CardTitle >
594- < p className = "text-xs mb-2 block text-muted-foreground" >
595- The memories that the agent will use to answer the user's questions.
596- </ p >
597- </ CardHeader >
598- < CardContent >
599- < MemorySelectionSection
600- availableMemories = { state . availableMemories }
601- selectedMemories = { state . selectedMemories }
602- onSelectionChange = { ( mems ) => setState ( prev => ( { ...prev , selectedMemories : mems } ) ) }
603- disabled = { state . isSubmitting || state . isLoading }
604- />
605- </ CardContent >
606- </ Card >
607562 < Card >
608563 < CardHeader >
609564 < CardTitle className = "flex items-center gap-2" >
0 commit comments