freshcrate
Home > Frameworks > PythonClaw

PythonClaw

OpenClaw reimagined in pure Python โ€” autonomous AI agent with memory, RAG, skills, web dashboard, voice input, daemon, and multi-channel support.

Description

OpenClaw reimagined in pure Python โ€” autonomous AI agent with memory, RAG, skills, web dashboard, voice input, daemon, and multi-channel support.

README

PythonClaw

PythonClaw

OpenClaw, reimagined in pure Python โ€” purely Pythonic design.
Memory ยท RAG ยท Skills ยท Web Dashboard ยท Voice ยท Daemon ยท Multi-Channel

CI PyPI Python MIT License Stars The Python port of OpenClaw โ€” no Node.js, no Rust, no C extensions. Just Python.


Highlights

Feature Details
๐Ÿง  Provider-agnostic DeepSeek, Grok, Claude, Gemini, Kimi, GLM โ€” or any OpenAI-compatible API
๐Ÿ› ๏ธ Three-tier skills Progressive loading: metadata โ†’ instructions โ†’ resources. Community marketplace via ClawHub (13K+ free skills)
๐Ÿ’พ Persistent memory Markdown-based long-term memory with daily logs and semantic recall
๐Ÿ” Hybrid RAG BM25 + dense embeddings + RRF fusion + LLM re-ranking
๐ŸŒ Web dashboard Browser UI for chat, config, skill catalog, identity editing, and marketplace
๐ŸŽ™๏ธ Voice input Deepgram speech-to-text in the web chat
โฐ Cron jobs Schedule tasks via YAML or let the agent create its own
๐Ÿ“ก Multi-channel CLI, Web, Telegram, Discord, WhatsApp โ€” same agent, different interfaces
๐Ÿ”„ Daemon mode PID-managed background process with start / stop / status
๐Ÿงฌ Soul + Persona Separate core identity from swappable role presentation
๐Ÿ”ง TOOLS.md Local environment notes โ€” your cheat sheet for the agent
๐Ÿ”’ Per-group isolation Each chat session gets its own memory (optional)
๐Ÿ” Concurrency control Per-session locks + global semaphore prevent interleaving

Quick Start

pip install pythonclaw

# First-time setup โ€” choose your LLM provider and enter API key
pythonclaw onboard

# Start the agent daemon (web dashboard at http://localhost:7788)
pythonclaw start

# Interactive CLI chat
pythonclaw chat

# Stop the daemon
pythonclaw stop

From source:

git clone https://github.com/ericwang915/PythonClaw.git
cd PythonClaw
pip install -e .
pythonclaw onboard

CLI Reference

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

First Run

$ 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)

  Enter number (1-6): 2
  โ†’ Grok (xAI)

  API Key: ********
  โ†’ Key set (xai-****)

  Validating... โœ” Valid!
  โœ” Setup complete!

[PythonClaw] Daemon started (PID 12345).
[PythonClaw] Dashboard: http://localhost:7788

Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                         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              โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚              ClawHub Marketplace (clawhub.com)               โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Web Dashboard

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

Configuration

All configuration lives in pythonclaw.json (auto-created by pythonclaw onboard). See pythonclaw.example.json for the full template.

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

Environment variables (e.g. DEEPSEEK_API_KEY, TAVILY_API_KEY) override JSON values.


Supported LLM Providers

Provider Default Model Install Extra
DeepSeek deepseek-chat โ€”
Grok (xAI) grok-3 โ€”
Claude (Anthropic) claude-sonnet-4-20250514 โ€” (included)
Gemini (Google) gemini-2.0-flash โ€” (included)
Kimi (Moonshot) moonshot-v1-128k โ€”
GLM (Zhipu) glm-4-flash โ€”
Any OpenAI-compatible Custom โ€”

Skills

Three-Tier Progressive Loading

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"`

ClawHub Marketplace

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.


Memory & RAG

Markdown Memory

~/.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.

TOOLS.md โ€” Local Notes

~/.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.

Hybrid RAG Pipeline

Query โ†’ BM25 (sparse) + Embeddings (dense) โ†’ RRF Fusion โ†’ LLM Re-ranker โ†’ Top-K

Use as a Library

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?"))

Project Structure

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

Development

git clone https://github.com/ericwang915/PythonClaw.git
cd PythonClaw
python -m venv .venv && source .venv/bin/activate
pip install -e .
pytest tests/ -v

Contributing

We welcome contributions! See CONTRIBUTING.md for guidelines.


Comparison with OpenClaw

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
LLM Providers OpenAI, Anthropic, Gemini DeepSeek, Grok, Claude, Gemini, Kimi, GLM
Daemon Background process PID-managed (start/stop/status)

License

MIT


If PythonClaw helps you, consider giving it a โญ

Release History

VersionChangesUrgencyDate
0.0.0No release found โ€” using repo HEADLow3/8/2026
main@2026-03-08Latest activity on main branchLow3/8/2026
main@2026-03-08Latest activity on main branchLow3/8/2026
main@2026-03-08Latest activity on main branchLow3/8/2026
main@2026-03-08Latest activity on main branchLow3/8/2026
main@2026-03-08Latest activity on main branchLow3/8/2026
main@2026-03-08Latest activity on main branchLow3/8/2026
main@2026-03-08Latest activity on main branchLow3/8/2026
main@2026-03-08Latest activity on main branchLow3/8/2026
main@2026-03-08Latest activity on main branchLow3/8/2026

Dependencies & License Audit

Loading dependencies...

Similar Packages

Wee-Orchestrator๐Ÿ€ Self-hosted multi-agent AI orchestrator โ€” chat with Claude, Gemini & Copilot CLI from Telegram, WebEx, or browser. 5 runtimes, 17+ models, task scheduling, skill plugins.main@2026-04-21
awesome-lark-botsProvide open-source AI bots for Lark to automate tasks like brainstorming, project planning, content creation, and monitoring within a secure chat interface.main@2026-04-21
opentulpaSelf-hosted personal AI agent that lives in your DMs. Describe any workflow: triage Gmail, pull a Giphy feed, build a Slack bot, monitor markets. It writes the code, runs it, schedules it, and saves imain@2026-04-17
reinaAutonomous AI agent for Crustocean, powered by Hermes Agent from Nous Researchv1.0.0
benBen โ€” an autonomous digital entity that lives on Crustoceanv1.0.0