Skip to main content

A lightweight personal AI assistant framework

Project description

ShibaClaw

ShibaClaw 🐕

Security-first AI agent with built-in WebUI, native provider support, and hardened tools.

version PyPI Downloads python license Ask DeepWiki Discord


ShibaClaw is a security-first AI agent that runs in your terminal or in a browser-based WebUI. Instead of assuming the surrounding app will handle safety, it builds it into the core: install-time CVE auditing, randomized tool-output wrapping against prompt injection, SSRF and DNS rebinding protection, shell hardening, workspace sandboxing, and token auth. You still get the practical pieces you need for daily use: WebUI & onboarding, 22 LLM providers, built-in file tools, long-term memory, 11 chat channels, cron, heartbeat, skills, and MCP support.

Security, Built In

These are the defenses that are often left to app glue code or external proxies. In ShibaClaw they are part of the framework itself.

Layer Built in by default Why it matters
Distributed Engine Decoupled UI (128MB RAM) from Brain (256MB+ RAM) High performance even on low-spec hardware or VPS
Install-time audit Audits pip and npm installs before execution; blocks critical/high CVEs Catches risky dependencies before they land in the environment
Prompt-injection wrapping Wraps every tool result in a randomized <tool_output_...> boundary and sanitizes closing tags Untrusted pages and files stay data, not instructions
Shell hardening 20+ deny patterns, escape normalization (\x.., \u....), internal URL detection Blocks common destructive or obfuscated commands
Network guard SSRF filtering, redirect revalidation, DNS-rebinding-safe resolution Prevents web tools from pivoting into localhost or private networks
Workspace sandbox File tools and the WebUI file browser stay inside the configured workspace Reduces traversal and accidental host-wide access
Access control Bearer token auth, constant-time token checks, channel allowlists, optional sender rate limiting Safer when the agent is exposed beyond a local shell

Quick Start

Docker

git clone https://github.com/RikyZ90/ShibaClaw.git && cd ShibaClaw
docker compose up -d --build
docker exec -it shibaclaw-gateway shibaclaw print-token

Open http://localhost:3000 — paste the token if auth is enabled, then complete the onboard wizard in the browser.

pip

pip install shibaclaw
# Simple start (default localhost:3000)
shibaclaw web --with-gateway

# Custom local port
shibaclaw web --host 127.0.0.1 --port 3000 --with-gateway

Open http://localhost:3000 and complete the onboard wizard. The --with-gateway flag automatically starts the agent engine in the background for you. Prefer the terminal? shibaclaw onboard runs the same guided setup from the CLI.


WebUI

Settings WebUI Welcome Screen   WebUI Chat with Agent

The WebUI is built-in — no separate frontend or Node.js required.

  • Chat — multi-session conversations with live streaming of tool calls, thinking blocks, and elapsed time
  • Agent Profiles — switch personas per session (Hacker, Builder, Planner, Reviewer) with dynamic avatars
  • File browser — browse, view, and edit workspace files in-browser (sandboxed to workspace)
  • Voice — speech-to-text via OpenAI-compatible audio APIs and browser-native TTS
  • Settings — configure agent, provider, tools, MCP servers, channels, skills, and OAuth from a single panel
  • Onboard wizard — guided first-time setup: pick a provider, enter API key or start OAuth, choose a model
  • Context viewer — inspect the full system prompt and token usage breakdown
  • Gateway monitor — health check and one-click restart
  • Auto-update — checks GitHub releases every 12h, notifies in the UI and on all active channels
  • Responsive — works on desktop and mobile

Agent Profiles

Agent Profile Selector

Switch the agent's personality on-the-fly without losing context. Each profile overrides the system prompt (SOUL.md) while keeping model, memory, and tools shared. Profiles are per-session — run a security audit in one tab and plan architecture in another.

Built-in profiles: Default · Builder · Planner · Reviewer · Hacker (elite security expert with 50+ tool recommendations, OWASP/MITRE/NIST methodologies, CVSS scoring, and a custom cyber-shiba avatar).

Create your own profiles interactively — the agent walks you through defining the persona and saves everything automatically.


Features

Memory & Workflow

  • Three-level memoryUSER.md (personal profile), MEMORY.md (operational facts), HISTORY.md (timestamped session archive with TF-IDF + recency search)
  • Proactive learning — every N messages the agent silently consolidates new learnings into memory, without interrupting the conversation
  • Focused background delegation — the spawn tool can offload a specific task and report back into the same session when done
  • Advanced reasoning — supports extended thinking (Anthropic), reasoning effort (OpenAI o-series), and DeepSeek-R1 chains

Tools

Tool What it does
exec Shell commands with 20+ deny-pattern guards, encoding normalization, and CVE scanning
read_file / write_file / edit_file Paginated reads, fuzzy find-and-replace, auto-created parent dirs
web_search Brave, Tavily, SearXNG, Jina, or DuckDuckGo (fallback, no key needed)
web_fetch HTTP fetch with SSRF protection, DNS rebinding defense, and redirect validation
memory_search Ranked search over session history (TF-IDF + recency + importance scoring)
message Cross-channel messaging with media attachments
cron Schedule one-time or recurring jobs (cron expressions, intervals, ISO dates, timezone-aware)
spawn Optional background worker for a focused task; reports back to the main session when done
MCP Connect any MCP server (stdio, SSE, or streamable HTTP) — tools auto-registered as mcp_<server>_<tool>

Channels

Telegram · Discord · Slack · WhatsApp · Matrix · Email · DingTalk · Feishu · QQ · WeCom · MoChat

All channels route through the same message bus. WhatsApp uses a Node.js bridge (Baileys) for QR-based linking.

Skills

8 built-in skills (GitHub, weather, summarize, tmux, cron reference, memory guide, skill-creator, ClawHub browser). Skills are Markdown files with YAML frontmatter and optional scripts — create your own or install from ClawHub. Pin frequently-used skills to load them on every conversation.

Automation

  • Cron service — persistent, timezone-aware scheduled jobs stored in jobs.json. Supports every, cron, and at schedules. Overdue jobs fire on startup.
  • Heartbeat — periodic wake-up reads HEARTBEAT.md, uses its frontmatter for session/profile/targets, keeps enable/interval in global settings, skips the LLM entirely when Active Tasks is empty, and only asks the model to decide when real active work exists.

If you are upgrading from an older release, it is recommended to reset your workspace HEARTBEAT.md once so you get the new frontmatter-based base template. Existing files still work, but they will not gain the new editable settings block automatically.


Security Policy

The table above is the operational summary. The full disclosure process, supported versions, and defense-in-depth notes live in SECURITY.md.


Supported Providers

ShibaClaw uses native SDKs (no LiteLLM proxy) and auto-detects the right provider from the model name.

API Key

Provider Env Variable
OpenAI OPENAI_API_KEY
Anthropic ANTHROPIC_API_KEY
DeepSeek DEEPSEEK_API_KEY
Google Gemini GEMINI_API_KEY
Groq GROQ_API_KEY
Moonshot MOONSHOT_API_KEY
MiniMax MINIMAX_API_KEY
Zhipu AI ZAI_API_KEY
DashScope DASHSCOPE_API_KEY

Gateway / Proxy

OpenRouter · AiHubMix · SiliconFlow · VolcEngine · BytePlus — auto-detected by key prefix or api_base.

Local

Ollama (http://localhost:11434) · vLLM · any OpenAI-compatible endpoint.

OAuth

Provider Flow Setup
GitHub Copilot Device flow, auto token refresh shibaclaw provider login github-copilot or WebUI Settings
OpenAI Codex PKCE browser flow shibaclaw provider login openai-codex or WebUI Settings

Architecture

ShibaClaw Architecture

Docker Compose

Service Role Default Port
shibaclaw-gateway Core agent loop, message bus, channel integrations 19999
shibaclaw-web WebUI (Starlette + Socket.IO), cron service 3000

Both share the ~/.shibaclaw/ volume (config, workspace, memory, cron jobs, media cache).

Single-process mode

shibaclaw web runs agent + WebUI + cron in a single process — no gateway container needed.

Stack

Layer Technology
Server Uvicorn → Starlette (ASGI) + python-socketio
Real-time Socket.IO (WebSocket primary, polling fallback)
Frontend Vanilla JS · Marked.js · Highlight.js
Sessions JSONL append-only per session (cache-friendly for LLM prompt prefixes)

Resource usage

Component Idle Peak (install/compile)
Gateway ~120 MB ~350 MB
WebUI ~120 MB ~350 MB

Docker Compose sets a 512 MB limit / 256 MB reservation per container. Tool output is streamed with bounded buffers, so long-running commands (apt, npm install) can't blow up memory.

CLI Reference

shibaclaw web               # Start WebUI (agent + cron in-process)
shibaclaw gateway            # Start gateway only (for Docker split)
shibaclaw onboard            # CLI-based first-time setup wizard
shibaclaw agent -m "Hello"   # One-shot message via terminal
shibaclaw agent              # Interactive REPL with history
shibaclaw status             # Provider, workspace, OAuth health check
shibaclaw print-token        # Show WebUI auth token
shibaclaw channels status    # List enabled channels
shibaclaw provider login <p> # OAuth login (github-copilot, openai-codex)

Latest — v0.0.28

  • Heartbeat frontmatter config — configure session, profile, interval, and output targets directly in HEARTBEAT.md
  • No-op heartbeat optimization — no LLM call when Active Tasks is empty
  • Cron blank-job guard — empty scheduled agent jobs are skipped instead of waking the model

v0.0.28: full details and upgrade notes, including the recommended HEARTBEAT.md reset

→ Full history in CHANGELOG.md


Troubleshooting

Problem Try
General status check shibaclaw status
Container logs docker logs shibaclaw-gateway / docker logs shibaclaw-web
WebUI won't connect Check token with shibaclaw print-token, verify port binding
Provider errors shibaclaw status shows API key and OAuth state
Security policy SECURITY.md

Contributing

See CONTRIBUTING.md — PRs welcome.

Channels are extensible via Python entry points (shibaclaw.integrations). Skill creation is documented in docs/CHANNEL_PLUGIN_GUIDE.md and the built-in skill-creator skill.


Credits

Inspired by NanoBot by HKUDS — MIT License.


If you like ShibaClaw and want to help it grow:
Drop a star — 🐛 Open an issue — 🔧 Send a PR
contributions of any size are welcome

💬 Join the Discord — questions, feedback, and show & tell


We're new — come help shape what ShibaClaw becomes.
Join us on Discord and let's build something together.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

shibaclaw-0.0.37.tar.gz (1.9 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

shibaclaw-0.0.37-py3-none-any.whl (2.0 MB view details)

Uploaded Python 3

File details

Details for the file shibaclaw-0.0.37.tar.gz.

File metadata

  • Download URL: shibaclaw-0.0.37.tar.gz
  • Upload date:
  • Size: 1.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for shibaclaw-0.0.37.tar.gz
Algorithm Hash digest
SHA256 dc637a4a26ef067dcba9a5a50c57cf62cd0eb6aa36778f6f1840713ce496e766
MD5 185a4a6325a1f3ffd8c350f6802f159b
BLAKE2b-256 1651fef89ea0b59f33f1312d57889cd8e79bda98142f668259aa3da46ae3a224

See more details on using hashes here.

Provenance

The following attestation bundles were made for shibaclaw-0.0.37.tar.gz:

Publisher: publish.yml on RikyZ90/ShibaClaw

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file shibaclaw-0.0.37-py3-none-any.whl.

File metadata

  • Download URL: shibaclaw-0.0.37-py3-none-any.whl
  • Upload date:
  • Size: 2.0 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for shibaclaw-0.0.37-py3-none-any.whl
Algorithm Hash digest
SHA256 8a72de4dec765df3fd5721f9f6e6ec5ee697be6f6b1aec7cb8c4f39f9cd7b0da
MD5 b91df53aaf3b720dc115618628e454e3
BLAKE2b-256 6d913d5aaf9920cf54bd9603f8cfaa74018da9a1a69b17dca133b490652b6692

See more details on using hashes here.

Provenance

The following attestation bundles were made for shibaclaw-0.0.37-py3-none-any.whl:

Publisher: publish.yml on RikyZ90/ShibaClaw

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page