Built-in tools
NexAU ships with ready-to-use tools for common tasks. Import the Python function, create a YAML schema for it (see examples/deep_research/tools for reference schemas), and bind them together withTool.from_yaml.
File tools
Module:nexau.archs.tool.builtin.file_tools
| Function | Description |
|---|---|
read_file | Read text files with pagination. |
read_visual_file | Read image and video files for multimodal LLMs (requires a vision model). |
write_file | Write content to a file. |
replace | Replace text within a file. |
apply_patch | Apply a unified diff patch to a file. |
glob | Find files by glob pattern. |
list_directory | List files in a directory. |
read_many_files | Read multiple files at once. |
search_file_content | Search for text across files. |
Web tools
Module:nexau.archs.tool.builtin.web_tools
| Function | Description |
|---|---|
google_web_search | Search the web via Google (requires a Serper API key). |
web_fetch | Fetch and parse text content from a URL. |
Shell tools
Module:nexau.archs.tool.builtin.shell_tools
| Function | Description |
|---|---|
run_shell_command | Execute a shell command and return stdout/stderr. |
Session tools
Module:nexau.archs.tool.builtin.session_tools
| Function | Description |
|---|---|
write_todos | Write a structured to-do list for the current task. |
complete_task | Mark a task as complete. |
save_memory | Persist a value to the agent’s memory store. |
ask_user | Pause and ask the user a question. |
Using built-in tools
- Python
- YAML
Creating custom tools
You can give your agent any capability by writing a custom tool. The process has three steps: write the Python function, create the YAML schema, then bind them together.Define the Python function
Write a regular Python function with type hints. The docstring tells the LLM how to use the tool.
Create the YAML schema
The YAML file defines the tool’s name, description, and input schema. The The
description is what the LLM reads to decide whether to call this tool.tools/SimpleCalculator.tool.yaml
input_schema follows JSON Schema draft-07. Set additionalProperties: false to reject unexpected arguments before they reach your function.Frontend-friendly output with returnDisplay
When a tool returns a dict, you can include a returnDisplay field to show a short summary in the UI without sending that text to the LLM.
returnDisplay before forwarding the result to the LLM, so it doesn’t consume context tokens. All built-in tools follow this pattern.
Preset parameters with extra_kwargs
Use extra_kwargs to fix certain arguments at bind time so the LLM never needs to supply them — useful for API keys, base URLs, or any configuration that shouldn’t vary per call.
agent_state and global_storage cannot be used in extra_kwargs.
Deferred tool loading
When your agent has many tools, sending all their schemas to the LLM on every turn wastes context tokens. Mark infrequently used tools withdefer_loading: true to keep them out of the LLM’s view until needed.
How it works:
- Tools with
defer_loading: trueare registered but excluded from the LLM’s tool list. - NexAU automatically adds a built-in
ToolSearchtool to the agent. - When the LLM calls
ToolSearch, matching deferred tools are injected into the tool list. - From the next turn, the LLM can call the injected tools directly.
tools/SlackSendMessage.yaml