* docs: improve readability and remove internal technical details from user docs * docs: expand user-doc cleanup to remote instances, deployment, providers, MCP presets, my-tool, and add concept diagrams * docs: streamline root README and SECURITY guide for readability * docs: move Why nanobot before Start Here and highlight lightweight footprint and WebUI
2.6 KiB
My Tool
The my tool lets nanobot inspect its own runtime state—such as which model, workspace, or iteration limit it is using—and optionally adjust safe runtime settings without editing config.json.
What It Lets the Agent Do
- Self-inspection (on by default): Answer questions like "What model are you using?", "Which project folder is active?", "Is web search enabled?", or "What is your iteration limit?".
- Runtime tuning (opt-in): Switch the current session's model preset, raise or lower the per-turn iteration limit (
1–100), or keep temporary scratchpad notes across turns.
Configuration
The my tool is enabled in read-only mode by default. To let the agent adjust allowed runtime settings, merge this into ~/.nanobot/config.json:
{
"tools": {
"my": {
"enable": true,
"allowSet": false
}
}
}
Set "allowSet": true to allow runtime adjustments.
What Persists and What Resets
| Change | Persists across turns? | Persists across gateway restart? |
|---|---|---|
Switching model_preset |
Yes (current session) | Yes (saved with the session) |
Adjusting max_iterations |
Yes (in memory) | No (resets to config.json) |
| Scratchpad notes | Yes (shared across turns in memory) | No (cleared on restart) |
Note
The
mytool never modifiesconfig.jsonon disk. Do not store sensitive secrets or durable user preferences in scratchpad notes—use Memory for preferences that should last.
Common Examples
You do not need to call the tool manually—just ask nanobot in plain language:
- "What model and workspace are you using right now?"
- "Why didn't you search the web?" (nanobot can check whether web search is enabled)
- "Switch this conversation to my
deeppreset." (whenallowSetis enabled) - "Give yourself up to 80 iterations for this refactoring task." (when
allowSetis enabled)
Note that context_window_tokens reports the configured window capacity, not live token usage. To see live context usage and per-round stats, use the WebUI context indicator.
Safety Boundaries
- Never accessible: Secrets (
apiKey,token,password,secret, etc.), internal system objects, and channel credentials are always hidden and blocked from both reading and writing. - Read-only: Workspace security restrictions, shell sandbox settings, and web configuration can be inspected for self-diagnosis, but the agent cannot weaken or modify them.
- Validated limits: Writable settings like
max_iterations(1–100) andmodel_preset(must be an existing configured preset) are strictly validated.