Tools Overview
Nilux AI comes with a powerful set of built-in tools that enable it to read, edit, search, and execute code directly in your project. These tools are the interface between the AI agent and your filesystem — they are what turn Nilux AI from a chatbot into an autonomous coding assistant.
How Tools Work
When you ask Nilux AI to perform a task, the agent decides which tools to use and in what order. Each tool call is:
- Requested by the agent based on your task
- Executed locally on your machine (via the CLI)
- Returned as a result to the agent for the next decision
The agent iterates through this loop until the task is complete.
Tool Categories
File Operations
Tools for reading and modifying files.
| Tool | Description |
|---|---|
| Read | Read file contents, including images and PDFs |
| Write | Create or overwrite files with new content |
| Edit | Precise find-and-replace within files |
| Glob | Find files by name pattern (e.g., **/*.test.ts) |
| Grep | Search file contents with regex |
Command Execution
| Tool | Description |
|---|---|
| Bash | Execute shell commands with timeout and sandboxing |
External Access
| Tool | Description |
|---|---|
| Web Search | Search the web for up-to-date information |
| Web Fetch | Fetch and process content from URLs |
Tool Execution Flow
A typical tool loop looks like this:
- User asks: "Find where authentication logic is implemented"
- Agent uses Grep to search for
authenticateacross the codebase - Agent uses Read to examine the matching files
- Agent responds with a summary of findings
For modifications:
- User asks: "Rename
getCwdtogetCurrentWorkingDirectoryacross my project" - Agent uses Grep to find all occurrences
- Agent uses Edit with
replace_all: trueon each file - Agent uses Bash to run tests and verify the change
Note: The agent reads a file with Read before editing it. The Edit tool enforces this to prevent stale-context edits.
Safety and Approvals
By default, destructive operations require your approval:
- Bash commands — You see the command and timeout before it runs
- File writes and edits — You see a diff preview before changes are applied
- Read-only tools (Read, Glob, Grep) — Run without approval
You can configure approval behavior in Configuration.
Tool Selection Guidelines
The agent follows these principles when choosing tools:
- Read for examining specific files
- Glob for finding files by name pattern
- Grep for finding content across files
- Edit for small, targeted changes
- Write for creating new files or full rewrites
- Bash for running commands, tests, builds
- Web Search for current information outside the codebase
Tip: When you ask Nilux AI to do something, be specific about what to change and where. This helps the agent choose the right tools efficiently.