docs: make user guidance easier to follow
This commit is contained in:
1 parent
b702ac633f
commit
1832255995
18 files changed
+45
-76
No files matched your search
@@ -16,7 +16,7 @@ Use MCP when the capability you need already exists as an MCP server, or when yo
|
||||
|
||||
Complete [Quick Start](../quick-start.md) if nanobot is not installed or cannot reply yet. If you already have a working WebUI or CLI session, continue here using that instance; no reinstall or second gateway is needed.
|
||||
|
||||
Install the MCP server runtime separately. Many examples use `npx`, `uvx`, or a remote HTTP endpoint.
|
||||
Choose a connection type first: use **stdio** for a tool that nanobot starts as a local process (you must install its runtime, such as `npx` or `uvx`); use **HTTP** or **SSE** for a tool available at a remote URL. If the remote server requires sign-in, configure OAuth in Apps and connect it in the browser.
|
||||
|
||||
## Minimal working example
|
||||
|
||||
@@ -62,7 +62,7 @@ Restart nanobot and ask a question that requires the MCP tool.
|
||||
## Security notes
|
||||
|
||||
- Stdio MCP starts a local process; review the command before enabling it.
|
||||
- HTTP/SSE MCP uses nanobot's SSRF guard, including OAuth discovery, registration, token exchange, and redirects.
|
||||
- HTTP/SSE connections are checked to prevent nanobot from reaching private or internal network addresses. This check also applies during OAuth sign-in and redirects.
|
||||
- OAuth credentials live in the nanobot data directory, not in `config.json`.
|
||||
- Allow private HTTP MCP hosts only with narrow `tools.ssrfWhitelist` CIDRs.
|
||||
- Do not place secrets in command arguments when environment variables or headers can be used.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# How to Improve Ollama Tool-Calling Prompt Cache Reuse in nanobot
|
||||
# Reuse Ollama Prompt Cache to Reduce Repeated Processing
|
||||
|
||||
Some Ollama model templates move or remove tool definitions as a conversation switches between user, assistant, and tool messages. nanobot can send a correct append-only chat request while the model template still renders a different token prefix. On slower local hardware, re-evaluating that prefix can add tens of seconds to an otherwise simple tool-using turn.
|
||||
Ollama can reuse work from an earlier prompt when the beginning of the prompt stays the same. Some model templates move or remove tool instructions as a conversation switches between user, assistant, and tool messages, so Ollama must process much of the prompt again. On slower local hardware, this can add tens of seconds to a tool-using turn.
|
||||
|
||||
This guide shows how to diagnose that specific pattern and create a derived `llama3.1:8b` tag with a prefix-stable tool template. It does not modify nanobot or overwrite the original Ollama model.
|
||||
|
||||
@@ -66,7 +66,7 @@ The cache is working, but the next main request can reuse only the shorter promp
|
||||
|
||||
To inspect the API request bodies as well, add `OLLAMA_DEBUG_LOG_REQUESTS=1` before starting Ollama. These logs can contain system prompts, workspace context, and user messages. Keep them local and disable request logging after diagnosis.
|
||||
|
||||
## Why this happens with the stock template
|
||||
## Why the default template can limit cache reuse
|
||||
|
||||
The tested `llama3.1:8b` template conditionally expands the tool definitions inside a user message:
|
||||
|
||||
|
||||
@@ -74,10 +74,9 @@ Ask a question that requires current information and inspect the tool activity i
|
||||
|
||||
## Security notes
|
||||
|
||||
- Web fetch and HTTP MCP share an SSRF guard.
|
||||
- Private, loopback, link-local, and cloud metadata addresses are blocked by default.
|
||||
- Web fetch and HTTP MCP share an address check that prevents requests to private or internal network locations. Private, loopback, link-local, and cloud metadata addresses are blocked by default.
|
||||
- With `useJinaReader` enabled (the default), fetched URLs are disclosed to the remote reader service. Credential-bearing URLs (userinfo or token/signature query parameters) are fetched locally instead; path-embedded secrets cannot be detected, so disable the remote reader when URLs must stay local.
|
||||
- Add `tools.ssrfWhitelist` only for narrow trusted CIDRs.
|
||||
- Add `tools.ssrfWhitelist` only for narrow trusted CIDRs. This setting exempts those address ranges from the private-address block; use the smallest range needed.
|
||||
- Do not give public chat users unrestricted web and shell access without review.
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
@@ -52,7 +52,7 @@ The four network fields have different jobs:
|
||||
|
||||
### Webhook and networking requirements
|
||||
|
||||
The native Linear Agent transport requires a webhook; there is no polling mode. The OAuth callback also needs to reach the same nanobot instance.
|
||||
OAuth connects and authorizes the Linear workspace. A webhook sends new Linear tasks to nanobot; this integration does not poll for tasks. Both the OAuth return address and webhook must reach the same nanobot instance.
|
||||
|
||||
You do **not** need a public IP address when using an HTTPS tunnel such as Cloudflare Tunnel or Tailscale Funnel. On a publicly reachable server, Caddy, nginx, or another reverse proxy can provide HTTPS and forward requests to `127.0.0.1:3979`. Use a stable hostname for normal use: if the hostname changes, update **Public HTTPS URL** in nanobot and both registered URLs in the Linear app.
|
||||
|
||||
|
||||
Reference in new issue
Block a user