Skip to content

feat: add minimalist mode for low-resource hardware (Pi 5)#610

Closed
watrworld wants to merge 1 commit intoHKUDS:mainfrom
watrworld:main
Closed

feat: add minimalist mode for low-resource hardware (Pi 5)#610
watrworld wants to merge 1 commit intoHKUDS:mainfrom
watrworld:main

Conversation

@watrworld
Copy link
Copy Markdown

This PR introduces a Minimalist Mode to allow Nanobot to run efficiently on low-resource hardware like the Raspberry Pi 5.

The Problem:
When using small local models (e.g., 1B or 3B parameters) via Ollama, the overhead of injecting full JSON tool definitions into the system prompt causes:

Extreme Latency: Response times exceeding 5–6 minutes.

Model Hallucinations: Small models often "hallucinate" tool calls or output raw JSON instead of answering the user.

The Solution:
Added a minimalist configuration flag. When set to true:

The agent skips fetching and sending tool definitions to the LLM.

The system prompt is streamlined for basic chat/reasoning.

Performance Gain: On a Raspberry Pi 5, response time dropped from ~6 minutes to < 2 seconds.

Changes:

nanobot/config/schema.py: Added minimalist boolean to AgentDefaults.

nanobot/agent/context.py: Modified build_system_prompt to respect the flag.

nanobot/agent/loop.py: Logic to pass tools=None to the provider when minimalist mode is active.

nanobot/cli/commands.py: Wired the config flag into the Agent Loop initialization.

@chengyongru
Copy link
Copy Markdown
Collaborator

Hi, thank you for your contribution!

This PR has merge conflicts with the main branch that have remained unresolved for an extended period. To keep the repository healthy, we're closing stale PRs with conflicts.

If you're still interested in this feature, please feel free to reopen with the conflicts resolved. We'd be happy to review a fresh PR!

@chengyongru
Copy link
Copy Markdown
Collaborator

Because this issue has been inactive for a long time, I will close it. If there are any other problems, please feel free to open a new issue.

WTHDonghai pushed a commit to WTHDonghai/nanobot that referenced this pull request Mar 22, 2026
…ction (HKUDS#610)

commit_async() called extract_long_term_memories(messages=...) without
passing user, session_id, or ctx. Because the compressor returns early
when ctx is None, async commits always produced memories_extracted=0.

The sync commit() path already passes all three parameters correctly.
This aligns the async path to match.

Regression from the COW pattern revert (HKUDS#584) which dropped these
arguments from the async call.

Fixes HKUDS#602

Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants