Download Latest Version v0.2.1 source code.tar.gz (34.1 MB)
Email in envelope

Get an email when there's a new version of nanobot

Home / v0.2.0
Name Modified Size InfoDownloads / Week
Parent folder
README.md 2026-05-16 23.6 kB
v0.2.0 source code.tar.gz 2026-05-16 33.8 MB
v0.2.0 source code.zip 2026-05-16 34.1 MB
Totals: 3 Items   67.9 MB 1

🐈 nanobot v0.2.0 is here 🎉 — 105 PRs merged, 20 new contributors. The agent learned to hold a goal.

The headline is /goal. Mark a thread as a sustained objective with long_task, and the active goal stays pinned in Runtime Context every turn — surviving compaction, surviving long tool chains, surviving the model's own forgetfulness — until you call complete_goal. The wall-clock timeout widens automatically while a goal is active; streaming requests fall back to an idle timeout instead of a hard wall, so a model that's still thinking doesn't get killed mid-thought.

The second story is the WebUI growing up. After several releases as a source-only preview, it now ships inside the wheelpip install nanobot-ai and you have it. Settings and BYOK got a full redesign, the slash palette is localized, LAN access is gated by a token, reasoning streams live to the chat, and a brand-new image-generation tool turns "draw me X" into an inline preview without leaving the conversation.

The third story is the engine room. The agent loop got a real refactor — AgentLoop.from_config() for clean embedding, _process_message rewritten as a functional state machine, archived summary moved into the system prompt for KV cache stability, tools converted to a self-describing plugin architecture, ask_user and GlobTool retired in favor of cleaner replacements. Five new providers (AWS Bedrock Converse, NVIDIA NIM, LongCat, Atomic Chat, MiMo) join the lineup with fallback_models as a safety net so a single flaky endpoint can't take a turn down. Plus four [security] fixes — SSRF, media path confinement, softer workspace boundaries — and chat-native pairing so DM approvals finally happen in the chat instead of in a config file.

Highlights

  • /goal and long-running tasks — agent with a memory of why — The new long_task tool, paired with /goal and complete_goal, marks a thread as a sustained objective. The active goal is mirrored in Runtime Context every turn so the agent stays anchored even after compaction, the WebUI surfaces the goal in the chat header, and the LLM wall timeout is automatically widened while a goal is active so longer reasoning passes don't get killed mid-thought. Core agents and subagents both honor the longer budget; streaming requests fall back to an idle timeout instead of a hard wall clock so a model that's still emitting tokens won't be prematurely cut off. (#3788, [#3855])

  • Image generation, end to end — A new image-generation tool plus a WebUI image mode let you go from prompt to picture without leaving the chat. Generated images render inline with rounded previews; replay-window and dedup paths were tightened so images don't double-deliver across long sessions, and the consolidation pass now respects the replay window when hiding history. (#3695, [#3687])

  • WebUI shipped in the wheel + a year's worth of polishpip install nanobot-ai now bundles the WebUI: enable the WebSocket channel, run nanobot gateway, open the browser. No cd webui && bun run build required. After several releases under a "preview" label, the WebUI is now a packaged surface. Inside it: redesigned settings and BYOK flow (including BYOK web search), localized slash palette, model preset badge that stays in sync across slash commands and config reloads, streamed reasoning rendered live, image previews, LAN access gated by tokenIssueSecret, default-to-new-chat on load, scroll preservation on settings return, a crypto.randomUUID shim for non-secure-context LAN use, and dropped eager markdown preload to cut first-paint cost. (#3653, [#3661], [#3703], [#3709], [#3656], [#3658], [#3733], [#3759], [#3782])

  • Five new providers and a fallback safety netNative AWS Bedrock Converse lands as a first-class provider (#3574), with a follow-up that preserves Bedrock tool config across history (#3758). NVIDIA NIM (#3707), LongCat via OpenAI-compatible routing (#3114), Atomic Chat as a local OpenAI-compatible target (#3750), and MiMo with proper thinking-control wiring (#3734, [#3851]) round out the lineup. On top of the wider stack, fallback_models lets you list secondary models that take over when the primary fails (#3756), DeepSeek reasoning history is back-filled instead of dropped (#3616, [#3560]), Codex prompt cache keys stabilized (#3793), and Anthropic auto-falls back to streaming on long-request errors (#3579).

  • Model presets and runtime switchingModelPresetConfig lets you name model + provider bundles in config and swap between them at runtime via /model (or the WebUI badge). Presets sync across slash commands, config reloads, and settings changes, so the model badge always matches what the next turn will hit. (#3714)

  • Core refactor — a cleaner agent loop, a smaller surfaceAgentLoop.from_config() centralizes loop assembly so embedders stop reaching into private internals (#3708). _process_message was rewritten as a functional state machine with explicit transitions instead of nested branches (#3715). The archived conversation summary moved into the system prompt to keep KV caches stable across compactions (#3711). Tools became a self-describing plugin architecture (#3729). ask_user was removed in favor of structured message-tool choices (#3757), and GlobTool was retired in favor of read_file glob support (#3841). Vulture- and coverage-verified dead code was excised (#3755, [#3719]). Logging now preserves tracebacks and carries channel context (#3651, [#3678]). Ruff F rules are fully enforced in CI (#3672), and the agent test suite was expanded and restructured (#3766). New CLAUDE.md and .agent/ guides give AI contributors a stable on-ramp (#3534, [#3860]).

  • Pairing, DM approvals, and security hardening — Chat-native pairing (#3774) lets you approve DMs from inside chat instead of editing config. On the safety front: SSRF blocked in DingTalk outbound media (#3569), Feishu downloaded-media filenames confined to safe paths (#3789), local media attachments confined for the message tool (#3842), SSRF guard recovery softened so a transient miss doesn't poison subsequent turns (#3635), and workspace boundary violations get a retry-throttled soft warning instead of crashing the loop (#3614). Telegram silently ignores unauthorized senders instead of leaking error responses (#3629).

  • Memory, dream, and session durability — Cron jobs.json gained atomic writes with corrupt-store detection (#3606). Dream cursor only advances on completed batches (#3631) and restores correctly with memory state on resume (#3660). Replay-window hidden history is now properly consolidated (#3687). Workspace and tool-state changes survive restarts more reliably end-to-end.

  • Channel and platform fixes — Feishu group threads honor reply chains and topic isolation (#3547, [#3704], [#3747], [#3775]), Matrix skips pre-startup events and stops the sync loop on irrecoverable auth (#3575, [#3578]), WhatsApp voice messages download cleanly (#3607), Wecom preserves real filenames (#3751), Telegram quiets unauthorized senders (#3629), and Weixin raises on send failures so messages don't silently drop (#3659). On Windows: UNC path support in shell extraction (#3764). On the CLI: surrogate code points sanitized before the message bus (#3697), retry-wait messages no longer garble interactive output (#3705, [#3609]), and nanobot provider logout lands as a proper command (#3612).

  • Smaller things you'll feel — Configurable bot_name / bot_icon (#3730), configurable toolHintMaxLength (#3641), real SSE streaming restored on the OpenAI-compatible API (#3677), Whisper transcription retries on transient failures (#3646), sequential MCP server connects to stop CPU spin (#3640), MCP HTTP probe before connect (#3740), Brave search backoff under rate limits (#3840), sender_id in Runtime Context for user-aware responses (#3549), runtime context appended after user content for cache stability (#3844), origin_message_id outbound deduplication (#3561), and a Python SDK RunResult that finally exposes tools_used and messages (#3620).

Community

Heartfelt thanks to everyone who shipped v0.2.0105 PRs, 33 contributors, and a huge welcome to 20 first-time contributors. Every review, patch, and bug report helped; this release is a shared win. 🎉

What's Changed

New Contributors

Full Changelog: https://github.com/HKUDS/nanobot/compare/v0.1.5.post3...v0.2.0

Source: README.md, updated 2026-05-16