A personal AI agent you own β in pure Python.
pip install and talk to it from your terminal, a web dashboard, or Telegram /
Discord / WhatsApp.
It remembers what matters, learns new skills on demand, and runs tasks on a schedule.
The Python reimagining of OpenClaw β no Node.js, no Rust, no C extensions. Just Python.
QuickΒ Start Β· LocalΒ withΒ Ollama Β· Docker Β· Providers Β· Skills Β· Config Β· Library
- π Pure Python, zero build step β one
pip install, no Node/Rust/C toolchain. Import it as a library, not just a CLI. - π Any model, or none β DeepSeek, Claude, Gemini, Kimi, GLMβ¦ or 100% local with Ollama: no API key, nothing leaves your machine.
- π‘ One agent, everywhere β the same brain answers from your CLI, a browser dashboard, and group chats, each with isolated memory.
- π§© It grows itself β pulls from a 13K-skill marketplace, and can write and install a brand-new skill at runtime when none fits.
pip install pythonclaw
pythonclaw onboard # pick a provider, paste an API key (or choose Ollama β no key)
pythonclaw start # daemon + web dashboard at http://localhost:7788
pythonclaw chat # or just chat in the terminalPrefer to stay fully offline? One line, no key:
LLM_PROVIDER=ollama pythonclaw chat # needs a local Ollama runningInstall from source
git clone https://github.com/ericwang915/PythonClaw.git
cd PythonClaw
pip install -e .
pythonclaw onboard| Feature | Details | |
|---|---|---|
| π§ | Provider-agnostic | DeepSeek, Grok, Claude, Gemini, Kimi, GLM, Ollama (100% local) β or any OpenAI-compatible API |
| π οΈ | Self-extending skills | Three-tier progressive loading (metadata β instructions β resources) + a 13K-skill ClawHub marketplace, and the agent can author its own |
| πΎ | Persistent memory | Plain-Markdown long-term memory with daily logs and semantic recall β grep-able, backup-able, no database |
| π | Hybrid RAG | BM25 + dense embeddings + RRF fusion + LLM re-ranking over your own docs |
| π | Web dashboard | Browser UI for chat, config, skill catalog, identity editing, and marketplace |
| ποΈ | Voice input | Speech-to-text via Deepgram, or fully local with Whisper (stt.provider: "whisper") |
| β° | Cron jobs | Schedule tasks in config, or let the agent schedule its own and message you |
| π‘ | Multi-channel | CLI, Web, Telegram, Discord, WhatsApp β one agent behind every front-end |
Under the hood β reliability & context engineering
| π | Daemon mode | PID-managed background process with start / stop / status |
| 𧬠| Soul + Persona | Separate the agent's core identity from its swappable role presentation |
| π§ | TOOLS.md | Your local environment notes (SSH hosts, paths, defaults) β kept apart from shareable skills |
| π | Per-group isolation | Each chat session can get its own memory, persona, and soul |
| π | Context engineering | Tool-output truncation with paged spill-over files, turn-integrity pruning, pair-safe compaction with pre-flush to memory |
| β‘ | Parallel by default | Batched parallel tool calls, multi_search fan-out, non-blocking tool timeouts |
| π | Loop breaker | Repeated identical tool calls are short-circuited so the agent can't burn rounds retrying itself |
| π | Concurrency control | Per-session locks + a global semaphore prevent history interleaving |
| π‘οΈ | Hardened | Zip-slip-safe skill installs, TLS-verified downloads, path-traversal guards, atomic persistence, loopback-only dashboard by default |
| Command | Description |
|---|---|
pythonclaw onboard |
Interactive setup wizard β choose LLM provider, enter API key |
pythonclaw start |
Start the agent as a background daemon |
pythonclaw start -f |
Start in foreground (no daemonize) |
pythonclaw start --channels telegram discord whatsapp |
Start with messaging channels |
pythonclaw stop |
Stop the running daemon |
pythonclaw status |
Show daemon status (PID, uptime, port) |
pythonclaw chat |
Interactive CLI chat (foreground REPL) |
pythonclaw skill search <query> |
Search skills on ClawHub |
pythonclaw skill browse |
Browse top-rated skills |
pythonclaw skill install <id> |
Install a community skill |
pythonclaw skill info <id> |
View skill details |
$ pythonclaw start
ββββββββββββββββββββββββββββββββββββββββ
β PythonClaw β Setup Wizard β
ββββββββββββββββββββββββββββββββββββββββ
Choose your LLM provider:
1. DeepSeek
2. Grok (xAI)
3. Claude (Anthropic)
4. Gemini (Google)
5. Kimi (Moonshot)
6. GLM (Zhipu / ChatGLM)
7. Ollama (100% local β no API key)
Enter number (1-7): 1
β DeepSeek
API Key: ********
β Key set (sk-****)
Validating... β Valid!
β Setup complete!
[PythonClaw] Daemon started (PID 12345).
[PythonClaw] Dashboard: http://localhost:7788
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β PythonClaw β
ββββββββββββ¬βββββββββββββ¬ββββββββββββ¬βββββββββββββββββββββββββββ€
β CLI β Daemon β Sessions β Core β
β β β β β
β onboard β start / β Store(MD) β Agent β
β chat β stop / β Manager β ββ Memory (Markdown) β
β skill β¦ β status β Locks + β ββ RAG (Hybrid) β
β β β Semaphore β ββ Skills (3-tier) β
β Web UI βββ€ Channels β β ββ Compaction β
β Voice In β Telegram β Per-group β ββ Soul + Persona β
β β Discord β Isolation β ββ Group Context β
β β WhatsApp β β ββ Tool Execution β
ββββββββββββ΄βββββββββββββ΄ββββββββββββ΄βββββββββββββββββββββββββββ€
β LLM Provider Abstraction Layer β
β DeepSeek β Grok β Claude β Gemini β Kimi β GLM β Ollama β β¦ β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β ClawHub Marketplace (clawhub.com) β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Start with pythonclaw start and open http://localhost:7788.
- Dashboard β agent status, soul/persona preview, tool list
- Chat β real-time chat with voice input (Deepgram)
- Skill Catalog β browse installed skills by category
- Marketplace β search and install skills from ClawHub
- Configuration β edit LLM provider, API keys, and settings in-browser
All configuration lives in pythonclaw.json (auto-created by pythonclaw onboard).
See pythonclaw.example.json for the full template.
Environment variables (e.g. DEEPSEEK_API_KEY, TAVILY_API_KEY, LLM_PROVIDER) override JSON values.
Security: the dashboard has full agent access, so
web.hostdefaults to127.0.0.1(loopback only). Expose it deliberately β setweb.hostto0.0.0.0(orPYTHONCLAW_WEB_HOST=0.0.0.0in containers) only behind your own auth/tunnel.
| Provider | llm.provider |
Default Model | API key |
|---|---|---|---|
| DeepSeek | deepseek |
deepseek-chat |
DEEPSEEK_API_KEY |
| Grok (xAI) | grok |
grok-3 |
GROK_API_KEY |
| Claude (Anthropic) | claude |
claude-sonnet-4-20250514 |
ANTHROPIC_API_KEY (or claude setup-token) |
| Gemini (Google) | gemini |
gemini-2.0-flash |
GEMINI_API_KEY |
| Kimi (Moonshot) | kimi |
moonshot-v1-128k |
KIMI_API_KEY |
| GLM (Zhipu) | glm |
glm-4-flash |
GLM_API_KEY |
| Ollama (local) π | ollama |
llama3.1 |
none β 100% local |
| Any OpenAI-compatible π | custom |
gpt-4o-mini |
OPENAI_API_KEY |
custom works with OpenAI, OpenRouter, LM Studio, vLLM, llama.cpp server β anything speaking the chat-completions protocol (set llm.custom.baseUrl).
No API key, no cloud, your data never leaves the machine:
ollama pull llama3.1 # or qwen3, mistral, β¦
pip install pythonclaw
LLM_PROVIDER=ollama pythonclaw chat # CLI
LLM_PROVIDER=ollama pythonclaw start # daemon + web dashboardPick a different model with OLLAMA_MODEL=qwen3, or point at a remote Ollama with OLLAMA_BASE_URL=http://gpu-box:11434/v1.
Not every error containing the word timeout is an API/network timeout. A common
case: a script the agent generated (or a downloaded skill) calls
subprocess.Popen(cmd, timeout=N) β Popen has no timeout parameter, so Python
raises TypeError: Popen.__init__() got an unexpected keyword argument 'timeout'.
Your API key and connection are fine; the script just needs
subprocess.run(cmd, timeout=N) instead. PythonClaw now detects this and attaches
a hint to the tool output so the agent fixes the script on the next round.
If you hit a real network timeout (request hangs ~300 s, error mentions your
provider host), check llm.<provider>.baseUrl β a missing /v1 suffix is the
most common cause β and verify the endpoint answers curl $BASEURL/models.
docker run -p 7788:7788 \
-e LLM_PROVIDER=deepseek -e DEEPSEEK_API_KEY=sk-... \
-v pythonclaw-data:/root/.pythonclaw \
$(docker build -q .)Or with compose (edit the environment block / use a .env file):
git clone https://github.com/ericwang915/PythonClaw.git && cd PythonClaw
docker compose up -dFully local stack: run Ollama on the host and set LLM_PROVIDER=ollama β the compose file already routes host.docker.internal for you.
| Level | Loaded When | Content |
|---|---|---|
| L1 β Metadata | Always (startup) | name + description from YAML frontmatter |
| L2 β Instructions | Agent activates skill | Full SKILL.md body |
| L3 β Resources | As needed | Bundled scripts, schemas, data files |
---
name: code_runner
description: Execute Python code safely in an isolated subprocess.
---
# Code Runner
## Instructions
Run `python {skill_path}/run_code.py "expression"`Browse and install 13,000+ community skills from ClawHub β free, no API key required:
pythonclaw skill search "database backup"
pythonclaw skill install <skill-id>Also accessible from the web dashboard Marketplace tab.
~/.pythonclaw/context/memory/
βββ MEMORY.md # Curated long-term memory
βββ 2026-02-23.md # Daily append-only log
When per-group isolation is enabled ("isolation": { "perGroup": true } in config),
each session (Telegram chat, Discord channel, etc.) gets its own memory/, persona/,
and soul/ under ~/.pythonclaw/context/groups/<session-id>/, while global memories
remain accessible via read-through fallback.
~/.pythonclaw/context/tools/
βββ TOOLS.md # Your environment-specific cheat sheet
Skills define how tools work. TOOLS.md stores your specifics β SSH hosts, device
nicknames, project paths, preferred defaults, API endpoints. Keeping them apart means
you can update skills without losing your notes, and share skills without leaking your
infrastructure. Editable from the web dashboard.
Query β BM25 (sparse) + Embeddings (dense) β RRF Fusion β LLM Re-ranker β Top-K
from pythonclaw import Agent
from pythonclaw.core.llm.openai_compatible import OpenAICompatibleProvider
provider = OpenAICompatibleProvider(
api_key="sk-...",
base_url="https://api.deepseek.com/v1",
model_name="deepseek-chat",
)
agent = Agent(provider=provider)
print(agent.chat("What is the capital of France?"))PythonClaw/
βββ pythonclaw/
β βββ main.py # CLI entry (onboard/start/stop/status/chat/skill)
β βββ onboard.py # Interactive setup wizard
β βββ daemon.py # PID-based daemon lifecycle
β βββ server.py # Multi-channel daemon server
β βββ core/
β β βββ agent.py # Core reasoning loop
β β βββ tools.py # Tool schemas and execution
β β βββ skill_loader.py # Three-tier skill system
β β βββ skillhub.py # ClawHub marketplace client
β β βββ persistent_agent.py
β β βββ compaction.py # Context compaction
β β βββ llm/ # Provider adapters
β β βββ memory/ # Markdown memory
β β βββ knowledge/ # Knowledge-base RAG
β β βββ retrieval/ # BM25 + dense + fusion + reranker
β βββ channels/ # Telegram, Discord, WhatsApp
β βββ scheduler/ # Cron jobs, heartbeat
β βββ web/ # FastAPI dashboard + static assets
β βββ templates/ # Built-in skill templates
βββ context/ # Runtime data (gitignored)
βββ pyproject.toml
βββ pythonclaw.example.json # Configuration template
βββ LICENSE
git clone https://github.com/ericwang915/PythonClaw.git
cd PythonClaw
python -m venv .venv && source .venv/bin/activate
pip install -e .
pytest tests/ -vWe welcome contributions! See CONTRIBUTING.md for guidelines.
| Feature | OpenClaw | PythonClaw |
|---|---|---|
| Language | TypeScript / Node.js | Python |
| Install | npm i -g openclaw |
pip install pythonclaw |
| CLI | openclaw start/stop |
pythonclaw start/stop/status |
| Dashboard | Web UI | Web UI (localhost:7788) |
| Memory | Markdown | Markdown (long-term + daily) |
| Skills | Plugin system | Three-tier + ClawHub marketplace |
| Channels | Discord, Telegram, WhatsApp | CLI, Web, Telegram, Discord, WhatsApp |
| Voice | β | Deepgram STT + local Whisper |
| LLM Providers | OpenAI, Anthropic, Gemini | DeepSeek, Grok, Claude, Gemini, Kimi, GLM + any OpenAI-compatible |
| Run fully local | β | Yes β Ollama, no API key |
| Deploy | npm | pip Β· Docker Β· docker-compose |
| Daemon | Background process | PID-managed (start/stop/status) |
If PythonClaw helps you, consider giving it a β
Made by the team behind Audiee.ai β private AI meeting notes for Mac that hand your meetings to agents like Claude Code and Cursor as MCP tools.

{ "llm": { "provider": "grok", "grok": { "apiKey": "xai-...", "model": "grok-3" } }, "tavily": { "apiKey": "" }, "deepgram": { "apiKey": "" }, "web": { "host": "127.0.0.1", "port": 7788 }, "channels": { "telegram": { "token": "" }, "discord": { "token": "" }, "whatsapp": { "phoneNumberId": "", "token": "", "verifyToken": "pythonclaw_verify" } }, "isolation": { "perGroup": false }, "concurrency": { "maxAgents": 4 } }