diff --git a/docs/architecture.md b/docs/architecture.md index afe23fc8d..2158ef8be 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -149,7 +149,7 @@ Defaults: |---|---| | Config | `~/.nanobot/config.json` | | Workspace | `~/.nanobot/workspace/` | -| Sessions | `/sessions/*.jsonl` | +| Sessions | `~/.nanobot/sessions//*.jsonl` | | Memory | `/memory/` | | Cron store | `/cron/jobs.json` | | WebUI/media/log runtime data | config directory subdirectories such as `webui/`, `media/`, and `logs/` | @@ -164,7 +164,7 @@ a WebUI chat may select a separate project: | Concern | Path owner | |---|---| -| Sessions, `SOUL.md`, `USER.md`, memory, and custom skills | Configured agent workspace | +| Session namespace, `SOUL.md`, `USER.md`, memory, and custom skills | Configured agent workspace | | Project `AGENTS.md`, relative tool paths, and shell working directory | Effective project workspace | | Workspace access mode and project metadata | Session workspace scope | @@ -180,7 +180,7 @@ Session history is the near-term conversation replay. Memory is the longer-term | Store | File area | |---|---| -| Session JSONL files | `/sessions/` | +| Session JSONL files | `~/.nanobot/sessions//` | | Long-term memory | `/memory/MEMORY.md` | | Consolidation source history | `/memory/history.jsonl` | | Bootstrap identity files | `/SOUL.md`, `/USER.md`, templates under `nanobot/templates/` | diff --git a/docs/concepts.md b/docs/concepts.md index 068d83933..ac65a9ab4 100644 --- a/docs/concepts.md +++ b/docs/concepts.md @@ -26,7 +26,8 @@ The default instance lives under `~/.nanobot/`: | Path | Meaning | |---|---| | `~/.nanobot/config.json` | Instance configuration: providers, model defaults, channels, tools, gateway, API, and runtime options | -| `~/.nanobot/workspace/` | Agent workspace: memory, sessions, heartbeat tasks, cron jobs, skills, and generated artifacts | +| `~/.nanobot/workspace/` | Agent workspace: memory, heartbeat tasks, cron jobs, skills, and generated artifacts | +| `~/.nanobot/sessions//` | Session history stored outside the agent-accessible workspace and namespaced by its canonical path | You can override both with command flags: @@ -125,7 +126,7 @@ nanobot uses two related stores: | Store | Location | Purpose | |---|---|---| -| Sessions | `/sessions/*.jsonl` | Recent conversation turns replayed into context | +| Sessions | `~/.nanobot/sessions//*.jsonl` | Recent conversation turns replayed into context | | Memory | `/memory/MEMORY.md` and `/memory/history.jsonl` | Long-term facts and consolidated history | Dream is a periodic consolidation job. It reads accumulated history and updates workspace memory so useful context can survive beyond short session replay. diff --git a/docs/deployment.md b/docs/deployment.md index f9dbf65b5..63f78c506 100644 --- a/docs/deployment.md +++ b/docs/deployment.md @@ -11,7 +11,7 @@ Check these once before Render, Docker, systemd, or LaunchAgent: | `nanobot status` shows the expected config and workspace | Confirms the process will read the instance you meant to run | | `nanobot agent -m "Hello!"` works | Proves install, config, provider, model, and workspace writes before adding a service layer | | Secrets are in environment variables or protected config files | API keys, bot tokens, OAuth state, and chat credentials should not be world-readable | -| `~/.nanobot/` or your custom config/workspace path is persistent | Sessions, memory, channel login state, generated artifacts, and cron jobs live there | +| `~/.nanobot/` (including `sessions/`) and any custom config/workspace paths are persistent | Sessions, memory, channel login state, generated artifacts, and cron jobs live there | | Channel access control is intentional | Use `allowFrom`, pairing, WebSocket `token`/`tokenIssueSecret`, or private test channels before exposing the bot | | Ports are planned | Gateway health defaults to local-only `127.0.0.1:18790`; WebUI/WebSocket defaults to `8765`; `nanobot serve` defaults to `8900` | | Logs are easy to reach | Use `docker compose logs`, `journalctl`, LaunchAgent log files, or `nanobot gateway --verbose` while diagnosing startup | diff --git a/docs/guides/deploy-nanobot-gateway.md b/docs/guides/deploy-nanobot-gateway.md index e58c132bb..3353e9201 100644 --- a/docs/guides/deploy-nanobot-gateway.md +++ b/docs/guides/deploy-nanobot-gateway.md @@ -47,8 +47,8 @@ nanobot gateway logs - Docker Compose is the most repeatable Linux container path. - systemd user services are useful for Linux user-level gateway deployments. - macOS LaunchAgent keeps the gateway alive after login. -- Persist config, workspace, sessions, memory files, channel login state, and - generated artifacts. +- Persist `~/.nanobot/sessions/` together with config, workspace, memory files, + channel login state, and generated artifacts. - Restart the gateway after editing `config.json`. ## Security notes diff --git a/docs/quick-start.md b/docs/quick-start.md index 92add6256..adf4a3d62 100644 --- a/docs/quick-start.md +++ b/docs/quick-start.md @@ -48,7 +48,8 @@ The WebUI launcher creates or updates: | Path | Purpose | |---|---| | `~/.nanobot/config.json` | Provider, model, WebUI, channel, tool, and runtime settings | -| `~/.nanobot/workspace/` | Sessions, memory, skills, automations, and generated files | +| `~/.nanobot/workspace/` | Memory, skills, automations, and generated files | +| `~/.nanobot/sessions//` | Recent session history, isolated by canonical workspace path | If the installer did not open the browser, run: diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md index a60089376..1501af0ce 100644 --- a/docs/troubleshooting.md +++ b/docs/troubleshooting.md @@ -319,7 +319,7 @@ See [`chat-apps.md`](./chat-apps.md) for channel-specific setup. |---|---| | Conversation context seems wrong | Confirm the active workspace and session. WebUI chats and chat app threads may use different sessions. | | Memory does not update immediately | Dream consolidation is periodic; recent turns still live in session history. | -| Old sessions appear after moving config | Session files are stored under `/sessions/`; verify the workspace path. | +| Old sessions appear after moving config | Session files are stored under `~/.nanobot/sessions//`; verify the canonical workspace path recorded in the directory's `.workspace` marker. | | You want one shared session across devices | Set `agents.defaults.unifiedSession` intentionally; otherwise keep separate sessions. | ## Collect Useful Evidence