Zero-cost background coding agent with layered memory, idle-time dreaming, MCP server, and Ollama support.
Project description
๐ง DeepSleep
Your AI finally remembers you.
Watches your files. Dreams while you're away. Remembers patterns across every project you've ever touched. 100% local. No cloud. No API key. No subscription. Just memory.
The problem with every AI coding tool right now
You open Cursor. You open Claude. You open Copilot.
And every single time, you have to re-explain yourself.
"I'm working on a SaaS app, Python backend, the auth is broken, here's the context..."
You've typed that paragraph 300 times. The AI has the memory of a goldfish. And it's not just annoying โ it's actively making you slower.
Then it gets worse. Three weeks later, different project:
"I've fixed this exact JWT validation bug before. I know I have. Which repo was it in?"
You dig through 12 repos. You grep across branches. You find nothing.
That's 40 minutes gone. On a problem you already solved.
DeepSleep fixes both. Permanently.
pip install deepsleep-ai && ds init && ds dream
That's it. DeepSleep now runs in the background. It watches your files. When you go idle, it dreams โ reads what you touched, builds a summary, stores it locally. When you come back, it already knows what you were doing.
And with Neural Link (v0.2.1), it connects every project on your machine into one searchable brain.
No cloud. No tokens burned. No subscription. $0 forever.
Evolution โ From Tool to Oracle
timeline
title DeepSleep โ From Tool to Oracle
section v0.1.0 ยท April 2026
Project Memory : ds init ยท ds dream ยท ds chat
: 3-layer local memory per project
: Ollama deepseek-r1 integration
: Offline fallback ยท AES-256 encryption
section v0.2.0 ยท April 2026
MCP Server : deepsleep-mcp for Cursor ยท Claude Desktop ยท Windsurf
: 9 MCP tools ยท 8KB memory ยท 5-file context
: Windows path fix ยท Ollama UX improvements
section v0.2.1 ยท April 2026
Neural Link : Cross-project memory across entire machine
: ds link ยท ds search ยท ds neural
: SQLite FTS5 full-text search
: 5 new MCP tools ยท personal coding oracle
section v0.2.3 ยท April 2026
Cloud Fallback : Claude API + OpenAI as optional fallback
: ds set-api claude / ds set-api openai
: Ollama stays default ยท cloud only when offline
: Zero new dependencies ยท pure urllib
v0.1 โ Project Memory
"What was I working on?" โ answered in under a second, locally, for free.
flowchart TD
A([๐งโ๐ป You start coding]) --> B[ds init\nCreates .deepsleep/memory.json]
B --> C[ds dream\nBackground watcher starts]
C --> D{Watching for changes...}
D -->|Files saved| E[๐ Track in SQLite index]
D -->|5 min idle| F[๐ค Dream Cycle]
E --> D
F --> G[Read up to 5 files ยท 4000 chars]
G --> H[๐ค Ollama deepseek-r1]
H --> I[โ๏ธ Generate session summary]
I --> J[๐ง Write to memory.json ยท 8KB]
J --> K[ds > What was I doing?]
K --> L[๐ก Instant local answer]
style A fill:#1a1a2e,color:#fff,stroke:#7c3aed
style F fill:#312e81,color:#fff,stroke:#7c3aed
style H fill:#1e3a5f,color:#fff,stroke:#3b82f6
style J fill:#4a1942,color:#fff,stroke:#a855f7
style L fill:#14532d,color:#fff,stroke:#22c55e
Everything lives in one 8KB file. Three layers. Always under budget.
block-beta
columns 3
space:1
title["๐ง .deepsleep/memory.json ยท โค 8KB"]:1
space:1
project["๐ PROJECT LAYER\nโโโโโโโโโโโโโโโ\nRepo identity ยท Goals\nKey facts & decisions\nUp to 10 facts\n\n(Permanent)"]
session["๐ SESSION LAYER\nโโโโโโโโโโโโโโโ\nUp to 15 recent files\nDream summary ยท 1200 chars\nRecent tasks ยท 10 items\n\n(Updated each dream)"]
ephemeral["โก EPHEMERAL LAYER\nโโโโโโโโโโโโโโโ\nLast Q&A pair\nOpen questions ยท 8 items\n15 file change events\n\n(Per session)"]
compact["๐๏ธ Smart Compactor โ priority squeeze ยท drops low-signal first ยท preserves what matters ยท always under 8KB"]:3
style title fill:#1e1b4b,color:#c4b5fd,stroke:#7c3aed
style project fill:#14532d,color:#86efac,stroke:#22c55e
style session fill:#1e3a5f,color:#93c5fd,stroke:#3b82f6
style ephemeral fill:#4a1942,color:#f0abfc,stroke:#a855f7
style compact fill:#1a1a2e,color:#94a3b8,stroke:#475569
v0.2 โ MCP Server
Open Cursor. Your AI already knows what you were doing. You didn't have to type a single word.
This is what MCP unlocks. One JSON config block in your IDE. DeepSleep becomes a native memory layer โ Cursor, Claude Desktop, and Windsurf can query it directly through the Model Context Protocol.
flowchart LR
subgraph IDEs["๐ฅ๏ธ Your AI IDE"]
cursor["โก Cursor"]
claude["๐ค Claude Desktop"]
wind["๐ Windsurf"]
vscode["๐ป VS Code"]
end
subgraph MCP["๐ MCP ยท stdio"]
server["deepsleep-mcp"]
end
subgraph Local["๐ง Local Memory"]
mem["memory.json\n8KB"]
log["activity.jsonl"]
idx["index.db\nSQLite"]
end
cursor -->|get_context| server
claude -->|get_session_summary| server
wind -->|get_recent_files| server
vscode -->|add_project_note| server
server --> mem
server --> log
server --> idx
style IDEs fill:#1a1a2e,color:#c4b5fd,stroke:#7c3aed
style MCP fill:#1e3a5f,color:#93c5fd,stroke:#3b82f6
style Local fill:#14532d,color:#86efac,stroke:#22c55e
Your AI starts saying things like:
"You were debugging the JWT middleware 3 hours ago.
auth.tsandmiddleware.pywere open. You were stuck on token validation."
Without you touching a thing.
v0.2.1 โ Neural Link
You solved this exact bug in
backend-apitwo weeks ago. Want me to show you that snippet?
Neural Link is the part that makes DeepSleep feel supernatural. It connects every project on your machine into one searchable, pattern-aware brain โ backed by SQLite FTS5, zero cloud required.
flowchart TD
subgraph Machine["๐ฅ๏ธ Your Machine"]
subgraph proj1["๐ backend-api"]
m1["memory.json"]
end
subgraph proj2["๐ frontend-app"]
m2["memory.json"]
end
subgraph proj3["๐ auth-service"]
m3["memory.json"]
end
subgraph proj4["๐ mobile-app"]
m4["memory.json"]
end
end
subgraph NL["๐ Neural Link ยท ~/.deepsleep/neural_link.db"]
fts["SQLite FTS5\nFull-text search"]
patterns["Pattern Index\nauth ยท bugfix ยท api\ndatabase ยท refactor\nperformance ยท test"]
snapshots["Session Snapshots\nTimestamped history\nAll projects ยท All time"]
end
m1 -->|ds link| fts
m2 -->|ds link| fts
m3 -->|ds link| fts
m4 -->|ds link| fts
fts --> patterns
fts --> snapshots
patterns -->|ds search 'jwt auth'| Q["๐ก 'You fixed this in\nbackend-api ยท 2 weeks ago'"]
patterns -->|MCP cross_project_search| IDE["๐ฅ๏ธ Cursor / Claude / Windsurf\nauto-surfaces relevant patterns"]
style NL fill:#1e1b4b,color:#c4b5fd,stroke:#7c3aed
style Machine fill:#1a1a2e,color:#94a3b8,stroke:#475569
style Q fill:#14532d,color:#86efac,stroke:#22c55e
style IDE fill:#1e3a5f,color:#93c5fd,stroke:#3b82f6
It classifies patterns automatically. No ML. Just fast keyword scoring.
mindmap
root((๐ง Neural Link))
๐ auth
JWT tokens
OAuth flows
Middleware
Session handling
๐ bugfix
Crashes ยท Nulls
Exceptions
Wrong behaviour
๐ api
REST endpoints
Webhooks
HTTP handlers
๐๏ธ database
Migrations
Schema changes
Query fixes
โป๏ธ refactor
Cleanup
Restructuring
Renaming
โก performance
Caching
Bottlenecks
Optimisation
๐งช test
Unit ยท Integration
Mocks ยท Coverage
Security Architecture
Your code never leaves the machine. Here's exactly what's sandboxed and how.
flowchart LR
subgraph SANDBOX["๐ก๏ธ Path Traversal Sandbox"]
root["๐ Project Root\n(allowed zone)"]
b1["๐ซ ~/.ssh"]
b2["๐ซ .env / secrets"]
b3["๐ซ ../outside"]
end
subgraph MEMORY["๐ Memory Protection"]
lock["๐ FileLock\nAtomic writes"]
enc["๐ก๏ธ AES-256 GCM\n--encrypt flag"]
end
subgraph INDEX["โก Indexing"]
sqlite["๐ SQLite FTS5\nfull-text search"]
gitignore["๐ .gitignore aware\nskips noise"]
end
DS["๐ง DeepSleep"] --> SANDBOX
DS --> MEMORY
DS --> INDEX
style DS fill:#1e1b4b,color:#c4b5fd,stroke:#7c3aed
style SANDBOX fill:#1a1a1a,color:#fca5a5,stroke:#ef4444
style MEMORY fill:#1a1a1a,color:#86efac,stroke:#22c55e
style INDEX fill:#1a1a1a,color:#93c5fd,stroke:#3b82f6
Why Local-First Wins
graph LR
A["โ๏ธ Cloud Copilots"] -->|"๐ธ $10โ20/mo\n๐ Code sent to servers\n๐ต Breaks offline\n๐ API key juggling\nโ๏ธ Cold start every session\n๐ No cross-project memory"| X["โ"]
B["๐ง DeepSleep"] -->|"โ
$0 forever\nโ
Code never leaves machine\nโ
Full offline fallback\nโ
pip install ยท done\nโ
Persistent session memory\nโ
Neural link across all projects"| Y["โ
"]
style A fill:#3b0d0d,color:#fca5a5,stroke:#ef4444
style B fill:#14532d,color:#86efac,stroke:#22c55e
style X fill:#3b0d0d,color:#fca5a5,stroke:#ef4444
style Y fill:#14532d,color:#86efac,stroke:#22c55e
v0.2.3 โ Cloud API Fallback
No Ollama? No problem. Paste one key. DeepSleep keeps working.
The #1 reason developers bounce: Ollama setup friction. v0.2.3 removes it entirely.
You're still local-first. Your code never leaves the machine unless Ollama is down and you've explicitly set a key. The moment Ollama comes back up, it takes over automatically โ no config change needed.
How the fallback chain works
flowchart TD
Q["๐ฌ You ask DeepSleep something"] --> O{Is Ollama\nrunning?}
O -->|Yes โ
| L["๐ฆ Ollama\ndeepseek-r1\nLocal ยท Free ยท Private"]
O -->|No โ| K{API key\nconfigured?}
K -->|Yes| C{"Which\nprovider?"}
K -->|No| M["๐ง Memory Snapshot\nHeuristic answer\nfrom local memory"]
C -->|claude| CA["๐ค Anthropic API\nclaude-haiku-4-5\nFastest ยท Cheapest"]
C -->|openai| OA["๐ค OpenAI API\ngpt-4o-mini\nWide availability"]
CA -->|API error?| M
OA -->|API error?| M
L --> ANS["โ
Answer returned"]
CA --> ANS
OA --> ANS
M --> ANS
style L fill:#14532d,color:#86efac,stroke:#22c55e
style CA fill:#1e3a5f,color:#93c5fd,stroke:#3b82f6
style OA fill:#1e3a5f,color:#93c5fd,stroke:#3b82f6
style M fill:#4a1942,color:#f0abfc,stroke:#a855f7
style ANS fill:#1a1a2e,color:#c4b5fd,stroke:#7c3aed
Step-by-step setup
Option A โ Set up after init (most common)
# Already have DeepSleep? Just run:
ds set-api claude # uses Anthropic API
# or
ds set-api openai # uses OpenAI API
DeepSleep prompts for your key, stores it at ~/.deepsleep/api_config.json, done.
Option B โ Set up at init time
cd your-project/
ds init --fallback-api claude
# or
ds init --fallback-api openai
Option C โ Remove the key
ds set-api remove
Where to get your API key
| Provider | Key format | Where to get it |
|---|---|---|
| Anthropic | sk-ant-api03-... |
console.anthropic.com/keys |
| OpenAI | sk-proj-... |
platform.openai.com/api-keys |
What you see in the terminal
When Ollama is offline and a fallback key is set, the banner shows:
project=myapp model=deepseek-r1 ollama=offline fallback=claude
When no key is set:
project=myapp model=deepseek-r1 ollama=offline fallback=none (tip: ds set-api claude)
Error handling โ what happens when things go wrong
flowchart TD
START["Request to LLM"] --> TRY_OLLAMA["Try Ollama\nhttp://127.0.0.1:11434"]
TRY_OLLAMA -->|Success| DONE["โ
Return answer"]
TRY_OLLAMA -->|Connection refused\nor timeout| CHECK_KEY{Cloud key\nconfigured?}
CHECK_KEY -->|No key| HEURISTIC["๐ง Local heuristic\nReads memory.json\nReturns snapshot"]
CHECK_KEY -->|Key set| TRY_CLOUD["Try Cloud API\n(Claude or OpenAI)"]
TRY_CLOUD -->|Success| DONE
TRY_CLOUD -->|Invalid key\n401 Unauthorized| ERR_KEY["โ ๏ธ Auth error logged\nFalls back to heuristic\nPrints: run ds set-api to fix"]
TRY_CLOUD -->|Rate limit\n429 Too Many Requests| ERR_RATE["โ ๏ธ Rate limit logged\nFalls back to heuristic"]
TRY_CLOUD -->|Network down\nor timeout| ERR_NET["โ ๏ธ Network error logged\nFalls back to heuristic"]
ERR_KEY --> HEURISTIC
ERR_RATE --> HEURISTIC
ERR_NET --> HEURISTIC
HEURISTIC --> DONE
style DONE fill:#14532d,color:#86efac,stroke:#22c55e
style HEURISTIC fill:#4a1942,color:#f0abfc,stroke:#a855f7
style ERR_KEY fill:#3b0d0d,color:#fca5a5,stroke:#ef4444
style ERR_RATE fill:#3b0d0d,color:#fca5a5,stroke:#ef4444
style ERR_NET fill:#3b0d0d,color:#fca5a5,stroke:#ef4444
The key guarantee: DeepSleep never crashes because of a missing or broken API key. It always returns something โ worst case your local memory snapshot.
Common error scenarios and fixes
| What you see | What happened | Fix |
|---|---|---|
Ollama offline โ using claude-haiku-4-5 as fallback. |
Working as intended | Nothing โ this is normal |
claude API error: authentication_error |
Bad or expired key | ds set-api claude to re-enter key |
claude API error: insufficient_quota |
Account out of credits | Top up at console.anthropic.com |
openai API error: invalid_api_key |
Bad key | ds set-api openai to re-enter |
openai API unavailable: <urlopen error> |
No internet or OpenAI down | DeepSleep auto-falls back to memory snapshot |
fallback=none shown in banner |
No key configured | Run ds set-api claude or ds set-api openai |
| Answer feels generic / shallow | Running on memory snapshot | Either start Ollama or set a cloud key |
Check your current setup
ds doctor
Output includes a cloud-fallback line:
OK project-root
OK memory-file
OK ollama-host
WARN ollama-model โ Ollama is off, but that's OK if you have a fallback
OK cloud-fallback โ key is stored and provider is recognized
OK disk-space
If cloud-fallback shows WARN, run ds set-api claude or ds set-api openai.
Privacy model โ exactly what goes where
flowchart LR
subgraph LOCAL["๐ฅ๏ธ Stays on your machine โ always"]
MEM["memory.json\nSession summaries\nProject facts"]
IDX["index.db\nFile index"]
KEY["api_config.json\nYour API key"]
end
subgraph SENT["โ๏ธ Sent to cloud โ only when Ollama is offline AND key is set"]
Q["Your question\n(plain text)"]
CTX["Memory context\n(your session summary)"]
FC["File snippets\n(only if you referenced a file)"]
end
subgraph NEVER["๐ซ Never sent โ ever"]
CODE["Full source code"]
GIT["Git history"]
ENV[".env / secrets\n(blocked by sandbox)"]
end
style LOCAL fill:#14532d,color:#86efac,stroke:#22c55e
style SENT fill:#1e3a5f,color:#93c5fd,stroke:#3b82f6
style NEVER fill:#3b0d0d,color:#fca5a5,stroke:#ef4444
Who should use cloud fallback
| Scenario | Recommended setup |
|---|---|
| Laptop on a flight (Ollama offline) | Set key โ seamless fallback |
| Windows dev, no Ollama installed | pip install deepsleep-ai && ds set-api openai |
| Privacy-first / air-gapped | Don't set a key โ behavior unchanged |
| Team sharing a project | Each dev sets their own key locally |
| CI / scripted use | Set DEEPSLEEP_ env vars instead of key file |
Quickstart
Step 1 โ Install Ollama (one-time, optional but recommended)
# macOS
brew install ollama
# Linux
curl -fsSL https://ollama.com/install.sh | sh
# Windows โ download from https://ollama.com/download/windows
ollama serve
ollama pull deepseek-r1
No Ollama? DeepSleep still works โ it falls back to its local memory snapshot. Or set
ds set-api claude/ds set-api openaifor full AI answers without Ollama.
Step 2 โ Install DeepSleep
# Core CLI
pip install deepsleep-ai
# With MCP server (Cursor ยท Claude Desktop ยท Windsurf)
pip install 'deepsleep-ai[mcp]'
Step 3 โ Initialize your project
cd your-project/
ds init
# With AES-256 encrypted memory
ds init --encrypt
Step 4 โ Start watching
ds dream
# DeepSleep is running. Go code. It's watching.
Step 5 โ Ask it anything
ds
> What was I working on?
> What files did I touch today?
> What's the next step?
> Summarize my session
One-liner:
pip install deepsleep-ai && ollama pull deepseek-r1 && ds init && ds dream --once && ds
Neural Link โ Full Setup Guide
What is the Neural Link?
The Neural Link indexes session memory from every DeepSleep-enabled project on your machine into a single SQLite FTS5 database at ~/.deepsleep/neural_link.db. It powers cross-project search and pattern recognition โ your entire coding history, searchable in milliseconds.
sequenceDiagram
participant Dev as ๐จโ๐ป You
participant DS as ๐ง DeepSleep
participant NL as ๐ Neural Link DB
participant IDE as ๐ฅ๏ธ Cursor / Windsurf
Dev->>DS: ds link (in each project)
DS->>NL: sync patterns + snapshots
Dev->>DS: ds search "jwt token"
DS->>NL: FTS5 full-text search
NL-->>DS: matches from backend-api (2 weeks ago)
DS-->>Dev: "You fixed this in backend-api ยท here's the pattern"
IDE->>DS: cross_project_search("jwt") via MCP
DS->>NL: search exclude current project
NL-->>IDE: relevant patterns injected into AI context
Step 1 โ Link your projects
Run this once in each project you want indexed:
cd ~/projects/backend-api && ds link
cd ~/projects/frontend-app && ds link
cd ~/projects/auth-service && ds link
Step 2 โ Search across everything
# Natural language search across all projects
ds search "jwt token validation"
ds search "database migration rollback"
ds search "react component state bug"
# Filter by pattern type
ds search "auth" --type auth
ds search "crash on deploy" --type bugfix
# See global context
ds neural
ds neural --query "oauth middleware"
Step 3 โ Keep it updated
# Re-sync after a big session (runs automatically with ds dream too)
ds link --sync
# Remove a project from the index
ds unlink
MCP Server โ Full Setup Guide
Install
pip install 'deepsleep-ai[mcp]'
Configure Claude Desktop
~/.claude/config.json:
{
"mcpServers": {
"deepsleep": {
"command": "deepsleep-mcp",
"args": ["--path", "/absolute/path/to/your/project"]
}
}
}
Configure Cursor
.cursor/mcp.json in your project:
{
"mcpServers": {
"deepsleep": {
"command": "deepsleep-mcp",
"args": ["--path", "/absolute/path/to/your/project"]
}
}
}
Configure Windsurf
~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"deepsleep": {
"command": "deepsleep-mcp",
"args": ["--path", "/absolute/path/to/your/project"]
}
}
}
Start manually
ds mcp /path/to/your/project
# or
deepsleep-mcp --path /path/to/your/project
All MCP Tools
Project memory (v0.2.0+)
| Tool | What it returns |
|---|---|
get_context |
Full 3-layer memory โ call this first |
get_session_summary |
Latest dream summary + timestamp |
get_recent_files |
Recently modified files |
get_status |
Project status dict |
get_activity_log |
Filtered activity entries |
get_open_questions |
Unresolved questions |
get_project_facts |
Long-term summary, goals, facts |
record_file_opened |
Tell DeepSleep a file was opened |
add_project_note |
Save a note to long-term memory |
Neural Link (v0.2.1+)
| Tool | What it returns |
|---|---|
cross_project_search |
FTS search across all linked projects |
get_neural_context |
Full cross-project context string |
get_similar_patterns |
Recent patterns of a given type from other projects |
get_neural_link_stats |
Index stats โ projects, snapshots, patterns |
sync_to_neural_link |
Push current session into global index |
Commands Reference
| Command | What it does |
|---|---|
ds init |
Initialize project memory |
ds init --encrypt |
AES-256 encrypted memory |
ds |
Interactive chat |
ds chat |
Alias for ds |
ds dream |
Start background file watcher |
ds dream --once |
One dream cycle and exit |
ds status |
Inspect memory snapshot |
ds export |
Markdown standup report |
ds export --format json |
JSON export |
ds forget --layer session |
Wipe session layer |
ds forget --all |
Full reset (with confirmation) |
ds doctor |
Quick health check |
ds health |
Detailed JSON health report |
ds mcp [path] |
Start MCP server |
deepsleep-mcp --path /p |
Standalone MCP entry point |
ds link |
Register + sync project into Neural Link |
ds link --no-sync |
Register without syncing |
ds unlink |
Remove project from Neural Link |
ds search "query" |
Cross-project FTS search |
ds search "q" --type auth |
Filtered pattern search |
ds neural |
Show global Neural Link context |
ds neural --query "q" |
Filtered cross-project context |
ds set-api claude |
Store Claude API key as Ollama fallback |
ds set-api openai |
Store OpenAI API key as Ollama fallback |
ds set-api remove |
Remove stored cloud API key |
ds init --fallback-api claude |
Init + configure fallback in one step |
Feature Overview
| Feature | v0.1 | v0.2 | v0.2.1 | v0.2.3 |
|---|---|---|---|---|
| Per-project memory | โ | โ | โ | โ |
| Idle-time dreaming | โ | โ | โ | โ |
| Ollama / offline fallback | โ | โ | โ | โ |
| AES-256 encryption | โ | โ | โ | โ |
| 8KB memory budget | โ | โ | โ | |
| 5-file / 4000-char context | โ | โ | โ | |
| MCP server | โ | โ | โ | |
| Cursor / Windsurf / Claude support | โ | โ | โ | |
| Windows path normalization | โ | โ | โ | |
| Neural Link cross-project index | โ | โ | ||
| FTS5 full-text search | โ | โ | ||
| Pattern classification | โ | โ | ||
| Neural Link MCP tools | โ | โ | ||
| Claude API fallback | โ | |||
| OpenAI API fallback | โ | |||
| Zero new dependencies | โ |
Troubleshooting
Ollama issues
| Problem | Fix |
|---|---|
Ollama is not running |
Run ollama serve in a terminal and keep it open |
model not found |
Run ollama pull deepseek-r1 |
Connection refused |
Check Ollama is on http://127.0.0.1:11434 โ run ds health |
| Empty / garbage answers | Try a lighter model: ds --model phi3 |
| Slow on first call | Normal โ model is loading. Subsequent calls are fast. |
ds doctor # quick check
ds health --format json # full JSON report
Memory issues
| Problem | Fix |
|---|---|
Memory is busy |
Another ds process is running โ wait 3s and retry |
Invalid password |
Wrong password for encrypted memory โ no recovery without it |
| Stale / wrong answers | Run ds dream --once to force a fresh summary |
| Memory looks empty | Run ds status to confirm memory path is correct |
ds # then type /memory to inspect
ds forget --layer session # wipe session layer only
ds forget --all # nuclear option
MCP issues
| Problem | Fix |
|---|---|
command not found: deepsleep-mcp |
pip install 'deepsleep-ai[mcp]' |
mcp package missing |
pip install mcp |
| IDE doesn't pick up context | --path must be the exact absolute project root |
| MCP server crashes | Run deepsleep-mcp --path /your/project in terminal to see error |
| Context is empty | Run ds dream --once to populate memory first |
# Verify before wiring to IDE
deepsleep-mcp --path /path/to/project
# Should print "DeepSleep MCP server starting..." then block โ that's correct
Neural Link issues
| Problem | Fix |
|---|---|
No cross-project matches |
Run ds link in other projects first |
| Search finds nothing | Memory may be empty โ run ds dream --once then ds link --sync |
| Want to remove a project | ds unlink from that project's directory |
| Index seems stale | ds link --sync to push fresh memory |
ds neural # show all linked projects and their last summaries
ds search "test" # verify search is working
Cloud API fallback issues
| Problem | Fix |
|---|---|
Claude API error: invalid_api_key |
Re-run ds set-api claude with the correct key |
OpenAI API unavailable |
Check your internet connection or key quota |
| Want to go back to local-only | ds set-api remove |
| How do I check what's configured? | ds doctor โ shows cloud-fallback: OK/WARN |
ds doctor # check if cloud fallback is configured and reachable
Windows issues
| Problem | Fix |
|---|---|
| Watcher misses changes | Set WATCHDOG_OBSERVER_IMPL=polling env var |
Permission denied on .deepsleep/ |
Run terminal as Administrator once to create the folder |
| Paths look wrong | v0.2.0+ normalises all paths to forward slashes automatically |
Package Layout
src/deepsleep_ai/
โโโ cli.py # Typer CLI + Prompt Toolkit chat
โโโ mcp_server.py # MCP server โ 14 tools for Cursor, Claude Desktop, Windsurf
โโโ neural_link.py # Neural Link โ cross-project SQLite FTS5 index
โโโ watcher.py # Watchdog idle watcher + dream loop
โโโ memory_manager.py # 3-layer memory ยท 8KB compactor ยท AES-256
โโโ llm_client.py # Ollama connector + offline fallback
โโโ config.py # Pydantic-settings configuration
tests/ # 51 tests ยท all passing
โโโ test_neural_link.py # 24 tests for Neural Link
โโโ test_memory_manager.py
โโโ test_cli.py
โโโ test_concurrency.py
โโโ test_doctor.py
โโโ test_encryption.py
โโโ test_export.py
โโโ test_forget.py
โโโ test_llm_client.py
โโโ test_security.py
โโโ test_watcher.py
Contributing
- Check ROADMAP.md for what's next
- Read CONTRIBUTING.md for setup
- Open an issue or PR โ reviewed fast
python3 -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
pytest -v
Ecosystem
| Project | What it is |
|---|---|
| DeepSleep-beta (you are here) | Python CLI ยท MCP server ยท Neural Link |
| DeepSleep-Hub | Browser extension ยท ChatGPT, Claude & Gemini neural bridge |
Trust Signals
- Live on PyPI:
pip install deepsleep-ai - MIT licensed โ use it anywhere
- GitHub Actions CI โ 51 tests across Python 3.9 / 3.10 / 3.11 / 3.12
- Atomic memory writes โ zero corruption risk
- No telemetry ยท no analytics ยท no network calls except your local Ollama
ds+deepsleep-mcpentry points work immediately after install
If DeepSleep remembered something you forgot โ give it a โญ
The AI that forgets nothing, costs nothing, and runs nowhere but your machine.
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
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 deepsleep_ai-0.2.3.tar.gz.
File metadata
- Download URL: deepsleep_ai-0.2.3.tar.gz
- Upload date:
- Size: 59.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ea5aeaeec69bcc50d666c693d12494bd849480a9e7e1902ae3abe5c528312d8a
|
|
| MD5 |
a634f84ae4e7d1d537f03bfa7795fa08
|
|
| BLAKE2b-256 |
e1e6088f36c3a16988a76d92b75f93de97b96092bee0f96cfe41d0a3cbfc6a34
|
Provenance
The following attestation bundles were made for deepsleep_ai-0.2.3.tar.gz:
Publisher:
publish.yml on Keshavsharma-code/DeepSleep-beta
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
deepsleep_ai-0.2.3.tar.gz -
Subject digest:
ea5aeaeec69bcc50d666c693d12494bd849480a9e7e1902ae3abe5c528312d8a - Sigstore transparency entry: 1343301105
- Sigstore integration time:
-
Permalink:
Keshavsharma-code/DeepSleep-beta@8ff21e544e5b4bccb449029dd988bc03637eaee0 -
Branch / Tag:
refs/tags/v0.2.3 - Owner: https://github.com/Keshavsharma-code
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@8ff21e544e5b4bccb449029dd988bc03637eaee0 -
Trigger Event:
push
-
Statement type:
File details
Details for the file deepsleep_ai-0.2.3-py3-none-any.whl.
File metadata
- Download URL: deepsleep_ai-0.2.3-py3-none-any.whl
- Upload date:
- Size: 45.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3a21a7364243411f0c1adfb1a361b706a79058058f03d55be4bdad6c2ae6c37a
|
|
| MD5 |
8d6fc08965270d5cc7aa512a1e4d04c5
|
|
| BLAKE2b-256 |
9e4ba5c6018872d1be94b31bfd5bffd2606dcdbe2d7b415292f47e06d4426a3d
|
Provenance
The following attestation bundles were made for deepsleep_ai-0.2.3-py3-none-any.whl:
Publisher:
publish.yml on Keshavsharma-code/DeepSleep-beta
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
deepsleep_ai-0.2.3-py3-none-any.whl -
Subject digest:
3a21a7364243411f0c1adfb1a361b706a79058058f03d55be4bdad6c2ae6c37a - Sigstore transparency entry: 1343301116
- Sigstore integration time:
-
Permalink:
Keshavsharma-code/DeepSleep-beta@8ff21e544e5b4bccb449029dd988bc03637eaee0 -
Branch / Tag:
refs/tags/v0.2.3 - Owner: https://github.com/Keshavsharma-code
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@8ff21e544e5b4bccb449029dd988bc03637eaee0 -
Trigger Event:
push
-
Statement type: