NanoBot AI
raw JSON → 0.1.5.post3 verified Fri May 01 auth: no python
A lightweight personal AI assistant framework for building modular, extensible AI agents. Supports multiple LLM backends, tool/plugin systems, and memory. Current version: 0.1.5.post3. Pre-release/rapidly evolving; breaking changes likely between minor versions as API stabilises.
pip install nanobot-ai Common errors
error ModuleNotFoundError: No module named 'nanobot' ↓
cause Trying to import 'nanobot_ai' instead of 'nanobot'.
fix
Change import to 'from nanobot import NanoBot'.
error TypeError: NanoBot.__init__() got an unexpected keyword argument 'api_key' ↓
cause Constructor signature changed; 'api_key' was renamed to 'openai_api_key' or requires a config object.
fix
Check the latest docs. For 0.1.5: use 'NanoBot(config={"api_key": "..."})'.
error AttributeError: 'NanoBot' object has no attribute 'chat' ↓
cause The synchronous chat method was removed or renamed in an update.
fix
Use 'await bot.chat_async(...)' in an async context, or check if method is 'ask' instead. Verify version.
Warnings
breaking The API is unstable: constructor arguments and method signatures may change between 0.x versions. Pin your dependency with exact version. ↓
fix Specify 'nanobot-ai==0.1.5.post3' in requirements.txt.
gotcha Async methods require event loop management. Using .chat() in sync context may block if not handled correctly. ↓
fix If you encounter blocking behaviour, wrap calls in asyncio.run() or use the async API directly with 'await bot.chat_async(...)'.
deprecated The 'plugins' directory auto-discovery was deprecated in 0.1.5. Use explicit plugin registration instead. ↓
fix Replace with 'bot.register_plugin("my_plugin")' import.
Imports
- NanoBot wrong
from nanobot_ai import NanoBotcorrectfrom nanobot import NanoBot
Quickstart
import os
from nanobot import NanoBot
bot = NanoBot(api_key=os.environ.get('NANOBOT_API_KEY', ''))
response = bot.chat("Hello, what can you do?")
print(response)