import React from 'react'; import { Settings, Wrench, Server, BookOpen, Workflow, Zap } from 'lucide-react'; import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from '@/components/ui/accordion'; import { ExpandableMarkdownEditor } from '@/components/ui/expandable-markdown-editor'; import { AgentToolsConfiguration } from '../agent-tools-configuration'; import { AgentMCPConfiguration } from '../agent-mcp-configuration'; import { AgentKnowledgeBaseManager } from '../knowledge-base/agent-knowledge-base-manager'; import { AgentWorkflowsConfiguration } from '../workflows/agent-workflows-configuration'; import { AgentTriggersConfiguration } from '../triggers/agent-triggers-configuration'; interface ConfigurationTabProps { agentId: string; displayData: { name: string; description: string; system_prompt: string; agentpress_tools: any; configured_mcps: any[]; custom_mcps: any[]; is_default: boolean; avatar: string; avatar_color: string; }; versionData?: { version_id: string; configured_mcps: any[]; custom_mcps: any[]; system_prompt: string; agentpress_tools: any; }; isViewingOldVersion: boolean; onFieldChange: (field: string, value: any) => void; onMCPChange: (updates: { configured_mcps: any[]; custom_mcps: any[] }) => void; initialAccordion?: string; } export function ConfigurationTab({ agentId, displayData, versionData, isViewingOldVersion, onFieldChange, onMCPChange, initialAccordion, }: ConfigurationTabProps) { const mapAccordion = (val?: string) => { if (val === 'instructions') return 'system'; if (['system', 'tools', 'integrations', 'knowledge', 'workflows', 'triggers'].includes(val || '')) { return val!; } return 'system'; }; const [openAccordion, setOpenAccordion] = React.useState(mapAccordion(initialAccordion)); React.useEffect(() => { if (initialAccordion) { setOpenAccordion(mapAccordion(initialAccordion)); } }, [initialAccordion]); return (

System Prompt

Define agent behavior and goals

onFieldChange('system_prompt', value)} placeholder="Click to set system instructions..." title="System Instructions" disabled={isViewingOldVersion} />

Default Tools

Configure default agentpress tools

onFieldChange('agentpress_tools', tools)} />

Integrations

Connect external services via MCPs

Knowledge Base

Upload and manage knowledge for the agent

Workflows

Automate complex processes

Triggers

Set up automated agent runs

); }