DeepSeek Bot: self-evolving AI agent runtime — RSI under tiered authority, reversible ledger, capability security, crash-contained plugins
pip install deepseek-bot Copy PIP instructions
A self-evolving AI agent runtime with a reversible, crash-recoverable core.
DeepSeek Bot is an AI agent that answers on your chat channels, turns experience into reusable skills, and treats every change it makes to itself as an auditable, revertible ledger entry — so autonomy never costs you control.
Most agent frameworks optimize for the demo. DeepSeek Bot optimizes for the other 11 months: what happens when the agent modifies its own state, a plugin crashes at 3 a.m., a tool misbehaves, or you simply want yesterday back. The architecture is built around that, from the kernel up:
┌──────────────────────────────────────────────────────────┐ │ L3 Meta-improvement (RSI spark) │ │ reflector · optimizer · R-level gates · shadow verify │ ├──────────────────────────────────────────────────────────┤ │ L2 Experience assets │ │ skill library (version tree) · memory · curation │ ├──────────────────────────────────────────────────────────┤ │ L1 Execution │ │ agent loop · trace recorder · parallel sessions │ ├──────────────────────────────────────────────────────────┤ │ L0.5 Access plane │ │ channels · session routing · lane queues · trust │ ├──────────────────────────────────────────────────────────┤ │ L0 Composable kernel │ │ Context · reversible effects · coeffects · ledger │ └──────────────────────────────────────────────────────────┘ Key invariants enforced by the kernel (each backed by tests):
The architectural DNA of this project — spatiotemporal composability (reversible effects as the time axis, reactive coeffects as the space axis), everything-is-a-plugin, every plugin inspectable and replaceable — comes from the Cordis programming paradigm (A Programming Paradigm for Spatiotemporal Composability), as pioneered in production by DeepSeek Harness (dsh), the open-source agent harness by DeepSeek AI.
DeepSeek Bot is an independent Python-route descendant of that philosophy, applied to a self-evolving personal agent: no shared code with dsh (TypeScript), not a fork, and not affiliated with DeepSeek or the deepseek-ai organization. Where dsh is a general agent harness, DeepSeek Bot bets the same composability discipline on one scenario — a personal agent that runs for months, remembers with crypto-forgetting, schedules, promotes its own skills, and anchors its safety rules in a tamper-evident ledger.
The first-class model adapter is DeepSeek (the project grew up debugging reasoning-model discipline against deepseek APIs), and the name pays the debt: a DeepSeek bot, built the dsh way.
The authoritative design baseline lives in docs/design/ (frozen, R3-graded; changes go through RFC). Research notes are in docs/research/.
git clone https://github.com/vicfei/deepseek-bot.git cd deepseek-bot python3 -m venv .venv && .venv/bin/pip install -e ".[dev]" .venv/bin/pytest -q # full suite (unit + PBT + fuzz + channels) .venv/bin/ruff check src tests # lint .venv/bin/pyright src # strict type check Or install straight from git — the project is pip-packaged:
pip install git+https://github.com/vicfei/deepseek-bot.git Running the daemon (gateway on loopback + WeChat channel) additionally needs a credentials file at ~/.deepseek-bot/credentials/providers.json (0600) — see src/deepseek_bot/llm.py for the expected provider entries. (Existing ~/.naga homes keep working: the runtime falls back to them automatically.)
deepseek-bot daemon start # http://127.0.0.1:18789 — WebChat console deepseek-bot doctor # self-check Try it Once the daemon is up:
Multiple people? Yes — each person scans their own QR code and gets an independent bot identity (the platform provisions one per binding), with session, memory and trust isolated per user. Two concurrent real users have been verified in production. Note the current posture is personal / small-circle deployment: a fresh QR binding is granted owner trust on your instance, and the WebChat console is loopback-only by design — see docs/design/ for the trust model before opening an instance to strangers.
(Every line is real output from the live production daemon — running unattended since 2026-10-15.)
src/deepseek_bot/ kernel.py # L0 seed kernel (frozen baseline twin; in-place evolution follows RFCs) ledger_store.py # durable ledger: append log, Merkle seals, snapshots, CAS, SQLite projection gateway.py # WebSocket gateway: lane queues, trust policy, event visibility matrix agent.py # agent loop with tracing and skill sedimentation skills.py # version-tree skill store (content-addressed) trust.py # peer trust derivation (allowlist + channel defaults) worker.py # subprocess isolation for external-source plugins wechat.py # WeChat iLink channel: polling, typing, chunking, media, vision daemon.py cli.py # runtime host and CLI docs/design/ # frozen design baseline (4 documents + spec-constants + checker) docs/research/ # research notes and RFC material tests/ # unit, property-based, crash-fuzz, channel and integration suites Contributing Issues and pull requests are written in English (the project's working language for public artifacts; either language is fine in discussion). Changes go through issue → branch → PR → CI (ruff / pyright strict / pytest / freeze checker) → merge commit. The frozen design baseline under docs/design/ is never edited in place — propose changes via RFC (see docs/research/rfc-m2-registry-addendum.md for the format).
Both files in this release have provenance metadata.
ai-agent personal-agent self-evolving ledger wechat deepseek
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 8, 2026.
Both files in this release have been uploaded with provenance metadata.
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.




