Files
nanobot/docs
chengyongru 8f6a5594fb refactor(session): centralize state ownership in SQLite (#5943)
* fix(session): move persistence off event loop

* refactor(session): isolate async persistence boundary

* refactor(session): keep a single session manager

* refactor(session): use stateless async adapters

* fix(session): serialize local persistence without file-lock contention

* refactor(session): own async persistence and snapshot commits

* refactor(session): narrow persistence changes to async adapters

* refactor(session): remove redundant async forwarding helpers

* fix(command): offload compact session persistence

* fix(session): adapt idle compaction to current main

* fix(webui): offload session metadata persistence

* refactor(session): centralize state ownership in SQLite

* fix(session): skip storage for non-recoverable followups

* test(webui): honor the full gateway event deadline

* perf(session): persist incremental changes and reuse owner snapshots

* test(agent): allow durable worker shutdown in burst test

* fix(gateway): drain session storage on Windows console shutdown

* fix(session): enforce bounded ownership and lifecycle-safe persistence

* fix: reject unresolved home paths and stabilize platform tests

* fix(session): preserve request context compatibility and owner-backed tests

* docs: focus configuration guide on user-facing behavior

* fix(session): adapt goal admission to async ownership after rebase

* fix(session): integrate current gateway and subagent contracts

* fix(session): align rebased workspace admission and async tests

* fix(session): support compatible SQLite schema evolution

* test(agent): use session owner in workspace context regressions

* test: stabilize Windows lifecycle and browser checks

* refactor(session): remove premature JSONL file export

* ci: bound Windows full-suite worker concurrency

* chore: remove session state refactor notes

* fix(session): queue writes and retain worker connections

* perf(webui): read detached metadata for session and task lists

* perf(agent): bound prompt preparation and local token counting

* docs: remove internal session storage guide

* perf(session): skip archived transcripts during idle scans

* fix(session): coordinate turns and isolate legacy session data

Bind WebUI input generations to the execution session and serialize idle
and SDK compaction with turns. Keep turn drafts through preparation so the
latest channel route persists.

Move imported workspace JSONL and checkpoints to durable private backups
before gateway admission, resuming cleanup after interruptions. Remove
committed child sessions when task creation is cancelled.

Validation: focused Python and frontend regressions, Ruff, BasedPyright,
import boundaries, WebUI build, and isolated gateway/browser flows.

* fix(agent): keep cancellation hooks independent of prompt preparation

* fix(session): preserve admission, delivery, and migration contracts

* fix(agent): preserve cancellation settlement after rebase

* fix(session): preserve request attribution through async ownership
2026-10-16 17:28:47 +08:00
..

nanobot Documentation

Use these docs to get a working agent first. After the first reply, describe your next goal to nanobot or choose a task guide to read yourself. Source-level design and extension details are kept in the contributor section.

Repository docs follow the current source tree and can be newer than the latest package release. For published release docs, visit nanobot.wiki.

Use the graphical setup steps first when the WebUI exposes the setting. Expand Manual configuration for headless deployments or configuration managed as code. Settings without a graphical control keep their direct configuration instructions.

Start Here

Your situation Read this You are done when...
Terminals, Python, or API keys are new to you Beginner walkthrough The browser can send Hello! and receive a reply
You are comfortable running commands Install and Quick Start nanobot status is healthy and the WebUI or CLI can get one reply
Something already failed Troubleshooting You have isolated the problem to install, config, model, gateway, channel, or tool access

The recommended first-run path is:

  1. Install nanobot.
  2. Let the installer open nanobot webui on a fresh local desktop.
  3. Configure a provider and model in Settings → Models.
  4. Send Hello! before configuring anything else.

Most people do not need to edit JSON for the first run. The WebUI handles the initial provider, model, and local browser settings. SSH, headless, existing-config, and older-release installs retain nanobot onboard --wizard as a terminal fallback. After the WebUI opens, use Settings for models and built-in capabilities, Channels for chat apps, and Apps for Agent Plugins, CLI Apps, and MCP integrations.

After the First Reply

When the built-in nanobot-document skill is available and enabled, nanobot can consult the documentation bundled with your installation as you ask about features, configuration, or errors. Describe your current setup and one goal in the same chat; see Continue with nanobot for examples and explicit skill invocation. The skill links to the task and reference pages below as needed.

For independent reading, choose a task guide below. Use the reference section when you need an exact field, default, command, or protocol detail.

Add One Capability

Pick the row that matches what you want to accomplish next:

Goal Guide
Learn the browser workbench WebUI
Connect Telegram, Discord, Slack, Feishu, WeChat, Email, or another chat app Chat Apps
Choose a hosted, OAuth, company, or local model Provider Cookbook
Add model fallbacks Configure Model Fallback
Enable web search Configure Web Search
Manage Agent Plugins, CLI Apps, or MCP integrations WebUI Apps
Add an MCP tool server Configure MCP Tools
Generate images Image Generation
Schedule work or create a local trigger Automations
Understand and manage long-term memory Memory
Run nanobot continuously Deployment
Run separate bots or workspaces Multiple Instances
Call nanobot from Python Python SDK
Expose an OpenAI-compatible endpoint OpenAI-Compatible API

For shorter, outcome-focused walkthroughs, browse the task guide index.

Operate nanobot

Need Read
Commands and flags CLI Reference
In-chat slash commands In-Chat Commands
Config, workspace, gateway, sessions, tools, and memory in plain language Concepts
Provider/model matching and selection Providers and Models
Setup and runtime diagnosis Troubleshooting
Older development highlights Release Archive

Reference

Use reference pages to look up an exact option after you know what you are trying to configure:

Area Reference
Every configuration field and default Configuration
Provider and model behavior Providers and Models
Chat channel prerequisites and manual JSON Chat Apps
WebSocket authentication and wire protocol WebSocket
Python SDK classes, events, sessions, and hooks Python SDK
OpenAI-compatible HTTP routes and payloads OpenAI-Compatible API
Runtime self-inspection and tuning My Tool

Configuration examples are usually snippets to merge into ~/.nanobot/config.json, not complete replacement files. The docs use camelCase because nanobot writes config that way. Keep real API keys, bot tokens, and passwords out of issues and public logs.

Extend or Contribute

These pages explain implementation and extension points. You do not need them to install or operate nanobot.

Goal Read
Understand source ownership and runtime flow Architecture
Set up a development environment Development and CONTRIBUTING.md
Add a channel package Channel Package Guide
Build the WebUI source WebUI Development

If a command or screen no longer matches these docs, please open an issue with your nanobot version, operating system, and the page that needs correction.