A lightweight personal AI assistant framework
Project description
๐ neobot is an ultra-lightweight personal AI assistant inspired by OpenClaw.
This repository is a community-maintained fork of HKUDS/nanobot, rehomed for independent maintenance and personalized evolution.
โก๏ธ Delivers core agent functionality with 99% fewer lines of code than OpenClaw.
๐ Real-time line count: run bash core_agent_lines.sh to verify anytime.
๐ข News
Historical entries below preserve upstream nanobot release and discussion links for traceability.
- 2026-03-08 ๐ Released v0.1.4.post4 โ a reliability-packed release with safer defaults, better multi-instance support, sturdier MCP, and major channel and provider improvements. Please see release notes for details.
- 2026-03-07 ๐ Azure OpenAI provider, WhatsApp media, QQ group chats, and more Telegram/Feishu polish.
- 2026-03-06 ๐ช Lighter providers, smarter media handling, and sturdier memory and CLI compatibility.
- 2026-03-05 โก๏ธ Telegram draft streaming, MCP SSE support, and broader channel reliability fixes.
- 2026-03-04 ๐ ๏ธ Dependency cleanup, safer file reads, and another round of test and Cron fixes.
- 2026-03-03 ๐ง Cleaner user-message merging, safer multimodal saves, and stronger Cron guards.
- 2026-03-02 ๐ก๏ธ Safer default access control, sturdier Cron reloads, and cleaner Matrix media handling.
- 2026-03-01 ๐ Web proxy support, smarter Cron reminders, and Feishu rich-text parsing improvements.
- 2026-02-28 ๐ Released v0.1.4.post3 โ cleaner context, hardened session history, and smarter agent. Please see release notes for details.
- 2026-02-27 ๐ง Experimental thinking mode support, DingTalk media messages, Feishu and QQ channel fixes.
- 2026-02-26 ๐ก๏ธ Session poisoning fix, WhatsApp dedup, Windows path guard, Mistral compatibility.
Earlier news
- 2026-02-25 ๐งน New Matrix channel, cleaner session context, auto workspace template sync.
- 2026-02-24 ๐ Released v0.1.4.post2 โ a reliability-focused release with a redesigned heartbeat, prompt cache optimization, and hardened provider & channel stability. See release notes for details.
- 2026-02-23 ๐ง Virtual tool-call heartbeat, prompt cache optimization, Slack mrkdwn fixes.
- 2026-02-22 ๐ก๏ธ Slack thread isolation, Discord typing fix, agent reliability improvements.
- 2026-02-21 ๐ Released v0.1.4.post1 โ new providers, media support across channels, and major stability improvements. See release notes for details.
- 2026-02-20 ๐ฆ Feishu now receives multimodal files from users. More reliable memory under the hood.
- 2026-02-19 โจ Slack now sends files, Discord splits long messages, and subagents work in CLI mode.
- 2026-02-18 โก๏ธ neobot now supports VolcEngine, MCP custom auth headers, and Anthropic prompt caching.
- 2026-02-17 ๐ Released v0.1.4 โ MCP support, progress streaming, new providers, and multiple channel improvements. Please see release notes for details.
- 2026-02-16 ๐ฆ neobot now integrates a ClawHub skill โ search and install public agent skills.
- 2026-02-15 ๐ neobot now supports OpenAI Codex provider with OAuth login support.
- 2026-02-14 ๐ neobot now supports MCP! See MCP section for details.
- 2026-02-13 ๐ Released v0.1.3.post7 โ includes security hardening and multiple improvements. Please upgrade to the latest version to address security issues. See release notes for more details.
- 2026-02-12 ๐ง Redesigned memory system โ Less code, more reliable. Join the discussion about it!
- 2026-02-11 โจ Enhanced CLI experience and added MiniMax support!
- 2026-02-10 ๐ Released v0.1.3.post6 with improvements! Check the updates notes and our roadmap.
- 2026-02-09 ๐ฌ Added Slack, Email, and QQ support โ neobot now supports multiple chat platforms!
- 2026-02-08 ๐ง Refactored Providersโadding a new LLM provider now takes just 2 simple steps! Check here.
- 2026-02-07 ๐ Released v0.1.3.post5 with Qwen support & several key improvements! Check here for details.
- 2026-02-06 โจ Added Moonshot/Kimi provider, Discord integration, and enhanced security hardening!
- 2026-02-05 โจ Added Feishu channel, DeepSeek provider, and enhanced scheduled tasks support!
- 2026-02-04 ๐ Released v0.1.3.post4 with multi-provider & Docker support! Check here for details.
- 2026-02-03 โก Integrated vLLM for local LLM support and improved natural language task scheduling!
- 2026-02-02 ๐ neobot officially launched! Welcome to try ๐ neobot!
Key Features of neobot:
๐ชถ Ultra-Lightweight: Just ~4,000 lines of core agent code โ 99% smaller than Clawdbot.
๐ฌ Research-Ready: Clean, readable code that's easy to understand, modify, and extend for research.
โก๏ธ Lightning Fast: Minimal footprint means faster startup, lower resource usage, and quicker iterations.
๐ Easy-to-Use: One-click to deploy and you're ready to go.
๐๏ธ Architecture
โจ Features
๐ 24/7 Real-Time Market Analysis |
๐ Full-Stack Software Engineer |
๐ Smart Daily Routine Manager |
๐ Personal Knowledge Assistant |
|---|---|---|---|
| Discovery โข Insights โข Trends | Develop โข Deploy โข Scale | Schedule โข Automate โข Organize | Learn โข Memory โข Reasoning |
๐ฆ Install
Install from source (latest features, recommended for development)
git clone https://github.com/JasonZhaoWW/neobot.git
cd neobot
uv sync --extra dev
uv run neobot --version
[!TIP] Working from a cloned repo? For CLI examples in this README, use
uv run neobot .... If you installed viauv tool installorpip install, keep usingneobot ...directly.
Install with uv (stable, fast)
uv tool install neobot-ai
Install from PyPI (stable)
pip install neobot-ai
Update to latest version
PyPI / pip
pip install -U neobot-ai
neobot --version
uv
uv tool upgrade neobot-ai
neobot --version
๐ Quick Start
[!TIP] Set your API key in
~/.neobot/config.json. Get API keys: OpenRouter (Global) ยท Brave Search (optional, for web search)
1. Initialize
neobot onboard
2. Configure (~/.neobot/config.json)
Add or merge these two parts into your config (other options have defaults).
Set your API key (e.g. OpenRouter, recommended for global users):
{
"providers": {
"openrouter": {
"apiKey": "sk-or-v1-xxx"
}
}
}
Set your model (optionally pin a provider โ defaults to auto-detection):
{
"agents": {
"defaults": {
"model": "anthropic/claude-opus-4-5",
"provider": "openrouter"
}
}
}
3. Chat
neobot agent
That's it! You have a working AI assistant in 2 minutes.
๐ฌ Chat Apps
Connect neobot to your favorite chat platform.
Telegram and Discord are the actively maintained channels. Other integrations remain available in the repo on a best-effort, community-supported basis. See CONTRIBUTING.md for contribution and support expectations.
| Channel | What you need |
|---|---|
| Telegram | Bot token from @BotFather |
| Discord | Bot token + Message Content intent |
| Feishu | App ID + App Secret |
| Mochat | Claw token (auto-setup available) |
| DingTalk | App Key + App Secret |
| Slack | Bot token + App-Level token |
| IMAP/SMTP credentials | |
| App ID + App Secret |
Telegram (Recommended)
1. Create a bot
- Open Telegram, search
@BotFather - Send
/newbot, follow prompts - Copy the token
2. Configure
{
"channels": {
"telegram": {
"enabled": true,
"token": "YOUR_BOT_TOKEN",
"allowFrom": ["YOUR_USER_ID"]
}
}
}
You can find your User ID in Telegram settings. It is shown as
@yourUserId. Copy this value without the@symbol and paste it into the config file.
3. Run
neobot gateway
Mochat (Claw IM)
Uses Socket.IO WebSocket by default, with HTTP polling fallback.
1. Ask neobot to set up Mochat for you
Simply send this message to neobot (replace xxx@xxx with your real email):
Read https://raw.githubusercontent.com/HKUDS/MoChat/refs/heads/main/skills/nanobot/skill.md and register on MoChat. My Email account is xxx@xxx Bind me as your owner and DM me on MoChat.
neobot will automatically register, configure ~/.neobot/config.json, and connect to Mochat.
2. Restart gateway
neobot gateway
That's it โ neobot handles the rest!
Manual configuration (advanced)
If you prefer to configure manually, add the following to ~/.neobot/config.json:
Keep
claw_tokenprivate. It should only be sent inX-Claw-Tokenheader to your Mochat API endpoint.
{
"channels": {
"mochat": {
"enabled": true,
"base_url": "https://mochat.io",
"socket_url": "https://mochat.io",
"socket_path": "/socket.io",
"claw_token": "claw_xxx",
"agent_user_id": "6982abcdef",
"sessions": ["*"],
"panels": ["*"],
"reply_delay_mode": "non-mention",
"reply_delay_ms": 120000
}
}
}
Discord
1. Create a bot
- Go to https://discord.com/developers/applications
- Create an application โ Bot โ Add Bot
- Copy the bot token
2. Enable intents
- In the Bot settings, enable MESSAGE CONTENT INTENT
- (Optional) Enable SERVER MEMBERS INTENT if you plan to use allow lists based on member data
3. Get your User ID
- Discord Settings โ Advanced โ enable Developer Mode
- Right-click your avatar โ Copy User ID
4. Configure
{
"channels": {
"discord": {
"enabled": true,
"token": "YOUR_BOT_TOKEN",
"allowFrom": ["YOUR_USER_ID"],
"groupPolicy": "mention"
}
}
}
groupPolicycontrols how the bot responds in group channels:
"mention"(default) โ Only respond when @mentioned"open"โ Respond to all messages DMs always respond when the sender is inallowFrom.
5. Invite the bot
- OAuth2 โ URL Generator
- Scopes:
bot - Bot Permissions:
Send Messages,Read Message History - Open the generated invite URL and add the bot to your server
6. Run
neobot gateway
Matrix (Element)
Install Matrix dependencies first:
pip install neobot-ai[matrix]
1. Create/choose a Matrix account
- Create or reuse a Matrix account on your homeserver (for example
matrix.org). - Confirm you can log in with Element.
2. Get credentials
- You need:
userId(example:@neobot:matrix.org)accessTokendeviceId(recommended so sync tokens can be restored across restarts)
- You can obtain these from your homeserver login API (
/_matrix/client/v3/login) or from your client's advanced session settings.
3. Configure
{
"channels": {
"matrix": {
"enabled": true,
"homeserver": "https://matrix.org",
"userId": "@neobot:matrix.org",
"accessToken": "syt_xxx",
"deviceId": "NANOBOT01",
"e2eeEnabled": true,
"allowFrom": ["@your_user:matrix.org"],
"groupPolicy": "open",
"groupAllowFrom": [],
"allowRoomMentions": false,
"maxMediaBytes": 20971520
}
}
}
Keep a persistent
matrix-storeand stabledeviceIdโ encrypted session state is lost if these change across restarts.
| Option | Description |
|---|---|
allowFrom |
User IDs allowed to interact. Empty denies all; use ["*"] to allow everyone. |
groupPolicy |
open (default), mention, or allowlist. |
groupAllowFrom |
Room allowlist (used when policy is allowlist). |
allowRoomMentions |
Accept @room mentions in mention mode. |
e2eeEnabled |
E2EE support (default true). Set false for plaintext-only. |
maxMediaBytes |
Max attachment size (default 20MB). Set 0 to block all media. |
4. Run
neobot gateway
Feishu (้ฃไนฆ)
Uses WebSocket long connection โ no public IP required.
1. Create a Feishu bot
- Visit Feishu Open Platform
- Create a new app โ Enable Bot capability
- Permissions: Add
im:message(send messages) andim:message.p2p_msg:readonly(receive messages) - Events: Add
im.message.receive_v1(receive messages)- Select Long Connection mode (requires running neobot first to establish connection)
- Get App ID and App Secret from "Credentials & Basic Info"
- Publish the app
2. Configure
{
"channels": {
"feishu": {
"enabled": true,
"appId": "cli_xxx",
"appSecret": "xxx",
"encryptKey": "",
"verificationToken": "",
"allowFrom": ["ou_YOUR_OPEN_ID"]
}
}
}
encryptKeyandverificationTokenare optional for Long Connection mode.allowFrom: Add your open_id (find it in neobot logs when you message the bot). Use["*"]to allow all users.
3. Run
neobot gateway
[!TIP] Feishu uses WebSocket to receive messages โ no webhook or public IP needed!
QQ (QQๅ่)
Uses botpy SDK with WebSocket โ no public IP required. Currently supports private messages only.
1. Register & create bot
- Visit QQ Open Platform โ Register as a developer (personal or enterprise)
- Create a new bot application
- Go to ๅผๅ่ฎพ็ฝฎ (Developer Settings) โ copy AppID and AppSecret
2. Set up sandbox for testing
- In the bot management console, find ๆฒ็ฎฑ้ ็ฝฎ (Sandbox Config)
- Under ๅจๆถๆฏๅ่กจ้ ็ฝฎ, click ๆทปๅ ๆๅ and add your own QQ number
- Once added, scan the bot's QR code with mobile QQ โ open the bot profile โ tap "ๅๆถๆฏ" to start chatting
3. Configure
allowFrom: Add your openid (find it in neobot logs when you message the bot). Use["*"]for public access.- For production: submit a review in the bot console and publish. See QQ Bot Docs for the full publishing flow.
{
"channels": {
"qq": {
"enabled": true,
"appId": "YOUR_APP_ID",
"secret": "YOUR_APP_SECRET",
"allowFrom": ["YOUR_OPENID"]
}
}
}
4. Run
neobot gateway
Now send a message to the bot from QQ โ it should respond!
DingTalk (้้)
Uses Stream Mode โ no public IP required.
1. Create a DingTalk bot
- Visit DingTalk Open Platform
- Create a new app -> Add Robot capability
- Configuration:
- Toggle Stream Mode ON
- Permissions: Add necessary permissions for sending messages
- Get AppKey (Client ID) and AppSecret (Client Secret) from "Credentials"
- Publish the app
2. Configure
{
"channels": {
"dingtalk": {
"enabled": true,
"clientId": "YOUR_APP_KEY",
"clientSecret": "YOUR_APP_SECRET",
"allowFrom": ["YOUR_STAFF_ID"]
}
}
}
allowFrom: Add your staff ID. Use["*"]to allow all users.
3. Run
neobot gateway
Slack
Uses Socket Mode โ no public URL required.
1. Create a Slack app
- Go to Slack API โ Create New App โ "From scratch"
- Pick a name and select your workspace
2. Configure the app
- Socket Mode: Toggle ON โ Generate an App-Level Token with
connections:writescope โ copy it (xapp-...) - OAuth & Permissions: Add bot scopes:
chat:write,reactions:write,app_mentions:read - Event Subscriptions: Toggle ON โ Subscribe to bot events:
message.im,message.channels,app_mentionโ Save Changes - App Home: Scroll to Show Tabs โ Enable Messages Tab โ Check "Allow users to send Slash commands and messages from the messages tab"
- Install App: Click Install to Workspace โ Authorize โ copy the Bot Token (
xoxb-...)
3. Configure neobot
{
"channels": {
"slack": {
"enabled": true,
"botToken": "xoxb-...",
"appToken": "xapp-...",
"allowFrom": ["YOUR_SLACK_USER_ID"],
"groupPolicy": "mention"
}
}
}
4. Run
neobot gateway
DM the bot directly or @mention it in a channel โ it should respond!
[!TIP]
groupPolicy:"mention"(default โ respond only when @mentioned),"open"(respond to all channel messages), or"allowlist"(restrict to specific channels).- DM policy defaults to open. Set
"dm": {"enabled": false}to disable DMs.
Give neobot its own email account. It polls IMAP for incoming mail and replies via SMTP โ like a personal email assistant.
1. Get credentials (Gmail example)
- Create a dedicated Gmail account for your bot (e.g.
my-neobot@gmail.com) - Enable 2-Step Verification โ Create an App Password
- Use this app password for both IMAP and SMTP
2. Configure
consentGrantedmust betrueto allow mailbox access. This is a safety gate โ setfalseto fully disable.allowFrom: Add your email address. Use["*"]to accept emails from anyone.smtpUseTlsandsmtpUseSsldefault totrue/falserespectively, which is correct for Gmail (port 587 + STARTTLS). No need to set them explicitly.- Set
"autoReplyEnabled": falseif you only want to read/analyze emails without sending automatic replies.
{
"channels": {
"email": {
"enabled": true,
"consentGranted": true,
"imapHost": "imap.gmail.com",
"imapPort": 993,
"imapUsername": "my-neobot@gmail.com",
"imapPassword": "your-app-password",
"smtpHost": "smtp.gmail.com",
"smtpPort": 587,
"smtpUsername": "my-neobot@gmail.com",
"smtpPassword": "your-app-password",
"fromAddress": "my-neobot@gmail.com",
"allowFrom": ["your-real-email@gmail.com"]
}
}
}
3. Run
neobot gateway
๐ Agent Social Network
๐ neobot is capable of linking to the agent social network (agent community). Just send one message and your neobot joins automatically!
| Platform | How to Join (send this message to your bot) |
|---|---|
| Moltbook | Read https://moltbook.com/skill.md and follow the instructions to join Moltbook |
| ClawdChat | Read https://clawdchat.ai/skill.md and follow the instructions to join ClawdChat |
Simply send the command above to your neobot (via CLI or any chat channel), and it will handle the rest.
โ๏ธ Configuration
Config file: ~/.neobot/config.json
Providers
[!TIP]
- Groq provides free voice transcription via Whisper. If configured, Telegram voice messages will be automatically transcribed.
- Zhipu Coding Plan: If you're on Zhipu's coding plan, set
"apiBase": "https://open.bigmodel.cn/api/coding/paas/v4"in your zhipu provider config.- MiniMax (Mainland China): If your API key is from MiniMax's mainland China platform (minimaxi.com), set
"apiBase": "https://api.minimaxi.com/v1"in your minimax provider config.- VolcEngine Coding Plan: If you're on VolcEngine's coding plan, set
"apiBase": "https://ark.cn-beijing.volces.com/api/coding/v3"in your volcengine provider config.- Alibaba Cloud Coding Plan: If you're on the Alibaba Cloud Coding Plan (BaiLian), set
"apiBase": "https://coding.dashscope.aliyuncs.com/v1"in your dashscope provider config.
| Provider | Purpose | Get API Key |
|---|---|---|
custom |
Any OpenAI-compatible endpoint (direct, no LiteLLM) | โ |
openrouter |
LLM (recommended, access to all models) | openrouter.ai |
anthropic |
LLM (Claude direct) | console.anthropic.com |
azure_openai |
LLM (Azure OpenAI) | portal.azure.com |
openai |
LLM (GPT direct) | platform.openai.com |
deepseek |
LLM (DeepSeek direct) | platform.deepseek.com |
groq |
LLM + Voice transcription (Whisper) | console.groq.com |
gemini |
LLM (Gemini direct) | aistudio.google.com |
minimax |
LLM (MiniMax direct) | platform.minimaxi.com |
aihubmix |
LLM (API gateway, access to all models) | aihubmix.com |
siliconflow |
LLM (SiliconFlow/็ก ๅบๆตๅจ) | siliconflow.cn |
volcengine |
LLM (VolcEngine/็ซๅฑฑๅผๆ) | volcengine.com |
dashscope |
LLM (Qwen) | dashscope.console.aliyun.com |
moonshot |
LLM (Moonshot/Kimi) | platform.moonshot.cn |
zhipu |
LLM (Zhipu GLM) | open.bigmodel.cn |
vllm |
LLM (local, any OpenAI-compatible server) | โ |
openai_codex |
LLM (Codex, OAuth) | neobot provider login openai-codex |
github_copilot |
LLM (GitHub Copilot, OAuth) | neobot provider login github-copilot |
OpenAI Codex (OAuth)
Codex uses OAuth instead of API keys. Requires a ChatGPT Plus or Pro account.
1. Login:
neobot provider login openai-codex
2. Set model (merge into ~/.neobot/config.json):
{
"agents": {
"defaults": {
"model": "openai-codex/gpt-5.1-codex"
}
}
}
3. Chat:
neobot agent -m "Hello!"
# Target a specific workspace/config locally
neobot agent -c ~/.neobot-telegram/config.json -m "Hello!"
# One-off workspace override on top of that config
neobot agent -c ~/.neobot-telegram/config.json -w /tmp/neobot-telegram-test -m "Hello!"
Docker users: use
docker run -itfor interactive OAuth login.
Custom Provider (Any OpenAI-compatible API)
Connects directly to any OpenAI-compatible endpoint โ LM Studio, llama.cpp, Together AI, Fireworks, Azure OpenAI, or any self-hosted server. Bypasses LiteLLM; model name is passed as-is.
{
"providers": {
"custom": {
"apiKey": "your-api-key",
"apiBase": "https://api.your-provider.com/v1"
}
},
"agents": {
"defaults": {
"model": "your-model-name"
}
}
}
For local servers that don't require a key, set
apiKeyto any non-empty string (e.g."no-key").
vLLM (local / OpenAI-compatible)
Run your own model with vLLM or any OpenAI-compatible server, then add to config:
1. Start the server (example):
vllm serve meta-llama/Llama-3.1-8B-Instruct --port 8000
2. Add to config (partial โ merge into ~/.neobot/config.json):
Provider (key can be any non-empty string for local):
{
"providers": {
"vllm": {
"apiKey": "dummy",
"apiBase": "http://localhost:8000/v1"
}
}
}
Model:
{
"agents": {
"defaults": {
"model": "meta-llama/Llama-3.1-8B-Instruct"
}
}
}
Adding a New Provider (Developer Guide)
neobot uses a Provider Registry (neobot/providers/registry.py) as the single source of truth.
Adding a new provider only takes 2 steps โ no if-elif chains to touch.
Step 1. Add a ProviderSpec entry to PROVIDERS in neobot/providers/registry.py:
ProviderSpec(
name="myprovider", # config field name
keywords=("myprovider", "mymodel"), # model-name keywords for auto-matching
env_key="MYPROVIDER_API_KEY", # env var for LiteLLM
display_name="My Provider", # shown in `neobot status`
litellm_prefix="myprovider", # auto-prefix: model โ myprovider/model
skip_prefixes=("myprovider/",), # don't double-prefix
)
Step 2. Add a field to ProvidersConfig in neobot/config/schema.py:
class ProvidersConfig(BaseModel):
...
myprovider: ProviderConfig = ProviderConfig()
That's it! Environment variables, model prefixing, config matching, and neobot status display will all work automatically.
Common ProviderSpec options:
| Field | Description | Example |
|---|---|---|
litellm_prefix |
Auto-prefix model names for LiteLLM | "dashscope" โ dashscope/qwen-max |
skip_prefixes |
Don't prefix if model already starts with these | ("dashscope/", "openrouter/") |
env_extras |
Additional env vars to set | (("ZHIPUAI_API_KEY", "{api_key}"),) |
model_overrides |
Per-model parameter overrides | (("kimi-k2.5", {"temperature": 1.0}),) |
is_gateway |
Can route any model (like OpenRouter) | True |
detect_by_key_prefix |
Detect gateway by API key prefix | "sk-or-" |
detect_by_base_keyword |
Detect gateway by API base URL | "openrouter" |
strip_model_prefix |
Strip existing prefix before re-prefixing | True (for AiHubMix) |
MCP (Model Context Protocol)
[!TIP] The config format is compatible with Claude Desktop / Cursor. You can copy MCP server configs directly from any MCP server's README.
neobot supports MCP โ connect external tool servers and use them as native agent tools.
Add MCP servers to your config.json:
{
"tools": {
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/dir"]
},
"my-remote-mcp": {
"url": "https://example.com/mcp/",
"headers": {
"Authorization": "Bearer xxxxx"
}
}
}
}
}
Two transport modes are supported:
| Mode | Config | Example |
|---|---|---|
| Stdio | command + args |
Local process via npx / uvx |
| HTTP | url + headers (optional) |
Remote endpoint (https://mcp.example.com/sse) |
Use toolTimeout to override the default 30s per-call timeout for slow servers:
{
"tools": {
"mcpServers": {
"my-slow-server": {
"url": "https://example.com/mcp/",
"toolTimeout": 120
}
}
}
}
MCP tools are automatically discovered and registered on startup. The LLM can use them alongside built-in tools โ no extra configuration needed.
Security
[!TIP] For production deployments, set
"restrictToWorkspace": truein your config to sandbox the agent. Inv0.1.4.post3and earlier, an emptyallowFromallowed all senders. Sincev0.1.4.post4, emptyallowFromdenies all access by default. To allow all senders, set"allowFrom": ["*"].
| Option | Default | Description |
|---|---|---|
tools.restrictToWorkspace |
false |
When true, restricts all agent tools (shell, file read/write/edit, list) to the workspace directory. Prevents path traversal and out-of-scope access. |
tools.exec.pathAppend |
"" |
Extra directories to append to PATH when running shell commands (e.g. /usr/sbin for ufw). |
channels.*.allowFrom |
[] (deny all) |
Whitelist of user IDs. Empty denies all; use ["*"] to allow everyone. |
๐งฉ Multiple Instances
Run multiple neobot instances simultaneously with separate configs and runtime data. Use --config as the main entrypoint, and optionally use --workspace to override the workspace for a specific run.
Quick Start
# Instance A - Telegram bot
neobot gateway --config ~/.neobot-telegram/config.json
# Instance B - Discord bot
neobot gateway --config ~/.neobot-discord/config.json
# Instance C - Feishu bot with custom port
neobot gateway --config ~/.neobot-feishu/config.json --port 18792
Path Resolution
When using --config, neobot derives its runtime data directory from the config file location. The workspace still comes from agents.defaults.workspace unless you override it with --workspace.
To open a CLI session against one of these instances locally:
neobot agent -c ~/.neobot-telegram/config.json -m "Hello from Telegram instance"
neobot agent -c ~/.neobot-discord/config.json -m "Hello from Discord instance"
# Optional one-off workspace override
neobot agent -c ~/.neobot-telegram/config.json -w /tmp/neobot-telegram-test
neobot agentstarts a local CLI agent using the selected workspace/config. It does not attach to or proxy through an already runningneobot gatewayprocess.
| Component | Resolved From | Example |
|---|---|---|
| Config | --config path |
~/.neobot-A/config.json |
| Workspace | --workspace or config |
~/.neobot-A/workspace/ |
| Cron Jobs | config directory | ~/.neobot-A/cron/ |
| Media / runtime state | config directory | ~/.neobot-A/media/ |
How It Works
--configselects which config file to load- By default, the workspace comes from
agents.defaults.workspacein that config - If you pass
--workspace, it overrides the workspace from the config file
Minimal Setup
- Copy your base config into a new instance directory.
- Set a different
agents.defaults.workspacefor that instance. - Start the instance with
--config.
Example config:
{
"agents": {
"defaults": {
"workspace": "~/.neobot-telegram/workspace",
"model": "anthropic/claude-sonnet-4-6"
}
},
"channels": {
"telegram": {
"enabled": true,
"token": "YOUR_TELEGRAM_BOT_TOKEN"
}
},
"gateway": {
"port": 18790
}
}
Start separate instances:
neobot gateway --config ~/.neobot-telegram/config.json
neobot gateway --config ~/.neobot-discord/config.json
Override workspace for one-off runs when needed:
neobot gateway --config ~/.neobot-telegram/config.json --workspace /tmp/neobot-telegram-test
Common Use Cases
- Run separate bots for Telegram, Discord, Feishu, and other platforms
- Keep testing and production instances isolated
- Use different models or providers for different teams
- Serve multiple tenants with separate configs and runtime data
Notes
- Each instance must use a different port if they run at the same time
- Use a different workspace per instance if you want isolated memory, sessions, and skills
--workspaceoverrides the workspace defined in the config file- Cron jobs and runtime media/state are derived from the config directory
๐ป CLI Reference
If you are running from this repository checkout, prefix the commands below with uv run.
| Command | Description |
|---|---|
neobot onboard |
Initialize config & workspace |
neobot agent -m "..." |
Chat with the agent |
neobot agent -w <workspace> |
Chat against a specific workspace |
neobot agent -w <workspace> -c <config> |
Chat against a specific workspace/config |
neobot agent |
Interactive chat mode |
neobot agent --no-markdown |
Show plain-text replies |
neobot agent --logs |
Show runtime logs during chat |
neobot gateway |
Start the gateway |
neobot status |
Show status |
neobot provider login openai-codex |
OAuth login for providers |
neobot channels status |
Show channel status |
Interactive mode exits: exit, quit, /exit, /quit, :q, or Ctrl+D.
Heartbeat (Periodic Tasks)
The gateway wakes up every 30 minutes and checks HEARTBEAT.md in your workspace (~/.neobot/workspace/HEARTBEAT.md). If the file has tasks, the agent executes them and delivers results to your most recently active chat channel.
Setup: edit ~/.neobot/workspace/HEARTBEAT.md (created automatically by neobot onboard):
## Periodic Tasks
- [ ] Check weather forecast and send a summary
- [ ] Scan inbox for urgent emails
The agent can also manage this file itself โ ask it to "add a periodic task" and it will update HEARTBEAT.md for you.
Note: The gateway must be running (
neobot gateway) and you must have chatted with the bot at least once so it knows which channel to deliver to.
๐ณ Docker
[!TIP] The
-v ~/.neobot:/root/.neobotflag mounts your local config directory into the container, so your config and workspace persist across container restarts.
Docker Compose
docker compose run --rm neobot-cli onboard # first-time setup
vim ~/.neobot/config.json # add API keys
docker compose up -d neobot-gateway # start gateway
docker compose run --rm neobot-cli agent -m "Hello!" # run CLI
docker compose logs -f neobot-gateway # view logs
docker compose down # stop
Docker
# Build the image
docker build -t neobot .
# Initialize config (first time only)
docker run -v ~/.neobot:/root/.neobot --rm neobot onboard
# Edit config on host to add API keys
vim ~/.neobot/config.json
# Run gateway (connects to enabled channels, e.g. Telegram/Discord/Mochat)
docker run -v ~/.neobot:/root/.neobot -p 18790:18790 neobot gateway
# Or run a single command
docker run -v ~/.neobot:/root/.neobot --rm neobot agent -m "Hello!"
docker run -v ~/.neobot:/root/.neobot --rm neobot status
๐ง Linux Service
Run the gateway as a systemd user service so it starts automatically and restarts on failure.
1. Find the neobot binary path:
which neobot # e.g. /home/user/.local/bin/neobot
2. Create the service file at ~/.config/systemd/user/neobot-gateway.service (replace ExecStart path if needed):
[Unit]
Description=Nanobot Gateway
After=network.target
[Service]
Type=simple
ExecStart=%h/.local/bin/neobot gateway
Restart=always
RestartSec=10
NoNewPrivileges=yes
ProtectSystem=strict
ReadWritePaths=%h
[Install]
WantedBy=default.target
3. Enable and start:
systemctl --user daemon-reload
systemctl --user enable --now neobot-gateway
Common operations:
systemctl --user status neobot-gateway # check status
systemctl --user restart neobot-gateway # restart after config changes
journalctl --user -u neobot-gateway -f # follow logs
If you edit the .service file itself, run systemctl --user daemon-reload before restarting.
Note: User services only run while you are logged in. To keep the gateway running after logout, enable lingering:
loginctl enable-linger $USER
๐ Project Structure
neobot/
โโโ agent/ # ๐ง Core agent logic
โ โโโ loop.py # Agent loop (LLM โ tool execution)
โ โโโ context.py # Prompt builder
โ โโโ memory.py # Persistent memory
โ โโโ skills.py # Skills loader
โ โโโ subagent.py # Background task execution
โ โโโ tools/ # Built-in tools (incl. spawn)
โโโ skills/ # ๐ฏ Bundled skills (github, weather, tmux...)
โโโ channels/ # ๐ฑ Chat channel integrations
โโโ bus/ # ๐ Message routing
โโโ cron/ # โฐ Scheduled tasks
โโโ heartbeat/ # ๐ Proactive wake-up
โโโ providers/ # ๐ค LLM providers (OpenRouter, etc.)
โโโ session/ # ๐ฌ Conversation sessions
โโโ config/ # โ๏ธ Configuration
โโโ cli/ # ๐ฅ๏ธ Commands
๐ค Contribute & Roadmap
PRs welcome! The codebase is intentionally small and readable. ๐ค
Roadmap โ Pick an item and open a PR!
- Multi-modal โ See and hear (images, voice, video)
- Long-term memory โ Never forget important context
- Better reasoning โ Multi-step planning and reflection
- More integrations โ Calendar and more
- Self-improvement โ Learn from feedback and mistakes
Contributors
โญ Star History
Thanks for visiting โจ neobot!
neobot is for educational, research, and technical exchange purposes only
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file neobot_ai-0.1.4.post4.tar.gz.
File metadata
- Download URL: neobot_ai-0.1.4.post4.tar.gz
- Upload date:
- Size: 152.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f45fffb5cbe33bfa3fceff7e33214e22bdae6d89b16eb93c96298e42d1caf7de
|
|
| MD5 |
99bdd3e64289d85c0ade1f11ef76df2f
|
|
| BLAKE2b-256 |
7b73c57c7f10d7abf127c35f840c6b0ed08e95673d4e31a9fdc3e61f8130e894
|
File details
Details for the file neobot_ai-0.1.4.post4-py3-none-any.whl.
File metadata
- Download URL: neobot_ai-0.1.4.post4-py3-none-any.whl
- Upload date:
- Size: 172.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
75ddb6988e55f3c39077b08ecc868809196ea3a140b63ddc2d9cb992a7077da1
|
|
| MD5 |
e7d9c05dfe11989b4211ab432bb35968
|
|
| BLAKE2b-256 |
2154e8b320cf458a974cf5746ac0e21f54108e7b59565906d5818a309e392c1b
|