-
- Name
-
-
-
- {nameError && (
-
{nameError}
+
+ {/* Tabs */}
+
+ {(['configurations', 'instructions', 'examples'] as TabType[]).map((tab) => (
+ setActiveTab(tab)}
+ className={clsx(
+ "px-4 py-2 text-sm font-medium transition-colors relative",
+ activeTab === tab
+ ? "text-indigo-600 dark:text-indigo-400 after:absolute after:bottom-0 after:left-0 after:right-0 after:h-0.5 after:bg-indigo-500 dark:after:bg-indigo-400"
+ : "text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300"
)}
-
-
- )}
-
-
-
-
-
-
- Agent Type
-
-
-
-
-
Agent Types
- Conversation agents' responses are user-facing. You can use conversation agents for multi-turn conversations with users.
-
-
- Task agents' responses are internal and available to other agents. You can use them to build pipelines and DAGs within workflows. E.g. Conversation Agent {'->'} Task Agent {'->'} Task Agent.
-
-
-
-
-
handleUpdate({
- ...agent,
- outputVisibility: value as z.infer['outputVisibility']
- })}
- />
-
-
-
-
-
- Instructions
-
- setShowGenerateModal(true)}
- startContent={ }
>
- Generate
-
-
-
{
- handleUpdate({
- ...agent,
- instructions: value
- });
- }}
- markdown
- multiline
- mentions
- mentionsAtValues={atMentions}
- showSaveButton={true}
- showDiscardButton={true}
- className="border border-gray-200 dark:border-gray-700 rounded-lg focus-within:ring-2 focus-within:ring-indigo-500/20 dark:focus-within:ring-indigo-400/20"
- />
+ {tab.charAt(0).toUpperCase() + tab.slice(1)}
+
+ ))}
-
-
- Examples
-
- {
- handleUpdate({
- ...agent,
- examples: value
- });
- }}
- placeholder="Enter examples for this agent"
- markdown
- multiline
- mentions
- mentionsAtValues={atMentions}
- showSaveButton={true}
- showDiscardButton={true}
- className="border border-gray-200 dark:border-gray-700 rounded-lg focus-within:ring-2 focus-within:ring-indigo-500/20 dark:focus-within:ring-indigo-400/20"
- />
-
-
- {useRag && (
-
-
- RAG
-
-
-
-
{
- const key = keys.currentKey as string;
- if (key) {
- handleUpdate({
- ...agent,
- ragDataSources: [...(agent.ragDataSources || []), key]
- });
- }
- }}
- startContent={ }
- >
- {dataSources
- .filter((ds) => !(agent.ragDataSources || []).includes(ds._id))
- .map((ds) => (
-
- {ds.name}
-
- ))
- }
-
-
-
-
- {(agent.ragDataSources || []).map((source) => {
- const ds = dataSources.find((ds) => ds._id === source);
- return (
-
-
-
-
-
- {ds?.name || "Unknown"}
-
-
- Data Source
-
-
-
-
{
- const newSources = agent.ragDataSources?.filter((s) => s !== source);
+ {/* Tab Content */}
+
+ {activeTab === 'configurations' && (
+
+ {!agent.locked && (
+
+
+
+ Name
+
+
+
- );
- })}
-
-
- {agent.ragDataSources !== undefined && agent.ragDataSources.length > 0 && (
- <>
-
-
setIsAdvancedConfigOpen(!isAdvancedConfigOpen)}
- className="flex items-center gap-2 text-xs font-medium text-gray-500 dark:text-gray-400 uppercase hover:text-gray-700 dark:hover:text-gray-300 transition-colors"
- >
- {isAdvancedConfigOpen ?
- :
-
- }
- Advanced RAG configuration
-
-
- {isAdvancedConfigOpen && (
-
-
-
-
- Return type
-
-
- {["chunks", "content"].map((type) => (
- handleUpdate({
- ...agent,
- ragReturnType: type as z.infer['ragReturnType']
- })}
- className={clsx(
- "px-4 py-2 rounded-lg text-sm font-medium transition-colors",
- agent.ragReturnType === type
- ? "bg-indigo-50 dark:bg-indigo-900/20 text-indigo-600 dark:text-indigo-400 border-2 border-indigo-200 dark:border-indigo-800"
- : "bg-white dark:bg-gray-800 text-gray-600 dark:text-gray-400 border border-gray-200 dark:border-gray-700 hover:border-gray-300 dark:hover:border-gray-600"
- )}
- >
- {type.charAt(0).toUpperCase() + type.slice(1)}
-
- ))}
-
-
-
-
-
- Number of matches
-
-
- handleUpdate({
- ...agent,
- ragK: parseInt(e.target.value)
- })}
- />
-
- matches
-
-
-
- Number of relevant chunks to retrieve (1-20)
-
-
-
-
+ {nameError && (
+
{nameError}
)}
- >
+
+ )}
+
+
+
+
+
+
+ Agent Type
+
+
+
+
+
Agent Types
+ Conversation agents' responses are user-facing. You can use conversation agents for multi-turn conversations with users.
+
+
+ Task agents' responses are internal and available to other agents. You can use them to build pipelines and DAGs within workflows. E.g. Conversation Agent {'->'} Task Agent {'->'} Task Agent.
+
+
+
+
+
handleUpdate({
+ ...agent,
+ outputVisibility: value as z.infer['outputVisibility']
+ })}
+ />
+
+
+ {useRag && (
+
+
+ RAG
+
+
+
+
{
+ const key = keys.currentKey as string;
+ if (key) {
+ handleUpdate({
+ ...agent,
+ ragDataSources: [...(agent.ragDataSources || []), key]
+ });
+ }
+ }}
+ startContent={ }
+ >
+ {dataSources
+ .filter((ds) => !(agent.ragDataSources || []).includes(ds._id))
+ .map((ds) => (
+
+ {ds.name}
+
+ ))
+ }
+
+
+
+
+ {(agent.ragDataSources || []).map((source) => {
+ const ds = dataSources.find((ds) => ds._id === source);
+ return (
+
+
+
+
+
+ {ds?.name || "Unknown"}
+
+
+ Data Source
+
+
+
+
{
+ const newSources = agent.ragDataSources?.filter((s) => s !== source);
+ handleUpdate({
+ ...agent,
+ ragDataSources: newSources
+ });
+ }}
+ startContent={ }
+ >
+ Remove
+
+
+ );
+ })}
+
+
+ {agent.ragDataSources !== undefined && agent.ragDataSources.length > 0 && (
+ <>
+
+
setIsAdvancedConfigOpen(!isAdvancedConfigOpen)}
+ className="flex items-center gap-2 text-xs font-medium text-gray-500 dark:text-gray-400 uppercase hover:text-gray-700 dark:hover:text-gray-300 transition-colors"
+ >
+ {isAdvancedConfigOpen ?
+ :
+
+ }
+ Advanced RAG configuration
+
+
+ {isAdvancedConfigOpen && (
+
+
+
+
+ Return type
+
+
+ {["chunks", "content"].map((type) => (
+ handleUpdate({
+ ...agent,
+ ragReturnType: type as z.infer['ragReturnType']
+ })}
+ className={clsx(
+ "px-4 py-2 rounded-lg text-sm font-medium transition-colors",
+ agent.ragReturnType === type
+ ? "bg-indigo-50 dark:bg-indigo-900/20 text-indigo-600 dark:text-indigo-400 border-2 border-indigo-200 dark:border-indigo-800"
+ : "bg-white dark:bg-gray-800 text-gray-600 dark:text-gray-400 border border-gray-200 dark:border-gray-700 hover:border-gray-300 dark:hover:border-gray-600"
+ )}
+ >
+ {type.charAt(0).toUpperCase() + type.slice(1)}
+
+ ))}
+
+
+
+
+
+ Number of matches
+
+
+ handleUpdate({
+ ...agent,
+ ragK: parseInt(e.target.value)
+ })}
+ />
+
+ matches
+
+
+
+ Number of relevant chunks to retrieve (1-20)
+
+
+
+
+ )}
+
+ >
+ )}
+
+
+ )}
+
+
+
+
+ Model
+
+
+
+
+
Model Configuration
+ Set this according to the PROVIDER_BASE_URL you have set in your .env file (such as your LiteLLM, gateway).
+
+
+ E.g. LiteLLM's naming convention is like: 'claude-3-7-sonnet-latest', but you may have set alias model names or might be using a different provider like openrouter, openai etc.
+
+
+ By default, the model is set to gpt-4.1, assuming your OpenAI API key is set in PROVIDER_API_KEY and PROVIDER_BASE_URL is not set.
+
+
+
+
+
handleUpdate({
+ ...agent,
+ model: e.target.value as z.infer
['model']
+ })}
+ />
+
+
+ {USE_TRANSFER_CONTROL_OPTIONS && (
+
+
+ Conversation control after turn
+
+ handleUpdate({
+ ...agent,
+ controlType: value as z.infer['controlType']
+ })}
+ />
+
)}
-
- )}
+ )}
-
-
-
- Model
-
-
-
-
-
Model Configuration
- Set this according to the PROVIDER_BASE_URL you have set in your .env file (such as your LiteLLM, gateway).
-
-
- E.g. LiteLLM's naming convention is like: 'claude-3-7-sonnet-latest', but you may have set alias model names or might be using a different provider like openrouter, openai etc.
-
-
- By default, the model is set to gpt-4.1, assuming your OpenAI API key is set in PROVIDER_API_KEY and PROVIDER_BASE_URL is not set.
-
+ {activeTab === 'instructions' && (
+
+
+
+ Instructions
+
+ setShowGenerateModal(true)}
+ startContent={ }
+ >
+ Generate
+
+
+
+
+ {
+ handleUpdate({
+ ...agent,
+ instructions: value
+ });
+ }}
+ markdown
+ multiline
+ mentions
+ mentionsAtValues={atMentions}
+ showSaveButton={true}
+ showDiscardButton={true}
+ className="h-full min-h-0 border border-gray-200 dark:border-gray-700 rounded-lg focus-within:ring-2 focus-within:ring-indigo-500/20 dark:focus-within:ring-indigo-400/20 overflow-auto"
+ />
+
-
-
handleUpdate({
- ...agent,
- model: e.target.value as z.infer
['model']
- })}
- />
-
+ )}
- {USE_TRANSFER_CONTROL_OPTIONS && (
-
-
- Conversation control after turn
-
- handleUpdate({
- ...agent,
- controlType: value as z.infer['controlType']
- })}
- />
-
- )}
-
+ {activeTab === 'examples' && (
+
+
+ Examples
+
+
+
+ {
+ handleUpdate({
+ ...agent,
+ examples: value
+ });
+ }}
+ placeholder="Enter examples for this agent"
+ markdown
+ multiline
+ mentions
+ mentionsAtValues={atMentions}
+ showSaveButton={true}
+ showDiscardButton={true}
+ className="h-full min-h-0 border border-gray-200 dark:border-gray-700 rounded-lg focus-within:ring-2 focus-within:ring-indigo-500/20 dark:focus-within:ring-indigo-400/20 overflow-auto"
+ />
+
+
+
+ )}
+