File size: 5,899 Bytes
49f162a | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 | ---
configs:
- config_name: default
data_files:
- split: train
path: linux_terminal_tool_calling_dataset.jsonl
license: apache-2.0
task_categories:
- text-generation
language:
- en
tags:
- tool-calling
- linux
- terminal
- openclaw
- reasoning
- agent
- sysadmin
size_categories:
- n<1K
---
# Linux Terminal Tool Calling Dataset (Linux-terminal-tool-calling)
This dataset is designed for training and fine-tuning AI agents on tool calling, reasoning, and command execution specifically for standard Linux terminal utilities and system administration tasks. It transforms raw Linux terminal command records into a structured multi-turn conversation format featuring detailed chain-of-thought/reasoning content and OpenAI/OpenClaw-style function calling.
## Dataset Details
- **Total Records**: 600
- **Language**: English
- **Format**: JSONL (JSON Lines)
- **License**: Apache 2.0
- **Repository**: [iselabvn/Linux-terminal-tool-calling](https://huggingface.co/datasets/iselabvn/Linux-terminal-tool-calling)
## Dataset Structure
Each record is formatted as a single-turn conversation with `user` and `assistant` roles, complemented by rich metadata for downstream filtering and analysis.
### Field Descriptions
- **`messages`** (list): Conversation history.
- **`role: "user"`** (dict): The user request describing a Linux terminal or system administration task.
- **`role: "assistant"`** (dict): The assistant response containing:
- **`reasoning_content`** (str): A 2-3 sentence chain-of-thought explanation explaining the choice of command, flags, and parameter configurations.
- **`tool_calls`** (list): An array containing the function call. The tool utilizes the `exec` function to run the command on the target environment.
- **`id`** (str): A unique call identifier (e.g., `call_exec_0`).
- **`type: "function"`** (str): The type of tool call.
- **`function`** (dict): Details of the target function call.
- **`name`**: `"exec"`
- **`arguments`** (JSON string): Serialized dictionary containing the exact executable command (`{"command": "..."}`).
- **`content`** (str): Empty string (standard format for tool calling responses).
- **`metadata`** (dict): Metadata associated with the command execution.
- **`id`** (str): Unique command ID (e.g., `cmd-001`).
- **`category`** (str): Functional category of the command (e.g., `File Management`, `Viewing`, `System Info`).
- **`example_output`** (str): Sample execution output or return status.
- **`man_reference`** (str): Link to the official man page documentation.
- **`original_description`** (str): The original, generic user description before prompt synchronization.
### Category Distribution
| Category | Record Count | Description |
| :--- | :---: | :--- |
| **File Management** | 94 | File creation, copying, moving, deletion, and file system operations |
| **Viewing** | 90 | Displaying file contents, tailing log files, viewing headers & line counts |
| **System Info** | 79 | System resources, hardware details, uptime, kernel & OS information |
| **Networking** | 76 | Network interfaces, routing, connectivity tests, DNS lookups, ports |
| **Process** | 65 | Process listing, monitoring, signaling, background jobs, termination |
| **Permissions** | 50 | File and directory permissions, ownership, and ACL modifications |
| **User Management** | 46 | User/group management, password policies, and shell configurations |
| **Package Management** | 39 | APT/YUM/RPM package management, updates, and software installations |
| **Navigation** | 35 | Directory traversal, path printing, and directory listing |
| **Editor** | 26 | CLI text editor invocations and stream processing (`nano`, `vim`, `sed`, `awk`) |
### Sample Record
```json
{
"messages": [
{
"role": "user",
"content": "Change the current working directory to /var/log."
},
{
"role": "assistant",
"reasoning_content": "The user wants to navigate to the /var/log directory. The 'cd' command is the standard way to change directories in Unix-like systems. The path /var/log is specified directly. Executing the tool.",
"tool_calls": [
{
"id": "call_exec_0",
"type": "function",
"function": {
"name": "exec",
"arguments": "{\"command\": \"cd /var/log\"}"
}
}
],
"content": ""
}
],
"metadata": {
"id": "cmd-001",
"category": "Navigation",
"example_output": "[No output, changes directory]",
"man_reference": "https://man7.org/linux/man-pages/man1/cd.1.html",
"original_description": "Changes the current directory to /var/log."
}
}
```
## Intended Use
This dataset is ideal for:
- Fine-tuning language models to act as autonomous agent loops in Linux terminal environments.
- Training models on standard OpenAI tool calling conventions for shell commands.
- Supervised Fine Tuning (SFT) for system administration assistants, incorporating chain-of-thought (reasoning) before issuing commands.
## Construction Method
The dataset was constructed by converting raw Linux terminal command records into a structured tool-use conversation trace.
To ensure consistency between user requests and executable commands, we utilized internal LLMs to perform **Prompt Synchronization**:
1. **Target Injection**: Generic references (e.g., "a directory", "a file") in user requests were automatically replaced or synchronized with specific target parameters found in the command (e.g., `/var/log`, `logfile.txt`).
2. **Chain-of-Thought Synthesis**: The LLM generated a 2-3 sentence `reasoning_content` to justify the selection of the command, flags, and arguments.
3. **Metadata Preservation**: Original command IDs, categories, man references, sample outputs, and descriptions are preserved in `metadata` for alignment and verification.
|