Skip to content

Open-source personal finance manager. Self-hosted, privacy-first.

feat(agents): add built-in agent templates with one-click creation (#1271)

Tássio Noronha410a847c5d77
diff --git a/backend/app/agents/schemas/agent.py b/backend/app/agents/schemas/agent.py
index 4cc70e10..46109d5c 100644
--- a/backend/app/agents/schemas/agent.py
+++ b/backend/app/agents/schemas/agent.py
@@ -26,6 +26,10 @@ class AgentCreate(BaseModel):
extra: dict[str, Any] = Field(default_factory=dict)
auto_context: bool = True
is_default: bool = False
+ # Optional tool whitelist written in the same transaction as the agent,
+ # so an agent created with a tool scope never exists without it. Left
+ # out (None), the agent keeps the allow-all default.
+ tools: Optional[list["AgentToolToggle"]] = None
class AgentUpdate(BaseModel):
diff --git a/backend/app/agents/services/agent_service.py b/backend/app/agents/services/agent_service.py
index 09e79913..91a4e198 100644
--- a/backend/app/agents/services/agent_service.py
+++ b/backend/app/agents/services/agent_service.py
@@ -89,6 +89,13 @@ async def create_agent(
auto_context=data.auto_context,
)
session.add(agent)
+ if data.tools is not None:
+ await session.flush()
+ for item in data.tools:
+ session.add(AgentTool(
+ agent_id=agent.id, server=item.server,
+ tool_name=item.tool_name, enabled=item.enabled,
+ ))
await session.commit()
await session.refresh(agent)
return agent
diff --git a/backend/tests/test_agents_api.py b/backend/tests/test_agents_api.py
index bdd96721..5ba7baf2 100644
--- a/backend/tests/test_agents_api.py
+++ b/backend/tests/test_agents_api.py
@@ -484,3 +484,46 @@ async def test_put_tools_persists_selection(
pairs = await agent_service.allowed_tool_pairs(session, a.id)
assert pairs == {("securo", "list_transactions")}
+
+
+async def test_create_with_tools_scopes_the_agent_in_one_step(
+ client: AsyncClient, auth_headers: dict, session: AsyncSession
+):
+ """An agent created with a tool list has its whitelist from the start,
+ so it is never left running with every discovered tool."""
+ from app.agents.services.agent_service import allowed_tool_pairs
+
+ resp = await client.post("/api/agents", headers=auth_headers, json={
+ "name": "1188 Scoped",
+ "tools": [
+ {"server": "securo", "tool_name": "list_budgets", "enabled": True},
+ {"server": "securo", "tool_name": "get_budget_vs_actual", "enabled": True},
+ ],
+ })
+ assert resp.status_code == 201, resp.text
+ allowed = await allowed_tool_pairs(session, uuid.UUID(resp.json()["id"]))
+ assert allowed == {("securo", "list_budgets"), ("securo", "get_budget_vs_actual")}
+
+
+async def test_create_with_tools_is_atomic(
+ session: AsyncSession, test_user, test_workspace
+):
+ """If the tool rows cannot be written, the agent is not created either:
+ no agent is left behind without its whitelist (which means allow-all)."""
+ from sqlalchemy import select
+ from sqlalchemy.exc import IntegrityError
+
+ from app.agents.models.agent import Agent
+ from app.agents.schemas.agent import AgentCreate, AgentToolToggle
+ from app.agents.services.agent_service import create_agent
+
+ duplicate = AgentToolToggle(server="securo", tool_name="list_budgets", enabled=True)
+ data = AgentCreate(name="1188 Atomic", tools=[duplicate, duplicate])
+ with pytest.raises(IntegrityError):
+ await create_agent(session, test_workspace.id, test_user.id, data)
+ await session.rollback()
+
+ rows = (await session.execute(
+ select(Agent).where(Agent.name == "1188 Atomic")
+ )).scalars().all()
+ assert rows == []
diff --git a/frontend/src/components/agents/agent-form-dialog.tsx b/frontend/src/components/agents/agent-form-dialog.tsx
index 88848efc..99f090fa 100644
--- a/frontend/src/components/agents/agent-form-dialog.tsx
+++ b/frontend/src/components/agents/agent-form-dialog.tsx
@@ -18,15 +18,18 @@ import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@
import { Switch } from '@/components/ui/switch'
import { agents } from '@/lib/api'
import type { Agent } from '@/lib/api'
+import { BUILTIN_MCP_SERVER, type AgentTemplate } from '@/lib/agent-templates'
interface Props {
open: boolean
onOpenChange: (open: boolean) => void
agent?: Agent | null
providers: string[]
+ /** When set (create mode only), the form starts filled from this template. */
+ preset?: AgentTemplate | null
}
-export function AgentFormDialog({ open, onOpenChange, agent }: Props) {
+export function AgentFormDialog({ open, onOpenChange, agent, preset }: Props) {
const { t } = useTranslation()
const qc = useQueryClient()
const isEdit = !!agent
@@ -60,9 +63,11 @@ export function AgentFormDialog({ open, onOpenChange, agent }: Props) {
setAutoContext(agent.auto_context ?? true)
setIsDefault(agent.is_default ?? false)
} else {
- setName('')
- setDescription('')
- setSystemPrompt('')
+ // A template preset (if any) fills the form as a starting point;
+ // everything stays editable before the agent is created.
+ setName(preset ? t(preset.nameKey) : '')
+ setDescription(preset ? t(preset.descriptionKey) : '')
+ setSystemPrompt(preset?.systemPrompt ?? '')
// Pre-select the user's default connection (or the only one,
// if there's just one) so the form is one click closer to done.
setConnectionId('')
@@ -71,7 +76,7 @@ export function AgentFormDialog({ open, onOpenChange, agent }: Props) {
setAutoContext(true)
setIsDefault(false)
}
- }, [agent, open])
+ }, [agent, open, preset, t])
// When connections load (or the dialog opens), pre-select the most
// sensible default: the user-flagged default connection, or the only
@@ -88,7 +93,16 @@ export function AgentFormDialog({ open, onOpenChange, agent }: Props) {
const saveMut = useMutation({
mutationFn: (payload: Partial<Agent> & { name: string }) =>
- isEdit && agent ? agents.update(agent.id, payload) : agents.create(payload),
+ isEdit && agent
+ ? agents.update(agent.id, payload)
+ : agents.create({
+ ...payload,
+ // An agent started from a template is saved with the template's
+ // tool scope in the same call, like the one-click path.
+ ...(preset && preset.tools.length > 0
+ ? { tools: preset.tools.map((tool) => ({ server: BUILTIN_MCP_SERVER, tool_name: tool, enabled: true })) }
+ : {}),
+ }),
onSuccess: () => {
qc.invalidateQueries({ queryKey: ['agents'] })
onOpenChange(false)
@@ -128,6 +142,11 @@ export function AgentFormDialog({ open, onOpenChange, agent }: Props) {
<DialogContent className="max-w-xl">
<DialogHeader>
<DialogTitle>{isEdit ? t('agents.form.editTitle') : t('agents.form.createTitle')}</DialogTitle>
+ {!isEdit && preset && (
+ <p className="text-xs text-muted-foreground">
+ {t('agents.templates.presetHint', { template: t(preset.nameKey) })}
+ </p>
+ )}
</DialogHeader>
<div className="grid gap-4 py-2">
<div className="grid gap-2">
diff --git a/frontend/src/components/agents/agent-templates.tsx b/frontend/src/components/agents/agent-templates.tsx
new file mode 100644
index 00000000..7f4ea9c3
--- /dev/null
+++ b/frontend/src/components/agents/agent-templates.tsx
@@ -0,0 +1,63 @@
+import { useTranslation } from 'react-i18next'
+import { Loader2, Plus } from 'lucide-react'
+import { Button } from '@/components/ui/button'
+import { AGENT_TEMPLATES, type AgentTemplate } from '@/lib/agent-templates'
+
+interface Props {
+ /** Creates an agent from the template (one click) or opens the form prefilled. */
+ onCreate: (template: AgentTemplate) => void
+ /** Id of the template whose one-click creation is in flight, if any. */
+ busyId: string | null
+ /** Disables every card, e.g. while the LLM connections are still loading. */
+ disabled?: boolean
+}
+
+/**
+ * "Start from a template" grid on the Agents page. Each card creates a
+ * ready-made agent (tuned system prompt plus the tools it needs) in one
+ * click; the resulting agent is a normal agent, editable afterwards.
+ */
+export function AgentTemplatesSection({ onCreate, busyId, disabled = false }: Props) {
+ const { t } = useTranslation()
+
+ return (
+ <section className="mb-6" aria-label={t('agents.templates.title')}>
+ <h2 className="text-sm font-semibold mb-1">{t('agents.templates.title')}</h2>
+ <p className="text-sm text-muted-foreground mb-3 max-w-2xl">{t('agents.templates.subtitle')}</p>
+ <div className="grid gap-3 sm:grid-cols-2">
+ {AGENT_TEMPLATES.map((tpl) => {
+ const Icon = tpl.icon
+ const busy = busyId === tpl.id
+ return (
+ <div
+ key={tpl.id}
+ className="bg-card rounded-xl border border-border shadow-sm p-4 flex flex-col gap-3"
+ >
+ <div className="flex items-start gap-3">
+ <div className="h-9 w-9 rounded-md bg-primary/10 text-primary flex items-center justify-center shrink-0">
+ <Icon className="h-4 w-4" />
+ </div>
+ <div className="min-w-0">
+ <div className="text-sm font-semibold">{t(tpl.nameKey)}</div>
+ <p className="text-xs text-muted-foreground mt-0.5">{t(tpl.descriptionKey)}</p>
+ </div>
+ </div>
+ <div className="mt-auto">
+ <Button
+ size="sm"
+ variant="outline"
+ className="w-full gap-1.5"
+ disabled={disabled || busyId !== null}
+ onClick={() => onCreate(tpl)}
+ >
+ {busy ? <Loader2 className="h-3.5 w-3.5 animate-spin" /> : <Plus className="h-3.5 w-3.5" />}
+ {t('agents.templates.create')}
+ </Button>
+ </div>
+ </div>
+ )
+ })}
+ </div>
+ </section>
+ )
+}
diff --git a/frontend/src/lib/agent-templates.test.ts b/frontend/src/lib/agent-templates.test.ts
new file mode 100644
index 00000000..2319599b
--- /dev/null
+++ b/frontend/src/lib/agent-templates.test.ts
@@ -0,0 +1,101 @@
+/// <reference types="node" />
+import { readFileSync, readdirSync } from 'node:fs'
+import path from 'node:path'
+import { fileURLToPath } from 'node:url'
+import { describe, expect, it } from 'vitest'
+import { AGENT_TEMPLATES, BUILTIN_MCP_SERVER } from '@/lib/agent-templates'
+
+const LOCALES_DIR = path.join(path.dirname(fileURLToPath(import.meta.url)), '..', 'locales')
+
+// Built-in MCP tool contract. If a tool is renamed or removed on the
+// backend, every template that references it must be reviewed here.
+const KNOWN_BUILTIN_TOOLS = new Set([
+ 'aggregate',
+ 'get_account_summary',
+ 'get_budget_vs_actual',
+ 'get_cash_flow',
+ 'get_dashboard_snapshot',
+ 'get_group_balances',
+ 'get_income_expenses',
+ 'get_net_worth',
+ 'list_accounts',
+ 'list_assets',
+ 'list_budgets',
+ 'list_categories',
+ 'list_goals',
+ 'list_groups',
+ 'list_group_settlements',
+ 'list_payees',
+ 'list_recurring_transactions',
+ 'list_rules',
+ 'list_transactions',
+ 'preview_rule',
+ 'propose_cancel_recurring_transaction',
+ 'propose_categorize',
+ 'propose_create_budget',
+ 'propose_create_category',
+ 'propose_create_goal',
+ 'propose_create_payee_rule',
+ 'propose_create_recurring_transaction',
+ 'propose_create_rule',
+ 'propose_create_transaction',
+ 'propose_delete_rule',
+ 'propose_update_recurring_transaction',
+ 'propose_update_rule',
+ 'search_all',
+ 'search_knowledge_base',
+])
+
+function flattenKeys(obj: Record<string, unknown>, prefix = ''): string[] {
+ return Object.entries(obj).flatMap(([k, v]) => {
+ const full = prefix ? `${prefix}.${k}` : k
+ return v !== null && typeof v === 'object' && !Array.isArray(v)
+ ? flattenKeys(v as Record<string, unknown>, full)
+ : [full]
+ })
+}
+
+const LOCALES = readdirSync(LOCALES_DIR)
+ .filter((f: string) => f.endsWith('.json'))
+ .map((f: string) => f.replace(/\.json$/, ''))
+
+describe('agent templates', () => {
+ it('defines at least the templates requested by the community', () => {
+ const ids = AGENT_TEMPLATES.map((t) => t.id)
+ expect(ids).toContain('savings-advisor')
+ expect(ids).toContain('monthly-review')
+ expect(new Set(ids).size).toBe(ids.length)
+ })
+
+ it('keeps every template complete and well-formed', () => {
+ for (const tpl of AGENT_TEMPLATES) {
+ expect(tpl.nameKey, tpl.id).toMatch(/^agents\.templates\./)
+ expect(tpl.descriptionKey, tpl.id).toMatch(/^agents\.templates\./)
+ expect(tpl.systemPrompt.trim().length, tpl.id).toBeGreaterThan(200)
+ expect(tpl.tools.length, tpl.id).toBeGreaterThan(0)
+ // Public text rules: no em dash (U+2014) in shipped prompts.
+ expect(tpl.systemPrompt, tpl.id).not.toMatch(/\u2014/)
+ }
+ })
+
+ it('only references tools that exist on the built-in MCP server', () => {
+ expect(BUILTIN_MCP_SERVER).toBe('securo')
+ for (const tpl of AGENT_TEMPLATES) {
+ for (const tool of tpl.tools) {
+ expect(KNOWN_BUILTIN_TOOLS.has(tool), `${tpl.id} -> ${tool}`).toBe(true)
+ }
+ }
+ })
+
+ it('has translated name and description keys in every locale', () => {
+ for (const locale of LOCALES) {
+ const keys = new Set(flattenKeys(JSON.parse(readFileSync(path.join(LOCALES_DIR, `${locale}.json`), 'utf-8'))))
+ for (const tpl of AGENT_TEMPLATES) {
+ expect(keys.has(tpl.nameKey), `${locale} ${tpl.id} name`).toBe(true)
+ expect(keys.has(tpl.descriptionKey), `${locale} ${tpl.id} description`).toBe(true)
+ }
+ expect(keys.has('agents.templates.title'), `${locale} title`).toBe(true)
+ expect(keys.has('agents.templates.create'), `${locale} create`).toBe(true)
+ }
+ })
+})
diff --git a/frontend/src/lib/agent-templates.ts b/frontend/src/lib/agent-templates.ts
new file mode 100644
index 00000000..b8edb2c7
--- /dev/null
+++ b/frontend/src/lib/agent-templates.ts
@@ -0,0 +1,155 @@
+/**
+ * Built-in agent templates: ready-made starting points that create an agent
+ * in one click from the Agents page.
+ *
+ * Each template carries:
+ * - localized name and description (i18n keys under `agents.templates`);
+ * - a language-neutral system prompt, in the spirit of the MCP tool
+ * descriptions (the reply language follows the user's language, the
+ * instructions do not depend on it);
+ * - the built-in MCP tools the agent is expected to lean on. On creation the
+ * agent is scoped to exactly those tools; the user can enable more later
+ * from the agent's tools section.
+ *
+ * Templates are static product content, not user data: they ship with the
+ * app and are fully editable on the agent created from them.
+ */
+import type { LucideIcon } from 'lucide-react'
+import { CalendarCheck2, Gauge, PiggyBank, Repeat } from 'lucide-react'
+
+/** Name of the built-in MCP server that ships with the agents feature. */
+export const BUILTIN_MCP_SERVER = 'securo'
+
+export interface AgentTemplate {
+ /** Stable id, used as React key and for future per-template state. */
+ id: string
+ icon: LucideIcon
+ /** i18n key of the template name (agents.templates.<id>.name). */
+ nameKey: string
+ /** i18n key of the template description (agents.templates.<id>.description). */
+ descriptionKey: string
+ /** System prompt stored on the created agent. Language-neutral English. */
+ systemPrompt: string
+ /** Tool names on the built-in MCP server, enabled on the new agent. */
+ tools: string[]
+}
+
+const SAVINGS_ADVISOR_PROMPT = `You are the user's savings advisor, working with their Securo data.
+
+Your job is to find where the user can keep more of their money and turn each finding into a concrete suggestion.
+
+How to work:
+1. Compare this month's spending with the previous months, category by category. Use the transaction and aggregate tools for category numbers, and the budget tools for the limits the user already set.
+2. Highlight the categories that grew the most, and the sizable categories that have no budget at all.
+3. Check the recurring charges: subscriptions and repeated payments are the most common source of money the user forgets to cut.
+4. For each suggestion, state the amount involved and the period it refers to.
+5. When a suggestion matches a category that has no budget, or a budget that is looser than the user's actual spending, offer it as a budget proposal. Say the proposal was only made, not applied, until the user confirms it.
+
+Rules:
+- Only use numbers returned by your tools. Never invent or estimate figures.
+- Keep the answer focused: at most five suggestions, ordered by how much money each one frees up.
+- If the data covers too little time to compare (a month or two at most), say so before drawing conclusions.`
+
+const MONTHLY_REVIEW_PROMPT = `You run a monthly review of the user's finances with their Securo data.
+
+Your job is a clear summary of how the period went, with the numbers that matter.
+
+How to work:
+1. Start from the period's income and expense totals, its cash flow, and the change in net worth.
+2. Name the largest single expenses and the top expense categories.
+3. Flag anything unusual: a transaction far above what its category normally costs, a new recurring charge, or a category that jumped compared with recent months.
+4. Close with a short takeaway: what went well, and what to watch next month.
+
+Rules:
+- Only use numbers returned by your tools. Never invent or estimate figures.
+- Name the exact period you covered (month and year) so the user knows what the summary refers to.
+- Keep the summary compact enough to read in under a minute.`
+
+const BUDGET_WATCHER_PROMPT = `You watch the user's budgets against actual spending, using their Securo data.
+
+Your job is to say which budgets are safe, which are close to their limit, and which are already over.
+
+How to work:
+1. Load the budgets for the current period and compare each one with the actual spending so far.
+2. Group the result in three lists: over the limit, close to the limit (past 80% of it), and on track.
+3. For every budget that is close or over, state how much is left, how much was spent, and the period the comparison covers.
+4. If the user has no budgets yet, say so, and look at the biggest expense categories to suggest which ones to budget first.
+
+Rules:
+- Only use numbers returned by your tools. Never invent or estimate figures.
+- Percentages and remaining amounts must come from the budget comparison, not from mental math.`
+
+const RECURRING_AUDITOR_PROMPT = `You audit the user's recurring charges (subscriptions and similar repeated payments) using their Securo data.
+
+Your job is to list what the user pays on a recurring basis, and flag anything forgotten, duplicated, or increased.
+
+How to work:
+1. List the recurring transactions and group them by payee.
+2. Check the recent transactions for recurring-looking charges that are not registered as recurring yet, and add them to the list as likely recurring.
+3. Flag charges the user may have forgotten (nothing recent matches them), duplicate subscriptions for the same kind of service, and charges whose amount increased.
+4. Show the monthly cost of each charge, and the yearly cost of the whole list.
+
+Rules:
+- Only use numbers returned by your tools. Never invent or estimate figures.
+- When flagging a charge, quote its last occurrence and its amount.`
+
+export const AGENT_TEMPLATES: AgentTemplate[] = [
+ {
+ id: 'savings-advisor',
+ icon: PiggyBank,
+ nameKey: 'agents.templates.savingsAdvisor.name',
+ descriptionKey: 'agents.templates.savingsAdvisor.description',
+ systemPrompt: SAVINGS_ADVISOR_PROMPT,
+ tools: [
+ 'list_accounts',
+ 'list_categories',
+ 'list_budgets',
+ 'get_budget_vs_actual',
+ 'list_transactions',
+ 'aggregate',
+ 'list_recurring_transactions',
+ 'get_income_expenses',
+ 'propose_create_budget',
+ ],
+ },
+ {
+ id: 'monthly-review',
+ icon: CalendarCheck2,
+ nameKey: 'agents.templates.monthlyReview.name',
+ descriptionKey: 'agents.templates.monthlyReview.description',
+ systemPrompt: MONTHLY_REVIEW_PROMPT,
+ tools: [
+ 'get_income_expenses',
+ 'get_cash_flow',
+ 'get_net_worth',
+ 'get_dashboard_snapshot',
+ 'list_accounts',
+ 'get_account_summary',
+ 'list_transactions',
+ 'aggregate',
+ ],
+ },
+ {
+ id: 'budget-watcher',
+ icon: Gauge,
+ nameKey: 'agents.templates.budgetWatcher.name',
+ descriptionKey: 'agents.templates.budgetWatcher.description',
+ systemPrompt: BUDGET_WATCHER_PROMPT,
+ tools: ['list_budgets', 'get_budget_vs_actual', 'list_categories', 'list_transactions', 'aggregate'],
+ },
+ {
+ id: 'recurring-auditor',
+ icon: Repeat,
+ nameKey: 'agents.templates.recurringAuditor.name',
+ descriptionKey: 'agents.templates.recurringAuditor.description',
+ systemPrompt: RECURRING_AUDITOR_PROMPT,
+ tools: [
+ 'list_recurring_transactions',
+ 'list_payees',
+ 'list_categories',
+ 'list_transactions',
+ 'aggregate',
+ 'search_all',
+ ],
+ },
+]
diff --git a/frontend/src/lib/api.ts b/frontend/src/lib/api.ts
index af9b8d6c..c55f9f49 100644
--- a/frontend/src/lib/api.ts
+++ b/frontend/src/lib/api.ts
@@ -1893,7 +1893,13 @@ export const agents = {
const { data } = await api.get(`/agents/${id}`)
return data
},
- create: async (payload: Partial<Agent> & { name: string }): Promise<Agent> => {
+ create: async (
+ payload: Partial<Agent> & {
+ name: string
+ /** Tool whitelist saved with the agent in the same transaction. */
+ tools?: { server: string; tool_name: string; enabled: boolean }[]
+ },
+ ): Promise<Agent> => {
const { data } = await api.post('/agents', payload)
return data
},
diff --git a/frontend/src/locales/cs.json b/frontend/src/locales/cs.json
index d844e295..01559217 100644
--- a/frontend/src/locales/cs.json
+++ b/frontend/src/locales/cs.json
@@ -2671,6 +2671,28 @@
"finish": "Začít"
},
"agents": {
+ "templates": {
+ "title": "Začít šablonou",
+ "subtitle": "Hotoví agenti pro běžné úkoly. Jedním kliknutím vytvoříte plně funkčního agenta, který se dá přejmenovat a upravovat.",
+ "create": "Vytvořit",
+ "presetHint": "Vytváříte ze šablony {{template}}. Vše lze upravit.",
+ "savingsAdvisor": {
+ "name": "Doporučitel úspor",
+ "description": "Porovnává vaše výdaje měsíc od měsíce a navrhuje, kde ušetřit více."
+ },
+ "monthlyReview": {
+ "name": "Měsíční přehled",
+ "description": "Shrnuje váš měsíc: příjem, výdaje, čistá hodnota a na co dát pozor."
+ },
+ "budgetWatcher": {
+ "name": "Hlídka rozpočtu",
+ "description": "Drží palce vašim rozpočtům a říká, které jsou blízko limitu nebo ho překročily."
+ },
+ "recurringAuditor": {
+ "name": "Audit opakujících se plateb",
+ "description": "Vypisuje vaše odběry a upozorňuje na zapomenuté, duplicitní nebo zdražené platby."
+ }
+ },
"title": "Agenti",
"subtitle": "Vytvářet konverzační asistenty nad vlastními daty v Securo. Každý agent může mít vlastní znalostní bázi, nástroje a poskytovatele.",
"newAgent": "Nový agent",
diff --git a/frontend/src/locales/de.json b/frontend/src/locales/de.json
index db3485ae..9b145410 100644
--- a/frontend/src/locales/de.json
+++ b/frontend/src/locales/de.json
@@ -2520,6 +2520,28 @@
"finish": "Loslegen"
},
"agents": {
+ "templates": {
+ "title": "Mit einer Vorlage starten",
+ "subtitle": "Fertige Agenten für gängige Aufgaben. Ein Klick erstellt einen voll funktionsfähigen Agenten, den Sie umbenennen und bearbeiten können.",
+ "create": "Erstellen",
+ "presetHint": "Startet von der Vorlage {{template}}. Alles ist bearbeitbar.",
+ "savingsAdvisor": {
+ "name": "Sparberater",
+ "description": "Vergleicht Ihre Ausgaben Monat für Monat und schlägt vor, wo Sie mehr sparen können."
+ },
+ "monthlyReview": {
+ "name": "Monatsrückblick",
+ "description": "Fasst Ihren Monat zusammen: Einkommen, Ausgaben, Nettovermögen und worauf Sie achten sollten."
+ },
+ "budgetWatcher": {
+ "name": "Budgetwächter",
+ "description": "Behält Ihre Budgets im Auge und sagt, welche fast erreicht oder überschritten sind."
+ },
+ "recurringAuditor": {
+ "name": "Abo-Prüfer",
+ "description": "Listet Ihre Abonnements auf und markiert vergessene, doppelte oder erhöhte Zahlungen."
+ }
+ },
"title": "Agenten",
"subtitle": "Erstelle Konversationsassistenten basierend auf deinen Securo-Daten. Jeder Agent kann seine eigene Wissensdatenbank, Werkzeuge und Anbieter haben.",
"newAgent": "Neuer Agent",
diff --git a/frontend/src/locales/el.json b/frontend/src/locales/el.json
index 0c768a5e..59204fd0 100644
--- a/frontend/src/locales/el.json
+++ b/frontend/src/locales/el.json
@@ -2519,6 +2519,28 @@
"finish": "Ξεκινήστε"
},
"agents": {
+ "templates": {
+ "title": "Ξεκινήστε από πρότυπο",
+ "subtitle": "Έτοιμοι agent για συνηθισμένες εργασίες. Με ένα κλικ δημιουργείτε έναν πλήρως λειτουργικό agent, τον οποίο μπορείτε να μετονομάσετε και να επεξεργαστείτε.",
+ "create": "Δημιουργία",
+ "presetHint": "Ξεκινάει από το πρότυπο {{template}}. Όλα είναι επεξεργάσιμα.",
+ "savingsAdvisor": {
+ "name": "Συμβουλεύς αποταμίευσης",
+ "description": "Συγκρίνει τα έξοδά σας μήνα με μήνα και προτείνει πού μπορείτε να κρατήσετε περισσότερα."
+ },
+ "monthlyReview": {
+ "name": "Μηνιαία ανασκόπηση",
+ "description": "Συνθέτει τον μήνα σας: εισόδημα, έξοδα, καθαρή θέση και τι να προσέξετε."
+ },
+ "budgetWatcher": {
+ "name": "Φυλάκας προϋπολογισμού",
+ "description": "Παρακολουθεί τους προϋπολογισμούς σας και λέει ποιοί είναι κοντά στα όριά τους ή τα ξεπερνούν."
+ },
+ "recurringAuditor": {
+ "name": "Έλεγχος επαναλαμβανόμενων",
+ "description": "Καταγράφει τις συνδρομές σας και επισημαίνει ξεχασμένες, διπλές ή αυξημένες χρεώσεις."
+ }
+ },
"title": "Βοηθοί",
"subtitle": "Δημιουργήστε συνομιλιακούς βοηθούς πάνω στα δεδομένα σας στο Securo. Κάθε βοηθός μπορεί να έχει τη δική του βάση γνώσεων, εργαλεία και πάροχο.",
"newAgent": "Νέος βοηθός",
diff --git a/frontend/src/locales/en.json b/frontend/src/locales/en.json
index 3d0e1b03..2fbe7913 100644
--- a/frontend/src/locales/en.json
+++ b/frontend/src/locales/en.json
@@ -2519,6 +2519,28 @@
"finish": "Get Started"
},
"agents": {
+ "templates": {
+ "title": "Start from a template",
+ "subtitle": "Ready-made agents tuned for common jobs. One click creates a fully working agent you can rename and edit.",
+ "create": "Create",
+ "presetHint": "Starting from the {{template}} template. Everything is editable.",
+ "savingsAdvisor": {
+ "name": "Savings advisor",
+ "description": "Compares your spending month over month and suggests where to keep more."
+ },
+ "monthlyReview": {
+ "name": "Monthly review",
+ "description": "Summarizes your month: income, expenses, net worth, and what to watch."
+ },
+ "budgetWatcher": {
+ "name": "Budget watcher",
+ "description": "Keeps an eye on your budgets and tells you which ones are close or over."
+ },
+ "recurringAuditor": {
+ "name": "Recurring auditor",
+ "description": "Lists your subscriptions and flags forgotten, duplicated, or raised charges."
+ }
+ },
"title": "Agents",
"subtitle": "Build conversational assistants on top of your Securo data. Each agent can have its own knowledge base, tools, and provider.",
"newAgent": "New agent",
diff --git a/frontend/src/locales/es.json b/frontend/src/locales/es.json
index cee1d8be..c182684a 100644
--- a/frontend/src/locales/es.json
+++ b/frontend/src/locales/es.json
@@ -2523,6 +2523,28 @@
"finish": "Empezar"
},
"agents": {
+ "templates": {
+ "title": "Empezar con una plantilla",
+ "subtitle": "Agentes listos para tareas habituales. Un clic crea un agente totalmente funcional que puedes renombrar y editar.",
+ "create": "Crear",
+ "presetHint": "Empezando desde la plantilla {{template}}. Todo es editable.",
+ "savingsAdvisor": {
+ "name": "Asesor de ahorros",
+ "description": "Compara tus gastos mes a mes y sugiere dónde puedes ahorrar más."
+ },
+ "monthlyReview": {
+ "name": "Revisión mensual",
+ "description": "Resume tu mes: ingresos, gastos, patrimonio neto y qué vigilar."
+ },
+ "budgetWatcher": {
+ "name": "Vigilante de presupuestos",
+ "description": "Vigila tus presupuestos y te dice cuáles están cerca del límite o lo superan."
+ },
+ "recurringAuditor": {
+ "name": "Auditor de recurrentes",
+ "description": "Lista tus suscripciones y marca cargos olvidados, duplicados o aumentados."
+ }
+ },
"title": "Agentes",
"subtitle": "Crea asistentes conversacionales sobre tus datos de Securo. Cada agente puede tener su propia base de conocimiento, herramientas y proveedor.",
"newAgent": "Nuevo agente",
diff --git a/frontend/src/locales/fr.json b/frontend/src/locales/fr.json
index 70ff109f..a72bd8ad 100644
--- a/frontend/src/locales/fr.json
+++ b/frontend/src/locales/fr.json
@@ -2523,6 +2523,28 @@
"finish": "Commencer"
},
"agents": {
+ "templates": {
+ "title": "Commencer par un modèle",
+ "subtitle": "Des agents prêts à l'emploi pour des tâches courantes. Un clic crée un agent pleinement fonctionnel, renommable et modifiable.",
+ "create": "Créer",
+ "presetHint": "Démarrage depuis le modèle {{template}}. Tout est modifiable.",
+ "savingsAdvisor": {
+ "name": "Conseiller en épargne",
+ "description": "Compare vos dépenses mois après mois et suggère où vous pouvez garder plus d'argent."
+ },
+ "monthlyReview": {
+ "name": "Bilan mensuel",
+ "description": "Résume votre mois : revenus, dépenses, patrimoine et points de vigilance."
+ },
+ "budgetWatcher": {
+ "name": "Gardien des budgets",
+ "description": "Surveille vos budgets et vous dit lesquels approchent de leur limite ou la dépassent."
+ },
+ "recurringAuditor": {
+ "name": "Auditeur des récurrents",
+ "description": "Liste vos abonnements et signale les frais oubliés, dupliqués ou augmentés."
+ }
+ },
"title": "Agents",
"subtitle": "Créez des assistants conversationnels par-dessus vos données Securo. Chaque agent peut avoir sa propre base de connaissances, ses outils et son fournisseur.",
"newAgent": "Nouvel agent",
diff --git a/frontend/src/locales/hi.json b/frontend/src/locales/hi.json
index 0ea8fcdb..38e28c55 100644
--- a/frontend/src/locales/hi.json
+++ b/frontend/src/locales/hi.json
@@ -2519,6 +2519,28 @@
"finish": "शुरू करें"
},
"agents": {
+ "templates": {
+ "title": "टेम्पलेट से शुरू करें",
+ "subtitle": "आम कामों के लिए तैयार एजेंट। एक क्लिक में एक पूरी तरह काम करने वाला एजेंट बनता है, जिसे नाम बदलकर संपादित किया जा सकता है।",
+ "create": "बनाएं",
+ "presetHint": "{{template}} टेम्पलेट से शुरू हो रहा है। सब कुछ संपादित करने योग्य है।",
+ "savingsAdvisor": {
+ "name": "बचत सलाहकार",
+ "description": "आपके खर्चों को माह-दर-माह तुलना करता है और सुझाता है कि कहाँ और बचाया जा सकता है।"
+ },
+ "monthlyReview": {
+ "name": "मासिक समीक्षा",
+ "description": "आपके महीने का सारांश: आय, खर्च, शुद्ध संपत्ति और क्या देखना है।"
+ },
+ "budgetWatcher": {
+ "name": "बजट वॉचर",
+ "description": "आपके बजटों पर नज़र रखता है और बताता है कि कौन-से सीमा के पास हैं या उससे ऊपर।"
+ },
+ "recurringAuditor": {
+ "name": "पुनरावर्ती ऑडिटर",
+ "description": "आपकी सब्सक्रिप्शन की सूची बनाता है और भूली हुई, डुप्लिकेट या बढ़ी हुई राशि वाली चार्ज पर फ्लैग लगाता है।"
+ }
+ },
"title": "एजेंट",
"subtitle": "अपने Securo डेटा पर संवादात्मक सहायक बनाएँ। हर एजेंट का अपना नॉलेज बेस, टूल और प्रदाता हो सकता है।",
"newAgent": "नया एजेंट",
diff --git a/frontend/src/locales/hu.json b/frontend/src/locales/hu.json
index 7d4c2539..a795c1bb 100644
--- a/frontend/src/locales/hu.json
+++ b/frontend/src/locales/hu.json
@@ -2519,6 +2519,28 @@
"finish": "Kezdjük"
},
"agents": {
+ "templates": {
+ "title": "Kezdés sablontól",
+ "subtitle": "Kész ügynökök gyakori feladatokhoz. Egy kattintással teljesen működőképes ügynököt hoz létre, amit átnevezhet és szerkeszthet.",
+ "create": "Létrehozás",
+ "presetHint": "Indulás a(z) {{template}} sablonból. Minden szerkeszthető.",
+ "savingsAdvisor": {
+ "name": "Takarékos tanácsadó",
+ "description": "Hónapról hónapra hasonlítja a kiadásait, és javasol, hol takaríthat többet."
+ },
+ "monthlyReview": {
+ "name": "Havi áttekintés",
+ "description": "Összefoglalja a hónapját: jövedelem, kiadás, nettó vagyontétel és mire kell figyelnie."
+ },
+ "budgetWatcher": {
+ "name": "Költségkeret-őr",
+ "description": "Figyeli a költségkereteit, és megmondja, melyik közelít a limithez vagy elérte azt."
+ },
+ "recurringAuditor": {
+ "name": "Ismétlődő díjak ellenőre",
+ "description": "Összeállítja az előfizetéseit, és jelzi az elfelejtett, duplikált vagy emelt díjakat."
+ }
+ },
"title": "Ügynökök",
"subtitle": "Építs beszélgetős asszisztenseket a Securo-adataidra. Minden ügynöknek saját tudásbázisa, eszközei és szolgáltatója lehet.",
"newAgent": "Új ügynök",
diff --git a/frontend/src/locales/it.json b/frontend/src/locales/it.json
index 1af9cd21..d0558d83 100644
--- a/frontend/src/locales/it.json
+++ b/frontend/src/locales/it.json
@@ -2523,6 +2523,28 @@
"finish": "Inizia"
},
"agents": {
+ "templates": {
+ "title": "Parti da un modello",
+ "subtitle": "Agenti pronti per le attività comuni. Un clic crea un agente pienamente funzionante, che puoi rinominare e modificare.",
+ "create": "Crea",
+ "presetHint": "Si parte dal modello {{template}}. Tutto è modificabile.",
+ "savingsAdvisor": {
+ "name": "Consulente per i risparmi",
+ "description": "Confronta le tue spese mese per mese e suggerisce dove puoi tenere di più."
+ },
+ "monthlyReview": {
+ "name": "Revisione mensile",
+ "description": "Riassume il tuo mese: entrate, uscite, patrimonio netto e cosa tenere d'occhio."
+ },
+ "budgetWatcher": {
+ "name": "Vigile sui budget",
+ "description": "Tiene d'occhio i tuoi budget e ti dice quali sono vicini al limite o oltre."
+ },
+ "recurringAuditor": {
+ "name": "Auditor delle ricorrenze",
+ "description": "Elenca i tuoi abbonamenti e segnala le spese dimenticate, duplicate o aumentate."
+ }
+ },
"title": "Agenti",
"subtitle": "Crea assistenti conversazionali basati sui tuoi dati Securo. Ogni agente può avere la propria knowledge base, i propri strumenti e il proprio provider.",
"newAgent": "Nuovo agente",
diff --git a/frontend/src/locales/ja.json b/frontend/src/locales/ja.json
index 3b32a6a4..3c4ffe48 100644
--- a/frontend/src/locales/ja.json
+++ b/frontend/src/locales/ja.json
@@ -2519,6 +2519,28 @@
"finish": "始める"
},
"agents": {
+ "templates": {
+ "title": "テンプレートから始める",
+ "subtitle": "よくある作業向けの完成済みエージェント。1クリックで、名前の変更や編集が可能な完全なエージェントが作成されます。",
+ "create": "作成",
+ "presetHint": "{{template}} テンプレートから開始しています。すべて編集できます。",
+ "savingsAdvisor": {
+ "name": "貯蓄アドバイザー",
+ "description": "支出を月次で比較し、さらに多く残せる場所を提案します。"
+ },
+ "monthlyReview": {
+ "name": "月次レビュー",
+ "description": "その月を要約します:収入、支出、純資産、注意点。"
+ },
+ "budgetWatcher": {
+ "name": "予算ウォッチャー",
+ "description": "予算を監視し、接近中や超過のものを通知します。"
+ },
+ "recurringAuditor": {
+ "name": "定期請求オーディター",
+ "description": "サブスクリプションを一覧表示し、忘れられた・重複した・値上げされた請求をフラグ付けします。"
+ }
+ },
"title": "エージェント",
"subtitle": "Securoのデータの上に会話型アシスタントを作成します。各エージェントは独自のナレッジベース、ツール、プロバイダーを持てます。",
"newAgent": "新規エージェント",
diff --git a/frontend/src/locales/nl.json b/frontend/src/locales/nl.json
index 32c8956f..224577bd 100644
--- a/frontend/src/locales/nl.json
+++ b/frontend/src/locales/nl.json
@@ -2521,6 +2521,28 @@
"finish": "Aan de slag"
},
"agents": {
+ "templates": {
+ "title": "Beginnen met een sjabloon",
+ "subtitle": "Kant-en-klare agents voor gangbare taken. Eén klik maakt een volledig werkende agent aan die je kunt hernoemen en bewerken.",
+ "create": "Aanmaken",
+ "presetHint": "Start vanuit het sjabloon {{template}}. Alles is bewerkbaar.",
+ "savingsAdvisor": {
+ "name": "Bespaaradviseur",
+ "description": "Vergelijkt je uitgaven maand op maand en suggereert waar je meer kunt besparen."
+ },
+ "monthlyReview": {
+ "name": "Maandelijkse review",
+ "description": "Vat je maand samen: inkomen, uitgaven, nettovermogen en waar je op moet letten."
+ },
+ "budgetWatcher": {
+ "name": "Budgetwacht",
+ "description": "Houdt je budgetten in de gaten en vertelt welke dicht bij de limiet zijn of hem overschrijden."
+ },
+ "recurringAuditor": {
+ "name": "Auditor van vaste lasten",
+ "description": "Lijst je abonnementen op en markeert vergeten, gedupliceerde of verhoogde kosten."
+ }
+ },
"title": "Agents",
"subtitle": "Bouw gespreksassistenten bovenop uw Securo-gegevens. Elke agent kan zijn eigen kennisbank, tools en provider hebben.",
"newAgent": "Nieuwe agent",
diff --git a/frontend/src/locales/pl.json b/frontend/src/locales/pl.json
index c5076c51..d383df91 100644
--- a/frontend/src/locales/pl.json
+++ b/frontend/src/locales/pl.json
@@ -2623,6 +2623,28 @@
"finish": "Zaczynamy"
},
"agents": {
+ "templates": {
+ "title": "Zacznij od szablonu",
+ "subtitle": "Gotowi agenci do typowych zadań. Jedno kliknięcie tworzy w pełni działającego agenta, którego można przemianować i edytować.",
+ "create": "Utwórz",
+ "presetHint": "Start z szablonu {{template}}. Wszystko jest edytowalne.",
+ "savingsAdvisor": {
+ "name": "Doradca oszczędności",
+ "description": "Porównuje Twoje wydatki miesiąc do miesiąca i podpowiada, gdzie można zaoszczędzić więcej."
+ },
+ "monthlyReview": {
+ "name": "Miesięczne podsumowanie",
+ "description": "Podsumowuje Twój miesiąc: dochody, wydatki, majątek netto i na co uważać."
+ },
+ "budgetWatcher": {
+ "name": "Strażnik budżetu",
+ "description": "Czujnie obserwuje Twoje budżety i mówi, które są blisko limitu lub go przekraczają."
+ },
+ "recurringAuditor": {
+ "name": "Audytor opłat cyklicznych",
+ "description": "Wypisuje Twoje subskrypcje i zaznacza zapomniane, zduplikowane lub podwyższone opłaty."
+ }
+ },
"title": "Agenci",
"subtitle": "Twórz konwersacyjnych asystentów na bazie swoich danych w Securo. Każdy agent może mieć własną bazę wiedzy, narzędzia i dostawcę.",
"newAgent": "Nowy agent",
diff --git a/frontend/src/locales/pt-BR.json b/frontend/src/locales/pt-BR.json
index 569174cf..17281564 100644
--- a/frontend/src/locales/pt-BR.json
+++ b/frontend/src/locales/pt-BR.json
@@ -2523,6 +2523,28 @@
"finish": "Começar"
},
"agents": {
+ "templates": {
+ "title": "Começar com um modelo",
+ "subtitle": "Agentes prontos para tarefas comuns. Um clique cria um agente totalmente funcional, que dá para renomear e editar.",
+ "create": "Criar",
+ "presetHint": "Começando a partir do modelo {{template}}. Tudo é editável.",
+ "savingsAdvisor": {
+ "name": "Assessor de economia",
+ "description": "Compara seu gasto mês a mês e sugere onde guardar mais dinheiro."
+ },
+ "monthlyReview": {
+ "name": "Revisão mensal",
+ "description": "Resume seu mês: renda, gastos, patrimônio e o que observar."
+ },
+ "budgetWatcher": {
+ "name": "Fiscal de orçamentos",
+ "description": "Acompanha seus orçamentos e avisa quais estão perto do limite ou estourados."
+ },
+ "recurringAuditor": {
+ "name": "Auditor de recorrentes",
+ "description": "Lista suas assinaturas e marca cobranças esquecidas, duplicadas ou aumentadas."
+ }
+ },
"title": "Agentes",
"subtitle": "Construa assistentes conversacionais sobre seus dados do Securo. Cada agente pode ter sua própria base de conhecimento, ferramentas e provedor.",
"newAgent": "Novo agente",
diff --git a/frontend/src/locales/pt-PT.json b/frontend/src/locales/pt-PT.json
index 9ab1f70c..5a0fb54a 100644
--- a/frontend/src/locales/pt-PT.json
+++ b/frontend/src/locales/pt-PT.json
@@ -2523,6 +2523,28 @@
"finish": "Começar"
},
"agents": {
+ "templates": {
+ "title": "Começar com um modelo",
+ "subtitle": "Agentes prontos para tarefas habituais. Um clique cria um agente totalmente funcional, que se pode renomear e editar.",
+ "create": "Criar",
+ "presetHint": "A começar a partir do modelo {{template}}. Tudo é editável.",
+ "savingsAdvisor": {
+ "name": "Consultor de poupança",
+ "description": "Compara os seus gastos mês a mês e sugere onde guardar mais dinheiro."
+ },
+ "monthlyReview": {
+ "name": "Revisão mensal",
+ "description": "Resume o seu mês: rendimento, gastos, património e o que observar."
+ },
+ "budgetWatcher": {
+ "name": "Fiscal de orçamentos",
+ "description": "Acompanha os seus orçamentos e avisa quais estão perto do limite ou estourados."
+ },
+ "recurringAuditor": {
+ "name": "Auditor de recorrentes",
+ "description": "Lista as suas assinaturas e marca cobranças esquecidas, duplicadas ou aumentadas."
+ }
+ },
"title": "Agentes",
"subtitle": "Constrói assistentes conversacionais sobre os teus dados do Securo. Cada agente pode ter a sua própria base de conhecimento, ferramentas e fornecedor.",
"newAgent": "Novo agente",
diff --git a/frontend/src/locales/ru.json b/frontend/src/locales/ru.json
index 420b62af..fa95cc2e 100644
--- a/frontend/src/locales/ru.json
+++ b/frontend/src/locales/ru.json
@@ -2536,6 +2536,28 @@
"finish": "Начать работу"
},
"agents": {
+ "templates": {
+ "title": "Начать с шаблона",
+ "subtitle": "Готовые агенты для типовых задач. Один клик создаёт полностью рабочего агента, который можно переименовать и изменить.",
+ "create": "Создать",
+ "presetHint": "Старт из шаблона {{template}}. Всё можно редактировать.",
+ "savingsAdvisor": {
+ "name": "Советник по сбережениям",
+ "description": "Сравнивает ваши расходы от месяца к месяцу и подсказывает, где можно сберегать больше."
+ },
+ "monthlyReview": {
+ "name": "Месячный обзор",
+ "description": "Подводит итоги месяца: доход, расходы, чистая стоимость активов и на что обратить внимание."
+ },
+ "budgetWatcher": {
+ "name": "Смотритель бюджета",
+ "description": "Следит за вашими бюджетами и говорит, какие близки к лимиту или превысили его."
+ },
+ "recurringAuditor": {
+ "name": "Аудитор регулярных платежей",
+ "description": "Перечисляет ваши подписки и отмечает забытые, дублирующиеся или подорожавшие платежи."
+ }
+ },
"title": "Агенты",
"subtitle": "Создавайте разговорных ассистентов на основе ваших данных Securo. Каждый агент может иметь свою базу знаний, инструменты и провайдера.",
"newAgent": "Новый агент",
diff --git a/frontend/src/locales/sk.json b/frontend/src/locales/sk.json
index 5271be96..6e877ae7 100644
--- a/frontend/src/locales/sk.json
+++ b/frontend/src/locales/sk.json
@@ -2655,6 +2655,28 @@
"finish": "Začať"
},
"agents": {
+ "templates": {
+ "title": "Začať šablónou",
+ "subtitle": "Hotoví agenti pre bežné úlohy. Jedným kliknutím vytvoríte plne funkčného agenta, ktorý sa dá premenovať a upravovať.",
+ "create": "Vytvoriť",
+ "presetHint": "Vytvárate z šablóny {{template}}. Všetko je editovateľné.",
+ "savingsAdvisor": {
+ "name": "Doporučiteľ úspor",
+ "description": "Porovnáva vaše výdavky mesiac od mesiaca a navrhuje, kde ušetriť viac."
+ },
+ "monthlyReview": {
+ "name": "Mesačný prehľad",
+ "description": "Zhrňuje váš mesiac: príjmy, výdavky, čistá hodnota a na čo si dať pozor."
+ },
+ "budgetWatcher": {
+ "name": "Hliadka rozpočtu",
+ "description": "Drží palce vašim rozpočtom a povie, ktoré sú blízko limitu alebo ho prekročili."
+ },
+ "recurringAuditor": {
+ "name": "Audit opakujúcich sa platieb",
+ "description": "Vypíše vaše predplatné a upozorní na zabudnuté, duplicitné alebo zdražené platby."
+ }
+ },
"title": "Agenti",
"subtitle": "Vytváraj konverzačných asistentov nad svojimi dátami v Securo. Každý agent môže mať vlastnú znalostnú bázu, nástroje a poskytovateľa.",
"newAgent": "Nový agent",
diff --git a/frontend/src/locales/uk.json b/frontend/src/locales/uk.json
index 73a9cc58..dd3bfee3 100644
--- a/frontend/src/locales/uk.json
+++ b/frontend/src/locales/uk.json
@@ -2536,6 +2536,28 @@
"finish": "Почати роботу"
},
"agents": {
+ "templates": {
+ "title": "Почати з шаблону",
+ "subtitle": "Готові агенти для типових задач. Одне натискання створює повністю робочого агента, якого можна перейменувати та відредагувати.",
+ "create": "Створити",
+ "presetHint": "Старт із шаблону {{template}}. Усе можна редагувати.",
+ "savingsAdvisor": {
+ "name": "Порадник з заощаджень",
+ "description": "Порівнює ваші витрати від місяця до місяця і підказує, де можна заощадити більше."
+ },
+ "monthlyReview": {
+ "name": "Місячний огляд",
+ "description": "Узагальнює ваш місяць: дохід, витрати, чиста вартість та на що звернути увагу."
+ },
+ "budgetWatcher": {
+ "name": "Охоронець бюджету",
+ "description": "Стежить за вашими бюджетами і каже, які близькі до ліміту або його перевищили."
+ },
+ "recurringAuditor": {
+ "name": "Аудитор регулярних платежів",
+ "description": "Перелічує ваші підписки та відзначає забуті, дубльовані або подорожчані платежі."
+ }
+ },
"title": "Агенти",
"subtitle": "Створюйте розмовних асистентів на основі ваших даних Securo. Кожен агент може мати свою базу знань, інструменти та провайдера.",
"newAgent": "Новий агент",
diff --git a/frontend/src/pages/agents-list.test.tsx b/frontend/src/pages/agents-list.test.tsx
new file mode 100644
index 00000000..ee0cbf74
--- /dev/null
+++ b/frontend/src/pages/agents-list.test.tsx
@@ -0,0 +1,144 @@
+import { renderWithProviders } from '@/test/utils'
+import { screen, waitFor, within } from '@testing-library/react'
+import userEvent from '@testing-library/user-event'
+import { describe, expect, it, vi, beforeEach } from 'vitest'
+import AgentsListPage from '@/pages/agents-list'
+import { AGENT_TEMPLATES } from '@/lib/agent-templates'
+import { AgentFormDialog } from '@/components/agents/agent-form-dialog'
+
+const api = vi.hoisted(() => ({
+ info: vi.fn(),
+ list: vi.fn(),
+ create: vi.fn(),
+ update: vi.fn(),
+ setTools: vi.fn(),
+ connections: { list: vi.fn() },
+}))
+
+vi.mock('@/lib/api', () => ({ agents: api }))
+vi.mock('@/contexts/workspace-context', () => ({
+ useWorkspace: () => ({ canWrite: true }),
+}))
+
+const CONN_A = { id: 'conn-1', name: '1188 Conn A', is_default: false }
+const CONN_B = { id: 'conn-2', name: '1188 Conn B', is_default: true }
+
+function agentStub(id: string, name: string): Record<string, unknown> {
+ return {
+ id,
+ name,
+ description: null,
+ system_prompt: '',
+ icon: 'bot',
+ color: '#64748b',
+ connection_id: null,
+ provider: null,
+ model: null,
+ temperature: 0.4,
+ max_history_messages: 20,
+ top_n: 5,
+ similarity_threshold: 0.75,
+ extra: {},
+ auto_context: true,
+ is_archived: false,
+ is_default: false,
+ conversation_count: 0,
+ knowledge_count: 0,
+ created_at: '2026-10-24T00:00:00Z',
+ updated_at: '2026-10-24T00:00:00Z',
+ }
+}
+
+beforeEach(() => {
+ vi.clearAllMocks()
+ api.info.mockResolvedValue({
+ enabled: true,
+ providers: ['openai'],
+ embedding_dim: 512,
+ default_top_n: 5,
+ default_similarity_threshold: 0.75,
+ })
+ api.list.mockResolvedValue([])
+ api.create.mockResolvedValue(agentStub('agent-new', 'New agent'))
+ api.setTools.mockResolvedValue(undefined)
+})
+
+describe('agents page templates', () => {
+ it('shows every built-in template card', async () => {
+ api.connections.list.mockResolvedValue([CONN_A])
+ renderWithProviders(<AgentsListPage />)
+ expect(await screen.findByText('Savings advisor')).toBeInTheDocument()
+ expect(await screen.findByText('Monthly review')).toBeInTheDocument()
+ expect(await screen.findByText('Budget watcher')).toBeInTheDocument()
+ expect(await screen.findByText('Recurring auditor')).toBeInTheDocument()
+ expect(screen.getAllByRole('button', { name: 'Create' })).toHaveLength(AGENT_TEMPLATES.length)
+ })
+
+ it('creates the agent in one click using the default connection and the template tools', async () => {
+ api.connections.list.mockResolvedValue([CONN_A, CONN_B])
+ const user = userEvent.setup()
+ renderWithProviders(<AgentsListPage />)
+ await screen.findByText('Savings advisor')
+ const createButtons = screen.getAllByRole('button', { name: 'Create' })
+ expect(createButtons).toHaveLength(AGENT_TEMPLATES.length)
+ await user.click(createButtons[0])
+ await waitFor(() => expect(api.create).toHaveBeenCalledTimes(1))
+ const payload = api.create.mock.calls[0][0] as Record<string, unknown>
+ expect(payload.name).toBe('Savings advisor')
+ expect(payload.connection_id).toBe('conn-2')
+ expect(payload.system_prompt).toContain("savings advisor")
+ expect(payload.auto_context).toBe(true)
+ // The tool scope is part of the create call, never a second request
+ // that could fail and leave the agent with every tool allowed.
+ const items = payload.tools as { server: string; tool_name: string; enabled: boolean }[]
+ expect(items).toContainEqual({ server: 'securo', tool_name: 'propose_create_budget', enabled: true })
+ expect(items).toHaveLength(AGENT_TEMPLATES[0].tools.length)
+ expect(api.setTools).not.toHaveBeenCalled()
+ })
+
+ it('leaves no agent behind when the one-click creation fails', async () => {
+ api.connections.list.mockResolvedValue([CONN_A])
+ api.create.mockRejectedValue(new Error('boom'))
+ const user = userEvent.setup()
+ renderWithProviders(<AgentsListPage />)
+ await screen.findByText('Savings advisor')
+ await user.click(screen.getAllByRole('button', { name: 'Create' })[0])
+ await waitFor(() => expect(api.create).toHaveBeenCalledTimes(1))
+ // A single request carries the agent and its tools: when it fails there
+ // is nothing to follow up with, and no separate tool call is attempted.
+ expect(api.setTools).not.toHaveBeenCalled()
+ expect(api.list).toHaveBeenCalledTimes(1)
+ })
+
+ it('opens the form prefilled when no LLM connection exists yet', async () => {
+ api.connections.list.mockResolvedValue([])
+ const user = userEvent.setup()
+ renderWithProviders(<AgentsListPage />)
+ await screen.findByText('Savings advisor')
+ await user.click(screen.getAllByRole('button', { name: 'Create' })[0])
+ const dialog = await screen.findByRole('dialog')
+ expect(await within(dialog).findByDisplayValue('Savings advisor')).toBeInTheDocument()
+ // testing-library normalizes the element value but not the expected
+ // string, so collapse the prompt's whitespace to match.
+ const promptNormalized = AGENT_TEMPLATES[0].systemPrompt.replace(/\s+/g, ' ').trim()
+ expect(await within(dialog).findByDisplayValue(promptNormalized)).toBeInTheDocument()
+ expect(api.create).not.toHaveBeenCalled()
+ })
+
+ it('applies the template tools when the agent is created from the prefilled form', async () => {
+ api.connections.list.mockResolvedValue([CONN_A])
+ const user = userEvent.setup()
+ renderWithProviders(
+ <AgentFormDialog open onOpenChange={() => {}} providers={['openai']} preset={AGENT_TEMPLATES[2]} />,
+ )
+ const dialog = await screen.findByRole('dialog')
+ expect(await within(dialog).findByDisplayValue('Budget watcher')).toBeInTheDocument()
+ const submit = within(dialog).getByRole('button', { name: 'Create' })
+ await waitFor(() => expect(submit).toBeEnabled())
+ await user.click(submit)
+ await waitFor(() => expect(api.create).toHaveBeenCalledTimes(1))
+ const payload = api.create.mock.calls[0][0] as { tools: { tool_name: string }[] }
+ expect(payload.tools.map((i) => i.tool_name)).toEqual(AGENT_TEMPLATES[2].tools)
+ expect(api.setTools).not.toHaveBeenCalled()
+ })
+})
diff --git a/frontend/src/pages/agents-list.tsx b/frontend/src/pages/agents-list.tsx
index ab7a6303..18a4bc63 100644
--- a/frontend/src/pages/agents-list.tsx
+++ b/frontend/src/pages/agents-list.tsx
@@ -9,6 +9,8 @@ import { Switch } from '@/components/ui/switch'
import { PageHeader } from '@/components/page-header'
import { agents } from '@/lib/api'
import { AgentFormDialog } from '@/components/agents/agent-form-dialog'
+import { AgentTemplatesSection } from '@/components/agents/agent-templates'
+import { BUILTIN_MCP_SERVER, type AgentTemplate } from '@/lib/agent-templates'
import { useWorkspace } from '@/contexts/workspace-context'
export default function AgentsListPage() {
@@ -16,12 +18,54 @@ export default function AgentsListPage() {
const qc = useQueryClient()
const { canWrite } = useWorkspace()
const [createOpen, setCreateOpen] = useState(false)
+ const [formPreset, setFormPreset] = useState<AgentTemplate | null>(null)
+ const [creatingId, setCreatingId] = useState<string | null>(null)
const { data: info } = useQuery({ queryKey: ['agents-info'], queryFn: () => agents.info() })
const { data: list, isLoading } = useQuery({ queryKey: ['agents'], queryFn: () => agents.list() })
const { data: connections } = useQuery({
queryKey: ['agent-connections'],
queryFn: () => agents.connections.list(),
})
+
+ const createFromTemplateMut = useMutation({
+ mutationFn: async (tpl: AgentTemplate) => {
+ const conn = connections?.find((c) => c.is_default) ?? connections?.[0]
+ if (!conn) throw new Error('no connection')
+ // The tool scope goes in the create call itself, so the agent and its
+ // whitelist are saved together: there is no window where it exists
+ // without one (which the backend reads as "every tool allowed").
+ return agents.create({
+ name: t(tpl.nameKey),
+ description: t(tpl.descriptionKey),
+ system_prompt: tpl.systemPrompt,
+ connection_id: conn.id,
+ auto_context: true,
+ tools: tpl.tools.map((tool) => ({ server: BUILTIN_MCP_SERVER, tool_name: tool, enabled: true })),
+ })
+ },
+ onMutate: (tpl) => setCreatingId(tpl.id),
+ onSettled: () => setCreatingId(null),
+ onSuccess: () => {
+ qc.invalidateQueries({ queryKey: ['agents'] })
+ toast.success(t('agents.form.created'))
+ },
+ onError: () => toast.error(t('agents.form.saveFailed')),
+ })
+
+ /**
+ * One click on a template card. With an LLM connection available the agent
+ * is created right away; without one, the form opens prefilled so the user
+ * picks a connection and finishes the setup in one place.
+ */
+ const handleTemplateCreate = (tpl: AgentTemplate) => {
+ const conn = connections?.find((c) => c.is_default) ?? connections?.[0]
+ if (conn) {
+ createFromTemplateMut.mutate(tpl)
+ } else {
+ setFormPreset(tpl)
+ setCreateOpen(true)
+ }
+ }
// Setting an agent as default clears the flag on every other agent
// server-side; we still need to refresh both queries so the badge
// and the global-chat picker pick up the change immediately.
@@ -58,6 +102,14 @@ export default function AgentsListPage() {
<p className="text-sm text-muted-foreground mb-6 max-w-2xl">{t('agents.subtitle')}</p>
+ {canWrite && (
+ <AgentTemplatesSection
+ onCreate={handleTemplateCreate}
+ busyId={creatingId}
+ disabled={connections === undefined}
+ />
+ )}
+
{isLoading ? (
<div className="bg-card rounded-xl border border-border shadow-sm p-6 text-sm text-muted-foreground">
{t('agents.loading')}
@@ -177,7 +229,15 @@ export default function AgentsListPage() {
</div>
)}
- <AgentFormDialog open={createOpen} onOpenChange={setCreateOpen} providers={info?.providers ?? []} />
+ <AgentFormDialog
+ open={createOpen}
+ onOpenChange={(open) => {
+ setCreateOpen(open)
+ if (!open) setFormPreset(null)
+ }}
+ providers={info?.providers ?? []}
+ preset={formPreset}
+ />
</div>
)
}