Witty Assistant CLI Agent Introduction

Introduction

This manual provides a comprehensive introduction to the Witty Assistant CLI agent capability system. The agent series is an intelligent interaction tool built on the Witty Assistant platform for vertical business scenarios. Relying on a dedicated technical architecture and MCP service capability foundation, it deeply adapts to business scenario requirements, enabling lightweight, scenario-specific intelligent service deployment.

Currently, the Witty Assistant platform has integrated two agents: LLM chat and Basic Operations Agent. LLM chat focuses on intelligent dialogue inquiry capabilities, providing users with natural language interaction support. The Basic Operations Agent is a specialized tool for openEuler basic operations, with its core advantage lying in the integration of two major MCP service capabilities, achieving an organic combination of full-scenario openEuler system basic operations coverage and lightweight knowledge retrieval. The Known Issues Analysis Agent will be developed for known issue diagnosis scenarios. Through standardized capability descriptions and practical use cases, this manual provides enterprise operations personnel with "ready-to-use" operational guidance, helping to lower the operational threshold and enhance the standardization and efficiency of operations work.

Default Agent Summary Table

Agent NameCore Applicable ScenariosCore Capability Modules
LLM chatIntelligent dialogue inquiryLLM model
Basic Operations AgentFull-scenario basic operations (command execution, file management, system monitoring, etc.) + Lightweight knowledge retrieval1. oe-cli-mcp-server: Complete basic operations toolset
2. rag-server: Lightweight knowledge base management and retrieval toolset

LLM chat

LLM chat is an intelligent dialogue agent integrated into the Witty Assistant platform. It relies on the capabilities of mainstream LLM models and does not require MCP service support. It focuses on providing users with efficient, natural intelligent dialogue inquiry services and serves as the foundational module of the Witty Assistant platform's intelligent interaction system.

Core Capabilities

LLM chat leverages mainstream LLM models configured by users, possessing efficient and accurate natural language conversation and inquiry capabilities without requiring MCP services or complex configurations. Positioned as a "lightweight intelligent conversation assistant," it has no professional operational threshold. Users can directly initiate inquiries through natural language and quickly receive clear, accurate responses and feedback.

Use Case

The following demonstrates a basic use case:

markdown
Introduce openEuler

llm_case.png

Basic Operations Agent

The Basic Operations Agent integrates two core MCP services to create a one-stop operations hub combining "basic operations + knowledge retrieval." All tools are adapted to openEuler system characteristics, support local/remote execution (for some tools), provide bilingual (Chinese/English) returns, and feature strict parameter specifications with unified return formats, allowing direct integration into enterprise operations processes.

Core Capabilities

Service CategoryMCP Tool NameCore Function PositioningDefault Port
Basic Operations Servicecmd_executor_toolLocal/SSH remote command/script execution with automatic timeout adaptation12555
Basic Operations Servicefile_toolComplete local file/directory query, add, modify, delete operations12555
Basic Operations Servicenetwork_fix_bootproto_toolAutomatically fix NetworkManager IP acquisition issues12555
Basic Operations Servicepkg_toolopenEuler software package query, install, update, remove, cache cleanup12555
Basic Operations Serviceproc_toolProcess/service view, start, stop, force termination12555
Basic Operations Servicessh_fix_toolDiagnose and fix openEuler system SSH connection issues12555
Basic Operations Servicesys_info_toolBatch collection of system/hardware/security information12555
Lightweight RAG Servicecreate_knowledge_baseCreate independent knowledge bases with custom chunk size and vectorization configuration12311
Lightweight RAG Servicedelete_knowledge_baseDelete specified knowledge base with cascading document and chunk cleanup12311
Lightweight RAG Servicelist_knowledge_basesList all knowledge bases with details and current selection status12311
Lightweight RAG Serviceselect_knowledge_baseSelect the current knowledge base for subsequent document operations12311
Lightweight RAG Serviceimport_documentConcurrent multi-format document import with automatic parsing and vectorization12311
Lightweight RAG ServicesearchHybrid keyword+vector retrieval returning most relevant results12311
Lightweight RAG Servicelist_documentsView all document details under the current knowledge base12311
Lightweight RAG Servicedelete_documentDelete specified document with cascading associated chunk cleanup12311
Lightweight RAG Serviceupdate_documentUpdate document chunk size and re-parse for vectorization12311
Lightweight RAG Serviceexport_databaseExport knowledge base database file for backup12311
Lightweight RAG Serviceimport_databaseImport database file, merging knowledge bases and documents12311

Use Cases

The following demonstrates file operations, providing natural language interaction prompt formats with key information such as file paths for immediate use. All scenarios are tailored to actual enterprise operations needs.

  • Scenario: Local File Batch Management

    text
      Need to manage files in the local /root/test_python directory, perform the following operations:
         1. View detailed information (including permissions, size, modification time) of all files in the /root/test_python directory;
         2. Create an empty folder named backup_202601 in the /root/test_python directory;
         3. Move all files with .py extension from the /root/test_python directory to the backup_202601 folder;
         4. Verify the move results and return the list of successfully moved files.

file_case.png

MCP Overview

The following details each Server's information and the core details of their subordinate tools.

MCP_Server List

PortService NameDirectory PathDescription
12555oe-cli-mcp-servermcp_center/oe_cli_mcp_serverBasic Operations MCP: Provides core tools including command execution, file management, system information query, process management, package management, SSH repair, Network repair, etc.
12311rag-servermcp_center/third_party_mcp/ragLightweight RAG Service: Provides core tools including knowledge base creation and management, document import and retrieval, database export and import, etc.

MCP_Server Details

oe-cli-mcp-server

MCP_Server NameMCP_Tool ListTool FunctionCore Input ParametersKey Return Content
cmd_executor_toolSupports local/SSH remote execution of shell commands/scripts, automatically sets timeout based on command type, terminates automatically on timeout- host: Target host IP/hostname (default 127.0.0.1 for local execution)
- command: Shell command/script to execute (required)
- timeout: Timeout in seconds (optional, positive integer)
success (execution result), message (execution info/error message), result (command output content), target (execution target), timeout_used (actual timeout used)
file_toolSupports complete local file/directory query, add, modify, delete operations, pure Python implementation with no shell dependency- action: Operation type (required, enum: ls/cat/add/append/edit/rename/chmod/delete)
- file_path: Absolute path to target file/directory (required)
- Other parameters: content (content to write), new_path (new path), mode (permission mode), etc. (passed as needed)
success (execution result), message (execution info/error message), result (operation results list), file_path (operation path), target (fixed as 127.0.0.1)
network_fix_bootproto_toolAutomatically fixes the issue where NetworkManager fails to obtain IP after startup, edits network card configuration and restarts services- target: Target host IP/hostname (default 127.0.0.1)
- lang: Language setting (optional)
success (fix result), message (fix result description), target (target host), result (detailed step information list)

| oe-cli-mcp-server | pkg_tool | Supports openEuler system software package query, install, update, remove, cache cleanup, based on dnf/rpm with secure invocation | - action: Operation type (required, enum: list/info/install/local-install/update/update-sec/remove/clean)
- Other parameters: pkg_name (package name), rpm_path (absolute RPM path), cache_type (cache type), etc. (passed as needed) | success (execution result), message (execution info/error message), result (operation results list/log), pkg_name (operated package name), target (fixed as 127.0.0.1) | | | proc_tool | Supports process/service view, start, stop, force termination management operations, based on ps/systemctl/kill commands | - proc_actions: List of operation types (required, enum: list/find/stat/start/restart/stop/kill)
- Other parameters: proc_name (process name), pid (process ID), service_name (service name), etc. (passed as needed) | success (operation result), message (operation info/error message), result (operation results list/log), target (fixed as 127.0.0.1), proc_actions (executed operations) | | | ssh_fix_tool | Diagnoses and fixes SSH connection failures on openEuler systems, checks port connectivity, sshd service status, and repairs configuration | - target: Target host IP/hostname (required)
- port: SSH port (default 22)
- lang: Language setting (optional) | success (fix result), message (fix result description), target (target host), result (list of execution results for each step) | | | sys_info_tool | Batch collects system, hardware, and security information from openEuler systems, pure Python + safe system command invocation | - info_types: List of information types (required, enum: os/load/uptime/cpu/mem/disk/gpu/net/selinux/firewall) | success (collection result), message (collection info/error message), result (structured collected data), target (fixed as 127.0.0.1), info_types (collected types) |

rag-server

MCP_Server NameMCP_Tool ListTool FunctionCore Input ParametersKey Return Content
create_knowledge_baseCreates a new knowledge base, supports custom chunk size and vectorization configuration; must be selected after creation before use- kb_name: Knowledge base name (required, unique)
- chunk_size: Chunk size in tokens (required)
- Other parameters: embedding_model (vectorization model), embedding_endpoint (service endpoint), etc. (optional)
success (creation result), message (operation description), data (includes kb_id, kb_name, chunk_size)
delete_knowledge_baseDeletes specified knowledge base; cannot delete currently selected knowledge base; cascades deletion of subordinate documents and chunks- kb_name: Knowledge base name (required)success (deletion result), message (operation description), data (includes deleted kb_name)
list_knowledge_basesLists all available knowledge bases with detailed information and current selection statusNo parameterssuccess (query result), message (operation description), data (includes knowledge base list, count, current selected kb_id)
rag-serverselect_knowledge_baseSelects a knowledge base as the current working object; subsequent operations are associated with this knowledge base- kb_name: Knowledge base name (required)success (selection result), message (operation description), data (includes kb_id, kb_name, document count)
import_documentConcurrently imports multiple files into the currently selected knowledge base, supports TXT/DOCX/DOC formats, automatically parses, splits, and vectorizes- file_paths: List of absolute file paths (required)
- chunk_size: Chunk size in tokens (optional, defaults to knowledge base configuration)
success (import result), message (operation description including success/failure counts), data (includes total files, successful/failed file lists)
searchPerforms hybrid keyword and vector retrieval on the currently selected knowledge base, weights and merges results with deduplication and sorting- query: Query text (required)
- top_k: Number of results to return (optional, defaults to configuration value)
success (retrieval result), message (retrieval description), data (includes chunk list, result count)
list_documentsViews detailed information of all documents under the currently selected knowledge baseNo parameterssuccess (query result), message (operation description), data (includes document list, count)
delete_documentDeletes a specified document under the currently selected knowledge base, cascades deletion of associated chunks- doc_name: Document name (required)success (deletion result), message (operation description), data (includes deleted doc_name)
update_documentUpdates document chunk size, re-parses, splits, and generates new vectors- doc_name: Document name (required)
- chunk_size: New chunk size in tokens (required)
success (update result), message (operation description), data (includes doc_id, doc_name, new chunk count/size)
export_databaseExports the entire knowledge base database file to a specified path for backup- export_path: Absolute export path (required)success (export result), message (operation description), data (includes source path, export path)
import_databaseImports a .db database file, merges content into the existing knowledge base, automatically handles name conflicts- source_db_path: Absolute path to source database (required)success (import result), message (operation description), data (includes source path, imported knowledge base/document count)