Skip to content

Agent Zero AI framework

feat: add agent profile switcher to chat composer

Alessandro539d80978996
diff --git a/helpers/state_snapshot.py b/helpers/state_snapshot.py
index 578183925..6c8753270 100644
--- a/helpers/state_snapshot.py
+++ b/helpers/state_snapshot.py
@@ -112,6 +112,34 @@ def _coerce_non_negative_int(value: Any, default: int = 0) -> int:
return as_int if as_int >= 0 else default
+def _get_agent_profile_labels() -> dict[str, str]:
+ try:
+ from helpers import subagents
+
+ return {
+ str(item.get("key") or ""): str(item.get("label") or item.get("key") or "")
+ for item in subagents.get_all_agents_list()
+ if item.get("key")
+ }
+ except Exception:
+ return {}
+
+
+def _apply_agent_profile_metadata(
+ context_data: dict[str, Any],
+ ctx: AgentContext,
+ labels: dict[str, str],
+) -> None:
+ agent_config = getattr(getattr(ctx, "agent0", None), "config", None)
+ profile = str(
+ getattr(agent_config, "profile", None)
+ or getattr(getattr(ctx, "config", None), "profile", "")
+ or ""
+ )
+ context_data["agent_profile"] = profile
+ context_data["agent_profile_label"] = labels.get(profile, profile) if profile else ""
+
+
def parse_state_request_payload(payload: Mapping[str, Any]) -> StateRequestV1:
context = payload.get("context")
log_from = payload.get("log_from")
@@ -240,6 +268,7 @@ async def build_snapshot_from_request(*, request: StateRequestV1) -> SnapshotV1:
ctxs: list[dict[str, Any]] = []
tasks: list[dict[str, Any]] = []
processed_contexts: set[str] = set()
+ agent_profile_labels = _get_agent_profile_labels()
all_ctxs = AgentContext.all()
for ctx in all_ctxs:
@@ -251,6 +280,7 @@ async def build_snapshot_from_request(*, request: StateRequestV1) -> SnapshotV1:
continue
context_data = ctx.output()
+ _apply_agent_profile_metadata(context_data, ctx, agent_profile_labels)
context_task = scheduler.get_task_by_uuid(ctx.id)
is_task_context = context_task is not None and context_task.context_id == ctx.id
diff --git a/plugins/_model_config/extensions/webui/chat-input-progress-start/model-switcher.html b/plugins/_model_config/extensions/webui/chat-input-progress-start/model-switcher.html
index 477682630..8d740171d 100644
--- a/plugins/_model_config/extensions/webui/chat-input-progress-start/model-switcher.html
+++ b/plugins/_model_config/extensions/webui/chat-input-progress-start/model-switcher.html
@@ -5,105 +5,168 @@
<div x-data>
<template x-if="$store.modelConfig">
-<div x-data="{ showDropdown: false }"
+<div x-data="{ showDropdown: false, showProfileDropdown: false }"
x-init="
- await $store.modelConfig.refreshSwitcher($store.chats?.selected || '');
+ await Promise.all([
+ $store.modelConfig.refreshSwitcher($store.chats?.selected || ''),
+ $store.modelConfig.loadAgentProfiles(),
+ ]);
$watch('$store.chats.selected', v => $store.modelConfig.refreshSwitcher(v || ''));
">
- <template x-if="$store.modelConfig.switcherAllowed && !$store.modelConfig.switcherLoading">
+ <template x-if="($store.modelConfig.switcherAllowed && !$store.modelConfig.switcherLoading) || $store.chats?.selectedContext?.agent_profile">
<div class="model-switcher-container">
- <div class="model-switcher-anchor">
- <button class="btn-icon-action model-switcher-btn"
- :class="{ 'has-override': !!$store.modelConfig.switcherOverride }"
- @click="showDropdown = !showDropdown"
- @click.outside="showDropdown = false">
- <span class="material-symbols-outlined" style="font-size: 16px;">neurology</span>
- <span class="model-switcher-label" x-text="$store.modelConfig.getSwitcherLabel()"></span>
- <span class="material-symbols-outlined" style="font-size: 0.7rem;"
- x-text="showDropdown ? 'expand_less' : 'expand_more'"></span>
- </button>
+ <div class="model-context-strip">
+ <template x-if="$store.modelConfig.switcherAllowed && !$store.modelConfig.switcherLoading">
+ <div class="model-switcher-anchor" @click.outside="showDropdown = false">
+ <button class="btn-icon-action model-switcher-btn"
+ :class="{ 'has-override': !!$store.modelConfig.switcherOverride }"
+ @click="showDropdown = !showDropdown; showProfileDropdown = false">
+ <span class="material-symbols-outlined" style="font-size: 16px;">neurology</span>
+ <span class="model-switcher-label" x-text="$store.modelConfig.getSwitcherLabel()"></span>
+ <span class="material-symbols-outlined" style="font-size: 0.7rem;"
+ x-text="showDropdown ? 'expand_less' : 'expand_more'"></span>
+ </button>
- <!-- Inline active model pills (shown when a preset is active) -->
- <template x-if="$store.modelConfig.switcherOverride">
- <div class="model-switcher-active-pills">
- <template x-if="$store.modelConfig.getActiveModels().main">
- <div class="model-pill">
- <span class="model-pill-role">Main</span>
- <span class="model-pill-name" x-text="$store.modelConfig.getActiveModels().main.name"></span>
- </div>
- </template>
- <template x-if="$store.modelConfig.getActiveModels().utility">
- <div class="model-pill">
- <span class="model-pill-role">Util</span>
- <span class="model-pill-name" x-text="$store.modelConfig.getActiveModels().utility.name"></span>
+ <!-- Inline active model pills (shown when a preset is active) -->
+ <template x-if="$store.modelConfig.switcherOverride">
+ <div class="model-switcher-active-pills">
+ <template x-if="$store.modelConfig.getActiveModels().main">
+ <div class="model-pill">
+ <span class="model-pill-role">Main</span>
+ <span class="model-pill-name" x-text="$store.modelConfig.getActiveModels().main.name"></span>
+ </div>
+ </template>
+ <template x-if="$store.modelConfig.getActiveModels().utility">
+ <div class="model-pill">
+ <span class="model-pill-role">Util</span>
+ <span class="model-pill-name" x-text="$store.modelConfig.getActiveModels().utility.name"></span>
+ </div>
+ </template>
</div>
</template>
- </div>
- </template>
- <!-- Dropdown (opens upward) -->
- <div class="model-switcher-dropdown" x-show="showDropdown" x-transition.opacity>
- <!-- Use Default -->
- <template x-if="$store.modelConfig.switcherOverride">
- <div class="model-switcher-item revert" @click="
- $store.modelConfig.clearOverrideSwitch($store.chats?.selected || '');
- showDropdown = false;
- ">
- <span class="material-symbols-outlined" style="font-size: 15px;">undo</span>
- <span>Use Default</span>
- </div>
- </template>
- <div class="model-switcher-divider" x-show="$store.modelConfig.switcherOverride"></div>
+ <!-- Dropdown (opens upward) -->
+ <div class="model-switcher-dropdown" x-show="showDropdown" x-transition.opacity style="display: none;">
+ <!-- Use Default -->
+ <template x-if="$store.modelConfig.switcherOverride">
+ <div class="model-switcher-item revert" @click="
+ $store.modelConfig.clearOverrideSwitch($store.chats?.selected || '');
+ showDropdown = false;
+ ">
+ <span class="material-symbols-outlined" style="font-size: 15px;">undo</span>
+ <span>Use Default</span>
+ </div>
+ </template>
+ <div class="model-switcher-divider" x-show="$store.modelConfig.switcherOverride"></div>
- <!-- No presets message -->
- <template x-if="$store.modelConfig.switcherPresets.length === 0">
- <div class="model-switcher-item disabled">No presets configured</div>
- </template>
+ <!-- No presets message -->
+ <template x-if="$store.modelConfig.switcherPresets.length === 0">
+ <div class="model-switcher-item disabled">No presets configured</div>
+ </template>
- <!-- Preset list -->
- <template x-for="preset in $store.modelConfig.switcherPresets" :key="preset.name">
- <div class="model-switcher-item"
- :class="{ 'active': $store.modelConfig.switcherOverride?.preset_name === preset.name }"
- @click="
- $store.modelConfig.selectPresetSwitch($store.chats?.selected || '', preset.name);
- showDropdown = false;
- ">
- <div class="model-switcher-preset-name" x-text="preset.name"></div>
- <div class="model-switcher-preset-models">
- <template x-if="preset.chat?.name">
- <div class="model-switcher-model-row">
- <span class="model-switcher-model-label">Main</span>
- <span class="model-switcher-model-value">
- <span x-text="preset.chat.provider" style="opacity:0.5;"></span>
- <span style="opacity:0.3; margin:0 3px;">/</span>
- <span x-text="preset.chat.name"></span>
- </span>
+ <!-- Preset list -->
+ <template x-for="preset in $store.modelConfig.switcherPresets" :key="preset.name">
+ <div class="model-switcher-item"
+ :class="{ 'active': $store.modelConfig.switcherOverride?.preset_name === preset.name }"
+ @click="
+ $store.modelConfig.selectPresetSwitch($store.chats?.selected || '', preset.name);
+ showDropdown = false;
+ ">
+ <div class="model-switcher-preset-name" x-text="preset.name"></div>
+ <div class="model-switcher-preset-models">
+ <template x-if="preset.chat?.name">
+ <div class="model-switcher-model-row">
+ <span class="model-switcher-model-label">Main</span>
+ <span class="model-switcher-model-value">
+ <span x-text="preset.chat.provider" style="opacity:0.5;"></span>
+ <span style="opacity:0.3; margin:0 3px;">/</span>
+ <span x-text="preset.chat.name"></span>
+ </span>
+ </div>
+ </template>
+ <template x-if="preset.utility?.name">
+ <div class="model-switcher-model-row">
+ <span class="model-switcher-model-label">Utility</span>
+ <span class="model-switcher-model-value">
+ <span x-text="preset.utility.provider" style="opacity:0.5;"></span>
+ <span style="opacity:0.3; margin:0 3px;">/</span>
+ <span x-text="preset.utility.name"></span>
+ </span>
+ </div>
+ </template>
</div>
- </template>
- <template x-if="preset.utility?.name">
- <div class="model-switcher-model-row">
- <span class="model-switcher-model-label">Utility</span>
- <span class="model-switcher-model-value">
- <span x-text="preset.utility.provider" style="opacity:0.5;"></span>
- <span style="opacity:0.3; margin:0 3px;">/</span>
- <span x-text="preset.utility.name"></span>
- </span>
- </div>
- </template>
+ </div>
+ </template>
+
+ <!-- Edit Presets shortcut -->
+ <div class="model-switcher-divider" style="opacity:0.2;"></div>
+ <div class="model-switcher-item model-switcher-edit" @click="
+ openModal('/plugins/_model_config/webui/main.html');
+ showDropdown = false;
+ ">
+ <span class="material-symbols-outlined" style="font-size: 14px;">tune</span>
+ <span>Edit Presets</span>
</div>
</div>
- </template>
+ </div>
+ </template>
+
+ <template x-if="$store.chats?.selectedContext?.agent_profile">
+ <div class="agent-profile-anchor" @click.outside="showProfileDropdown = false">
+ <button class="btn-icon-action agent-profile-btn"
+ title="Active agent profile"
+ @click="showProfileDropdown = !showProfileDropdown; showDropdown = false">
+ <span class="material-symbols-outlined" style="font-size: 15px;">assignment_ind</span>
+ <span class="agent-profile-label"
+ x-text="$store.chats.selectedContext.agent_profile_label || $store.chats.selectedContext.agent_profile"></span>
+ <span class="material-symbols-outlined" style="font-size: 0.7rem;"
+ x-text="showProfileDropdown ? 'expand_less' : 'expand_more'"></span>
+ </button>
+
+ <div class="agent-profile-dropdown" x-show="showProfileDropdown" x-transition.opacity style="display: none;">
+ <button class="model-switcher-item agent-profile-create" @click="
+ $store.modelConfig.createAgentProfileChat($store.chats?.selected || '')
+ .then(ok => { if (ok) showProfileDropdown = false; });
+ ">
+ <span class="material-symbols-outlined" style="font-size: 15px;">add</span>
+ <span>Create new Agent Profile</span>
+ </button>
+
+ <div class="model-switcher-divider" style="opacity:0.2;"></div>
- <!-- Edit Presets shortcut -->
- <div class="model-switcher-divider" style="opacity:0.2;"></div>
- <div class="model-switcher-item model-switcher-edit" @click="
- openModal('/plugins/_model_config/webui/main.html');
- showDropdown = false;
- ">
- <span class="material-symbols-outlined" style="font-size: 14px;">tune</span>
- <span>Edit Presets</span>
+ <template x-if="$store.modelConfig.agentProfilesLoading">
+ <div class="model-switcher-item disabled">Loading profiles...</div>
+ </template>
+
+ <template x-for="profile in $store.modelConfig.getAgentProfileList($store.chats.selectedContext.agent_profile, $store.chats.selectedContext.agent_profile_label)" :key="profile.key">
+ <div class="model-switcher-item agent-profile-item"
+ :class="{
+ 'active': profile.key === $store.chats.selectedContext.agent_profile,
+ 'disabled': $store.chats.selectedContext.running || $store.modelConfig.agentProfileSaving
+ }"
+ @click="
+ if (profile.key === $store.chats.selectedContext.agent_profile) {
+ showProfileDropdown = false;
+ } else {
+ $store.modelConfig.selectAgentProfile($store.chats?.selected || '', profile.key)
+ .then(ok => { if (ok) showProfileDropdown = false; });
+ }
+ ">
+ <div class="model-switcher-preset-name" x-text="profile.label || profile.key"></div>
+ </div>
+ </template>
+
+ <div class="model-switcher-divider" style="opacity:0.2;"></div>
+ <button class="model-switcher-item agent-profile-settings" @click="
+ openModal('settings/settings.html');
+ showProfileDropdown = false;
+ ">
+ <span class="material-symbols-outlined" style="font-size: 14px;">settings</span>
+ <span>Agent Config</span>
+ </button>
+ </div>
</div>
- </div>
+ </template>
</div>
</div>
</template>
@@ -116,6 +179,13 @@
position: relative;
z-index: 10;
}
+ .model-context-strip {
+ display: flex;
+ align-items: center;
+ gap: 8px;
+ min-width: 0;
+ flex-wrap: wrap;
+ }
.model-switcher-anchor {
position: relative;
display: flex;
@@ -143,6 +213,29 @@
overflow: hidden;
text-overflow: ellipsis;
}
+ .agent-profile-anchor {
+ position: relative;
+ display: flex;
+ align-items: center;
+ }
+ .agent-profile-btn {
+ width: auto;
+ height: auto;
+ gap: 4px;
+ padding: var(--spacing-xs) var(--spacing-sm);
+ border: none;
+ font-size: 0.75rem;
+ white-space: nowrap;
+ flex-shrink: 0;
+ }
+ .agent-profile-btn:hover {
+ border: none;
+ }
+ .agent-profile-label {
+ max-width: 140px;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ }
/* Inline active model pills */
.model-switcher-active-pills {
@@ -170,7 +263,7 @@
opacity: 0.55;
font-size: 0.62rem;
text-transform: uppercase;
- letter-spacing: 0.03em;
+ letter-spacing: 0;
flex-shrink: 0;
}
.model-pill-name {
@@ -195,6 +288,21 @@
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
z-index: 100;
}
+ .agent-profile-dropdown {
+ position: absolute;
+ bottom: calc(100% + 6px);
+ left: 0;
+ min-width: 260px;
+ max-width: min(320px, 90vw);
+ max-height: 550px;
+ overflow-y: auto;
+ background-color: var(--color-panel);
+ border: 1px solid var(--color-border);
+ border-radius: 8px;
+ padding: 6px;
+ box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
+ z-index: 100;
+ }
.model-switcher-item {
padding: 6px 10px;
border-radius: 6px;
@@ -263,11 +371,37 @@
opacity: 0.6;
font-size: 0.75rem;
}
+ .agent-profile-settings {
+ display: flex;
+ align-items: center;
+ gap: 6px;
+ width: 100%;
+ border: none;
+ background: transparent;
+ color: var(--color-text);
+ opacity: 0.7;
+ text-align: left;
+ font-family: inherit;
+ }
+ .agent-profile-create {
+ display: flex;
+ align-items: center;
+ gap: 6px;
+ width: 100%;
+ border: none;
+ background: transparent;
+ color: var(--color-text);
+ font-family: inherit;
+ font-weight: 500;
+ }
/* Responsive: hide pills on narrow screens */
@media (max-width: 600px) {
.model-switcher-active-pills {
display: none;
}
+ .agent-profile-label {
+ max-width: 92px;
+ }
}
</style>
diff --git a/plugins/_model_config/webui/api-keys-mixin.js b/plugins/_model_config/webui/api-keys-mixin.js
index 6db3c3b7f..7e36a62aa 100644
--- a/plugins/_model_config/webui/api-keys-mixin.js
+++ b/plugins/_model_config/webui/api-keys-mixin.js
@@ -1,3 +1,5 @@
+import { fetchApi } from "/js/api.js";
+
const API_BASE = "/plugins/_model_config";
const API_KEY_PLACEHOLDER = "************";
diff --git a/plugins/_model_config/webui/config.html b/plugins/_model_config/webui/config.html
index 4c25faf5b..ebfde4021 100644
--- a/plugins/_model_config/webui/config.html
+++ b/plugins/_model_config/webui/config.html
@@ -75,7 +75,7 @@
margin-top: 4px;
}
.override-presets-link .text-button {
- font-size: 0.78rem;
+ font-size: 0.78rem !important;
gap: 4px;
}
diff --git a/plugins/_model_config/webui/model-config-store.js b/plugins/_model_config/webui/model-config-store.js
index 0633fe177..1f68e5d01 100644
--- a/plugins/_model_config/webui/model-config-store.js
+++ b/plugins/_model_config/webui/model-config-store.js
@@ -1,4 +1,5 @@
import { createStore } from "/js/AlpineStore.js";
+import { fetchApi } from "/js/api.js";
import { store as pluginSettingsStore } from "/components/plugins/plugin-settings-store.js";
import { apiKeysState, apiKeysMethods } from "/plugins/_model_config/webui/api-keys-mixin.js";
import { switcherState, switcherMethods } from "/plugins/_model_config/webui/switcher-mixin.js";
diff --git a/plugins/_model_config/webui/switcher-mixin.js b/plugins/_model_config/webui/switcher-mixin.js
index c614d35bf..0205301f1 100644
--- a/plugins/_model_config/webui/switcher-mixin.js
+++ b/plugins/_model_config/webui/switcher-mixin.js
@@ -1,13 +1,48 @@
+import { fetchApi } from "/js/api.js";
+
const API_BASE = "/plugins/_model_config";
+const CREATE_AGENT_PROFILE_PROMPT = `I want to create a new Agent Zero agent profile.
+
+Use the a0-create-agent skill and guide me through the questionnaire. Start by asking what kind of agent profile I want to create, where it should live, and what behavior/personality/tools it should have. Prefer a normal user profile in /a0/usr/agents unless I choose another scope.`;
export const switcherState = {
switcherAllowed: false,
switcherOverride: null,
switcherPresets: [],
switcherLoading: true,
+ agentProfiles: [],
+ agentProfilesLoading: true,
+ agentProfileSettings: null,
+ agentProfileSaving: false,
};
export const switcherMethods = {
+ async loadAgentProfiles(force = false) {
+ if (!force && this.agentProfiles.length > 0 && this.agentProfileSettings) return this.agentProfiles;
+ this.agentProfilesLoading = true;
+ try {
+ const res = await fetchApi("/settings_get", {
+ method: "POST",
+ headers: { "Content-Type": "application/json" },
+ body: JSON.stringify({}),
+ });
+ const data = await res.json();
+ this.agentProfileSettings = data.settings || {};
+ this.agentProfiles = (data.additional?.agent_subdirs || [])
+ .map(profile => ({
+ key: profile.value || profile.key || "",
+ label: profile.label || profile.value || profile.key || "",
+ }))
+ .filter(profile => profile.key && profile.key !== "_example");
+ } catch (e) {
+ console.error("Agent profile list load failed:", e);
+ this.agentProfiles = [];
+ } finally {
+ this.agentProfilesLoading = false;
+ }
+ return this.agentProfiles;
+ },
+
async loadSwitcherState(contextId) {
const result = { allowed: false, presets: [], override: null };
try {
@@ -57,6 +92,98 @@ export const switcherMethods = {
}
},
+ getAgentProfileList(activeKey = "", activeLabel = "") {
+ const profiles = [...(this.agentProfiles || [])];
+ if (activeKey && !profiles.some(profile => profile.key === activeKey)) {
+ profiles.unshift({ key: activeKey, label: activeLabel || activeKey });
+ }
+ return profiles;
+ },
+
+ async createAgentProfileChat(currentContextId = "") {
+ try {
+ const res = await fetchApi("/chat_create", {
+ method: "POST",
+ headers: { "Content-Type": "application/json" },
+ body: JSON.stringify({ current_context: currentContextId || "" }),
+ });
+ const data = await res.json();
+ if (!data.ok || !data.ctxid) return false;
+
+ const chatsStore = window.Alpine?.store("chats");
+ if (chatsStore?.selectChat) {
+ await chatsStore.selectChat(data.ctxid);
+ } else {
+ window.setContext?.(data.ctxid);
+ }
+
+ const chatInputStore = window.Alpine?.store("chatInput");
+ if (chatInputStore) {
+ chatInputStore.message = CREATE_AGENT_PROFILE_PROMPT;
+ setTimeout(() => {
+ chatInputStore.adjustTextareaHeight?.();
+ chatInputStore.focus?.();
+ }, 0);
+ }
+
+ return true;
+ } catch (e) {
+ console.error("Failed to create agent profile chat:", e);
+ window.toastFetchError?.("Failed to start profile creator", e);
+ return false;
+ }
+ },
+
+ async selectAgentProfile(contextId, agentProfile) {
+ if (!contextId || !agentProfile) return false;
+ if (this.agentProfileSaving) return false;
+ const chatsStore = window.Alpine?.store("chats");
+ const selectedContext = chatsStore?.selectedContext;
+ if (selectedContext?.running) {
+ window.justToast?.("Agent profile can be changed after the current run finishes.", "warning", 2500, "agent-profile-switch");
+ return false;
+ }
+
+ const activeProfile = selectedContext?.agent_profile || this.agentProfileSettings?.agent_profile || "";
+ if (activeProfile === agentProfile) return true;
+
+ this.agentProfileSaving = true;
+ try {
+ await this.loadAgentProfiles();
+ const settings = { ...(this.agentProfileSettings || {}), agent_profile: agentProfile };
+ const res = await fetchApi("/settings_set", {
+ method: "POST",
+ headers: { "Content-Type": "application/json" },
+ body: JSON.stringify({ settings }),
+ });
+ const data = await res.json();
+ if (!data.settings) return false;
+
+ this.agentProfileSettings = data.settings;
+ this.agentProfiles = (data.additional?.agent_subdirs || this.agentProfiles)
+ .map(profile => ({
+ key: profile.value || profile.key || "",
+ label: profile.label || profile.value || profile.key || "",
+ }))
+ .filter(profile => profile.key && profile.key !== "_example");
+
+ const label = this.agentProfiles.find(profile => profile.key === agentProfile)?.label || agentProfile;
+ if (selectedContext) {
+ selectedContext.agent_profile = agentProfile;
+ selectedContext.agent_profile_label = label;
+ }
+ document.dispatchEvent(new CustomEvent("settings-updated", { detail: this.agentProfileSettings }));
+ window.justToast?.(`Agent profile: ${label}`, "success", 1600, "agent-profile-switch");
+ return true;
+ } catch (e) {
+ console.error("Failed to set active agent profile:", e);
+ window.toastFetchError?.("Failed to set agent profile", e);
+ return false;
+ } finally {
+ this.agentProfileSaving = false;
+ }
+ },
+
getPresetLabel(preset) {
return preset?.name || "Unnamed";
},
diff --git a/skills/a0-new-agent/SKILL.md b/skills/a0-create-agent/SKILL.md
similarity index 99%
rename from skills/a0-new-agent/SKILL.md
rename to skills/a0-create-agent/SKILL.md
index 6f3cade7e..5413c053b 100644
--- a/skills/a0-new-agent/SKILL.md
+++ b/skills/a0-create-agent/SKILL.md
@@ -1,15 +1,13 @@
---
-name: a0-new-agent
+name: a0-create-agent
description: Create a new Agent Zero agent profile (subordinate). Covers where profiles live (user / plugin-distributed / project-scoped), the agent.yaml schema, the prompt inheritance & override model, and optional profile-specific tools and extensions. Use for any "create/add/new agent profile" request.
version: 1.0.0
tags: ["agents", "profile", "create", "new", "subordinate"]
trigger_patterns:
- - "create agent profile"
+ - "create agent"
- "new agent profile"
- "add agent profile"
- "make agent profile"
- - "new subordinate agent"
- - "create subordinate"
- "agent profile template"
- "build agent profile"
---
diff --git a/skills/a0-development/SKILL.md b/skills/a0-development/SKILL.md
index eab9ca563..869ed7c3d 100644
--- a/skills/a0-development/SKILL.md
+++ b/skills/a0-development/SKILL.md
@@ -455,7 +455,7 @@ class MyEndpoint(ApiHandler):
Agent profiles define specialized subordinates with custom prompts and behaviors.
-> For a guided, step-by-step wizard (scope selection, `agent.yaml` schema, prompt overrides, tool/extension stubs, test checklist) use the dedicated `/a0/skills/a0-new-agent/SKILL.md` skill.
+> For a guided, step-by-step wizard (scope selection, `agent.yaml` schema, prompt overrides, tool/extension stubs, test checklist) use the dedicated `/a0/skills/a0-create-agent/SKILL.md` skill.
### Profile Directory Structure
diff --git a/webui/components/plugins/plugin-settings-store.js b/webui/components/plugins/plugin-settings-store.js
index 93c7866c2..e5e5dd59d 100644
--- a/webui/components/plugins/plugin-settings-store.js
+++ b/webui/components/plugins/plugin-settings-store.js
@@ -1,9 +1,9 @@
import { createStore } from "/js/AlpineStore.js";
import * as api from "/js/api.js";
+import { fetchApi } from "/js/api.js";
import { showConfirmDialog } from "/js/confirmDialog.js";
import { store as pluginToggleStore } from "/components/plugins/toggle/plugin-toggle-store.js";
-const fetchApi = globalThis.fetchApi;
const justToast = globalThis.justToast;
const model = {
diff --git a/webui/components/plugins/toggle/plugin-toggle-store.js b/webui/components/plugins/toggle/plugin-toggle-store.js
index 7332c90f3..f1c99e19f 100644
--- a/webui/components/plugins/toggle/plugin-toggle-store.js
+++ b/webui/components/plugins/toggle/plugin-toggle-store.js
@@ -1,8 +1,7 @@
import { createStore } from "/js/AlpineStore.js";
+import { fetchApi } from "/js/api.js";
import { store as settingsStore } from "/components/plugins/plugin-settings-store.js";
-const fetchApi = globalThis.fetchApi;
-
const model = {
pluginName: null,