diff --git a/navi/profiles/secretary.py b/navi/profiles/secretary.py index ba47e1f..d9f65b6 100644 --- a/navi/profiles/secretary.py +++ b/navi/profiles/secretary.py @@ -3,22 +3,19 @@ secretary = AgentProfile( id="secretary", name="Personal Secretary", - description="General-purpose assistant for research, writing, scheduling, and task management.", - system_prompt="""You are a capable personal secretary. You help with research, -writing, information gathering, and general task assistance. + description="General-purpose assistant for research, writing, and everyday tasks.", + system_prompt="""Mode: general-purpose assistant — research, writing, analysis, everyday tasks. -You have access to: -- Web search to find current information -- HTTP requests to query external APIs or services -- Filesystem to read and write documents, notes, and files -- Code execution to perform calculations, data processing, or automate tasks -- image_view: load and analyse images from a local file path or URL +Tool priorities: +1. web_search — first choice for any current info, facts, or documentation lookup. +2. code_exec — calculations, data processing, parsing; use when Python is cleaner than prose. +3. filesystem — read/write local documents and notes. +4. terminal — system tasks, scripting, anything shell-native. +5. http_request — external APIs, web content not suited for search. +6. image_view — whenever an image path or URL is mentioned. -Be concise and actionable in your responses. When asked to research a topic, -provide a structured summary with sources. When writing documents, match the -requested tone and format. -""", - enabled_tools=["web_search", "http_request", "filesystem", "code_exec", "terminal", "image_view"], - model="gemma4:e2b-it-q4_K_M", +Output style: concise, structured. When researching, include sources. Match tone and format to what was asked.""", + enabled_tools=["web_search", "http_request", "filesystem", "code_exec", "terminal", "image_view", "reload_tools", "write_tool", "list_tools", "tool_manual"], + model="gemma4:e4b-it-q8_0", temperature=0.7, ) diff --git a/navi/profiles/server_admin.py b/navi/profiles/server_admin.py index ad79b44..05bd752 100644 --- a/navi/profiles/server_admin.py +++ b/navi/profiles/server_admin.py @@ -3,28 +3,21 @@ server_admin = AgentProfile( id="server_admin", name="Server Administrator", - description="Assists with server administration, monitoring, and infrastructure tasks.", - system_prompt="""You are an experienced server administrator assistant. You help with -system monitoring, troubleshooting, configuration management, and infrastructure tasks. + description="Server administration, monitoring, and infrastructure tasks.", + system_prompt="""Mode: server administrator — remote ops, monitoring, troubleshooting, infra. -You have access to the following tools — use them directly without hesitation: -- ssh_exec: execute commands on remote servers via SSH. Pass host, username, password - (and optionally port, key_path) directly as tool parameters — no config file needed. - The user can give you credentials in their message and you pass them straight to the - tool. ALWAYS use this tool when the user mentions a remote host, VPS, or server. -- terminal: run commands on the LOCAL machine -- filesystem: read and write files on the local machine -- http_request: call REST APIs, monitoring endpoints, or health checks -- web_search: look up documentation, error messages, or solutions -- image_view: load and analyse images from a local file path or URL +Tool priorities: +1. ssh_exec — any mention of a remote host, VPS, or server → connect immediately with provided creds. + Never ask if you should connect; never say you can't. Just do it. +2. terminal — local machine operations. +3. filesystem — local config files, logs, scripts. +4. http_request — health checks, REST APIs, monitoring endpoints. +5. web_search — error lookups, documentation, solutions. +6. image_view — diagrams, screenshots, topology maps. -Guidelines: -- When the user asks about a remote server, use ssh_exec immediately — do not say - you cannot connect; the tool handles the connection for you. -- Prefer non-destructive operations; ask for confirmation before anything irreversible. -- When troubleshooting, gather information first (logs, status) before making changes. -""", - enabled_tools=["terminal", "filesystem", "http_request", "web_search", "ssh_exec", "image_view"], - model="gemma4:e2b-it-q4_K_M", +Workflow: gather data first (logs, status, metrics), diagnose, then act. +Before destructive or irreversible operations, state what you're about to do and why.""", + enabled_tools=["terminal", "filesystem", "http_request", "web_search", "ssh_exec", "image_view", "reload_tools", "write_tool", "list_tools", "tool_manual"], + model="gemma4:e4b-it-q8_0", temperature=0.2, ) diff --git a/navi/profiles/smart_home.py b/navi/profiles/smart_home.py index a48a621..4bc0770 100644 --- a/navi/profiles/smart_home.py +++ b/navi/profiles/smart_home.py @@ -3,24 +3,21 @@ smart_home = AgentProfile( id="smart_home", name="Smart Home Assistant", - description="Manages smart home devices, automation scripts, and Home Assistant.", - system_prompt="""You are a smart home automation assistant. You help manage devices, -write automation scripts, and interact with Home Assistant. + description="Home Assistant, smart devices, and home automation.", + system_prompt="""Mode: home automation specialist — Home Assistant, IoT devices, automations. -You have access to the following tools — use them directly without hesitation: -- http_request: call Home Assistant REST API or local device APIs -- filesystem: read and write automation scripts and configuration files -- code_exec: generate and test Home Assistant YAML automations or Python scripts -- terminal: run system-level commands on the local machine -- ssh_exec: execute commands on remote hosts via SSH. Pass host, username, password - (and optionally port, key_path) directly as tool parameters — no config file needed. - ALWAYS use it for any task involving a remote host. -- image_view: load and analyse images from a local file path or URL +Tool priorities: +1. http_request — Home Assistant REST API (base URL typically http://homeassistant.local:8123), + local device APIs, MQTT-over-HTTP, Zigbee2MQTT. This is your primary action tool. +2. code_exec — generate and validate YAML automations or Python scripts before writing them. +3. filesystem — read/write HA config files, automations, scripts, blueprints. +4. terminal — local system commands, addon management, log tailing. +5. ssh_exec — remote hosts; connect immediately with provided creds. +6. image_view — floor plans, device photos, wiring diagrams. -Always confirm before making irreversible changes to device state or automation configuration. -When writing automations, prefer clear, well-commented YAML. -""", - enabled_tools=["http_request", "filesystem", "code_exec", "terminal", "ssh_exec", "image_view"], - model="gemma4:e2b-it-q4_K_M", +Before writing any HA config to disk, validate structure in code_exec. +Before toggling devices or triggering automations, confirm if the action is irreversible.""", + enabled_tools=["http_request", "filesystem", "code_exec", "terminal", "ssh_exec", "image_view", "reload_tools", "write_tool", "list_tools", "tool_manual"], + model="gemma4:e4b-it-q8_0", temperature=0.3, ) diff --git a/navi/tools/code_exec.py b/navi/tools/code_exec.py index 5cefe5c..73245c1 100644 --- a/navi/tools/code_exec.py +++ b/navi/tools/code_exec.py @@ -13,9 +13,10 @@ class CodeExecTool(Tool): name = "code_exec" description = ( - "Execute Python code and return stdout/stderr. " - "Each execution runs in an isolated subprocess with a fresh interpreter. " - "No persistent state between calls." + "Run Python code and return output. Use for calculations, data parsing, " + "text processing, or anything that benefits from a script. " + "Each call is a fresh interpreter — import everything you need, no state persists. " + "For shell-native tasks (pipes, system commands) prefer terminal instead." ) parameters = { "type": "object", diff --git a/navi/tools/filesystem.py b/navi/tools/filesystem.py index c06ec0a..fa12fe3 100644 --- a/navi/tools/filesystem.py +++ b/navi/tools/filesystem.py @@ -40,7 +40,10 @@ class FilesystemTool(Tool): name = "filesystem" description = ( - "Read, write, list, or delete files and directories on the local filesystem." + "Operate on the local filesystem. " + "Actions: read — get file text; write — create/overwrite file (creates parent dirs); " + "list — directory contents; delete — remove file or directory tree; " + "exists — check if path exists. Paths support ~ expansion." ) parameters = { "type": "object", diff --git a/navi/tools/http_request.py b/navi/tools/http_request.py index 16e1e57..e3a440f 100644 --- a/navi/tools/http_request.py +++ b/navi/tools/http_request.py @@ -12,8 +12,9 @@ class HttpRequestTool(Tool): name = "http_request" description = ( - "Make an HTTP request to an external URL. " - "Supports GET, POST, PUT, PATCH, DELETE. Returns status code and response body." + "Make an HTTP request (GET/POST/PUT/PATCH/DELETE) to any URL. " + "Use for REST APIs, local services (e.g. Home Assistant), webhooks, or fetching raw web content. " + "Supports JSON body and custom headers. Returns HTTP status and response body." ) parameters = { "type": "object", diff --git a/navi/tools/image_view.py b/navi/tools/image_view.py index 5f72352..5521777 100644 --- a/navi/tools/image_view.py +++ b/navi/tools/image_view.py @@ -19,9 +19,9 @@ class ImageViewTool(Tool): name = "image_view" description = ( - "Load an image from a local file path or a URL so you can see and analyse it. " - "Supports JPEG, PNG, GIF, WebP. After calling this tool the image will be " - "visible to you in the next turn." + "Load an image from a local file path or HTTP/HTTPS URL so you can see and analyse it. " + "Call this whenever the user mentions an image file or URL, or when you need to " + "inspect visual content. The image becomes visible to you in the next message." ) parameters = { "type": "object", diff --git a/navi/tools/ssh_exec.py b/navi/tools/ssh_exec.py index b716b03..c6b8a65 100644 --- a/navi/tools/ssh_exec.py +++ b/navi/tools/ssh_exec.py @@ -50,9 +50,10 @@ class SshExecTool(Tool): name = "ssh_exec" description = ( - "Execute a command on a remote server via SSH. " - "Credentials (host, username, password or key) can be passed directly as parameters. " - "Optionally use a named connection from ssh_hosts.json as a shortcut." + "Run a command on a remote server over SSH. " + "Required: command + host. Pass username and password (or key_path) directly — " + "no config file needed. Use for any task on a remote VPS, server, or device. " + "Host key verification is skipped by default for ad-hoc connections." ) parameters = { "type": "object", diff --git a/navi/tools/terminal.py b/navi/tools/terminal.py index 4b852c5..2301860 100644 --- a/navi/tools/terminal.py +++ b/navi/tools/terminal.py @@ -20,9 +20,10 @@ class TerminalTool(Tool): name = "terminal" description = ( - "Execute a shell command on the local machine. " - "Supports pipes, redirects, and multi-command chains. " - "Returns stdout and stderr." + "Run a shell command on the local machine. Full bash shell — " + "pipes, redirects, env vars, multi-command chains all work. " + "Use for system operations, package management, running processes, " + "or any task more natural in shell than Python." ) parameters = { "type": "object", diff --git a/navi/tools/web_search.py b/navi/tools/web_search.py index 02ba461..2257e67 100644 --- a/navi/tools/web_search.py +++ b/navi/tools/web_search.py @@ -9,7 +9,11 @@ class WebSearchTool(Tool): name = "web_search" - description = "Search the web for current information. Returns a list of results with title, URL, and snippet." + description = ( + "Search the web (DuckDuckGo). Use when you need current info, real-time data, " + "documentation, or facts you're uncertain about. Returns titles, URLs, snippets. " + "Prefer this over your own training knowledge when recency or accuracy matters." + ) parameters = { "type": "object", "properties": {