"use client"; import { useState, useEffect } from "react"; import { Loader2, Save } from "lucide-react"; import type { Agent } from "@multica/core/types"; import { Button } from "@multica/ui/components/ui/button"; export function InstructionsTab({ agent, onSave, }: { agent: Agent; onSave: (instructions: string) => Promise; }) { const [value, setValue] = useState(agent.instructions ?? ""); const [saving, setSaving] = useState(false); const isDirty = value !== (agent.instructions ?? ""); // Sync when switching between agents. useEffect(() => { setValue(agent.instructions ?? ""); }, [agent.id, agent.instructions]); const handleSave = async () => { setSaving(true); try { await onSave(value); } catch { // toast handled by parent } finally { setSaving(false); } }; return (

Agent Instructions

Define this agent's identity and working style. These instructions are injected into the agent's context for every task.