auto-deep-researcher-24x7
CLAUDE.md1.3k starsChanged 8 months agoApache-2.0View on GitHub
This file is designed to be read by AI assistants (Claude, ChatGPT, Codex, etc.). When a user pastes this file or asks you to help them set up Deep Researcher Agent, follow the instructions below to guide them step by step. This section is for AI assistants (Claude, Codex, Cursor, etc.) operating on this repository. This repository is owned and maintained solely by Xiangyue-Zhang. The Contributors list MUST contain only Xiangyue-Zhang and no one else — including no AI bot…
- Reads credentials
- Deletes or force-pushes
- Installs packages
- Commits and pushes
Trending
Quiet since October.thin dataabout the whole repository
Who's talking about Xiangyue-Zhang/auto-deep-researcher-24x7
The biggest 1 of 1 mention linking to the repository that our crawl found. Each line is their own headline.
In this repository9 other files it gives its agents.
- AGENTS.mdAGENTS.md
- auto-experimentSkill
- conf-searchSkill
- daily-papersSkill
- experiment-statusSkill
- gpu-monitorSkill
- obsidian-syncSkill
- paper-analyzeSkill
- progress-reportSkill
The file
Show its rules and text
We split this CLAUDE.md into the rules it gives an agent
16 rules. About 0 are common, 11 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈11
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 40
Verify: author == Xiangyue-Zhang <85532891+Xiangyue-Zhang@users.noreply.github.com>, no Co-Authored-By:, no AI names.
- Distinctive: line 76
When a user asks for help with this project, follow this decision tree:
- Distinctive: line 96
Run these commands and report results to the user:
- Very specific: line 105
If Python < 3.10: suggest conda create -n dra python=3.11 -y && conda activate dra
- Distinctive: line 107
If no GPU: this framework requires a GPU for training.
- Distinctive: line 109
If no API key: guide them to either an official endpoint or a compatible provider:
- Distinctive: line 161
Ask the user two questions:
- Very specific: line 181
Default is anthropic. To switch, edit config.yaml:
- Distinctive: line 311
When training finishes, it analyzes results and plans the next experiment
- Distinctive: line 315
Check back anytime with /experiment-status."
- Very specific: line 344
If vault_path is set, write Dashboard.md and daily Markdown notes into that Obsidian vault.
- Very specific: line 345
If vault_path is empty, fall back to project-local text files under workspace/progress_tracking/.
- Distinctive: line 409
Use this when the user asks "how does it work?":
- Distinctive: line 432
Only 1 worker active at a time, others cost $0
- Distinctive: line 472
If not: install NVIDIA drivers for your GPU.
- Distinctive: line 538
If the user is confused, start with: "Let's create a simple project first and watch the agent work"
≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AI Guide — Deep Researcher Agent
This file is designed to be read by AI assistants (Claude, ChatGPT, Codex, etc.). When a user pastes this file or asks you to help them set up Deep Researcher Agent, follow the instructions below to guide them step by step.
🚨 CONTRIBUTOR POLICY — READ BEFORE ANY git push TO THIS REPO
This section is for AI assistants (Claude, Codex, Cursor, etc.) operating on this repository.
This repository is owned and maintained solely by Xiangyue-Zhang. The Contributors list MUST contain only Xiangyue-Zhang and no one else — including no AI bot accounts.
Hard rules
- Every commit must be authored by
Xiangyue-Zhang <85532891+Xiangyue-Zhang@users.noreply.github.com>— neveradmin, never AI identities. Use:git -c user.name="Xiangyue-Zhang" \ -c user.email="85532891+Xiangyue-Zhang@users.noreply.github.com" \ commit -m "..." - NEVER add
Co-Authored-By:trailer to commit messages. Thecommit-msghook in.git/hooks/commit-msgwill reject any commit containing it. - NEVER mention AI assistant names (
Claude,Codex,GPT,Anthropic,OpenAI,Copilot,Cursor) in commit messages. Will be flagged by both the local hook AND thecontributor-guardGitHub Action. - NEVER toggle repo visibility (
gh repo edit --visibility ...). On 2026-04-08, this destroyed 93 of 94 stars on this repo. Stars cannot be recovered from a visibility toggle. - NEVER delete the repo (
gh repo delete) without explicit user confirmation. Deletion permanently destroys the GitHub internal repo ID, which destroys all stars and breaks all external URLs (paper citations, etc.). - NEVER force push to main. Branch protection blocks it by default. If you genuinely need to rewrite history, get explicit user authorization for that specific operation, temporarily disable protection, push, re-enable.
Pre-push verification (mandatory)
git log -1 --format='author=%an <%ae>%nmessage=%B'Verify: author == Xiangyue-Zhang <85532891+Xiangyue-Zhang@users.noreply.github.com>, no Co-Authored-By:, no AI names. If any check fails, fix the commit before pushing.
In-repo enforcement (already deployed)
Six layers of protection are already in place — you should not need to deploy them, but be aware they will block violations:
- Local git config (
.git/config) — preset to Xiangyue-Zhang - commit-msg hook (
.git/hooks/commit-msg) — local block - GitHub Action (
.github/workflows/contributor-guard.yml) — remote block on push - Branch protection on
main— no force push, no deletion, linear history .mailmapin repo root — redirects any leaked AI identity to Xiangyue-Zhang- AI memory / instruction files in user's home (
~/CLAUDE.md,~/AGENTS.md)
See also
~/CLAUDE.md— full global rules + 2026-04-08 incident report~/AGENTS.md— Codex CLI version of the same rulesAGENTS.md(this repo's root) — project-level Codex rules
What Is This?
Deep Researcher Agent is a framework that lets an AI agent autonomously run deep learning experiments 24/7. The agent:
- Thinks — analyzes results, plans the next experiment
- Executes — modifies code, dry-runs, launches GPU training
- Monitors — watches training at ZERO LLM cost (only process checks + log reads)
- Reflects — parses results, compares with baseline, decides next step
- Repeats — 24/7 without human intervention
The killer feature: during training (which is 90%+ of the time), the agent makes ZERO API calls. A 24-hour cycle costs ~$0.08.
Your Job as AI Assistant
When a user asks for help with this project, follow this decision tree:
User wants to...
├── Install it → Go to [SETUP GUIDE]
├── Create a project → Go to [PROJECT CREATION]
├── Launch the agent → Go to [LAUNCH GUIDE]
├── Check status → Go to [STATUS CHECK]
├── Intervene/redirect → Go to [INTERVENTION]
├── Use on phone → Go to [MOBILE SETUP]
├── Understand how it works → Go to [ARCHITECTURE EXPLANATION]
└── Debug an issue → Go to [TROUBLESHOOTING]SETUP GUIDE
Step 1: Check Prerequisites
Run these commands and report results to the user:
python3 --version # Need 3.10+
nvidia-smi # Need at least 1 GPU
echo $ANTHROPIC_API_KEY # Anthropic-compatible key, if using provider=anthropic
echo $OPENAI_API_KEY # OpenAI-compatible key, if using provider=openaiIf Python < 3.10: suggest conda create -n dra python=3.11 -y && conda activate dra
If no GPU: this framework requires a GPU for training. Suggest cloud GPU (Lambda Labs, RunPod, Vast.ai).
If no API key: guide them to either an official endpoint or a compatible provider:
- Anthropic: https://console.anthropic.com/ → API Keys → Create Key
- OpenAI: https://platform.openai.com/api-keys → Create new secret key
- Qwen / DashScope: create
DASHSCOPE_API_KEY - GLM / BigModel: create
ZHIPUAI_API_KEY - MiniMax: create
MINIMAX_API_KEY
Then set it:
# Pick ONE:
export ANTHROPIC_API_KEY="sk-ant-xxxxx" # For Claude
export OPENAI_API_KEY="sk-xxxxx" # For Codex/GPT
# Make permanent:
echo 'export ANTHROPIC_API_KEY="sk-ant-xxxxx"' >> ~/.bashrc
source ~/.bashrcStep 2: Install
# If not already cloned:
git clone https://github.com/Xiangyue-Zhang/auto-deep-researcher-24x7.git
cd auto-deep-researcher-24x7
# Install dependencies
pip install -r requirements.txt
# Install Claude slash commands + Codex local skills
python install.py
# Verify
python -m core.loop --checkExpected output:
✓ Claude /auto-experiment
✓ Claude /experiment-status
✓ Claude /gpu-monitor
✓ Claude /daily-papers
✓ Claude /paper-analyze
✓ Claude /conf-search
✓ Claude /progress-report
✓ Claude /obsidian-sync
✓ Codex $auto-experiment
...
Done! 8 Claude commands and 8 Codex skills installed.Step 3: Choose Your LLM Provider
Ask the user two questions:
- Which vendor? — Anthropic (Claude) or OpenAI (Codex/GPT)?
- API key or subscription? — an existing Claude / ChatGPT subscription is usually much cheaper than per-token API billing for 24/7 agent use.
| Provider value | Vendor | Billing | Auth |
anthropic | Anthropic-compatible | Per-token API | ANTHROPIC_API_KEY or custom env |
openai | OpenAI-compatible | Per-token API | OPENAI_API_KEY or custom env |
claude_cli | Anthropic | Flat-rate subscription | claude CLI installed + logged in |
codex_cli | OpenAI | Flat-rate subscription | codex CLI installed + logged in |
Model tiers:
| Provider | Fast Model | Strong Model |
| Anthropic (API or CLI) | claude-sonnet-4-6 | claude-opus-4-6 |
| OpenAI (API or CLI) | codex-5.3 | gpt-5.4 |
Default is anthropic. To switch, edit config.yaml:
agent:
provider: "openai" # or "anthropic" / "claude_cli" / "codex_cli"
model: "codex-5.3" # or claude-sonnet-4-6 / claude-opus-4-6 / gpt-5.4
base_url: "" # optional compatible endpoint override
api_key_env: "" # optional custom key env var
auth_token_env: "" # optional custom bearer token env varCompatible API examples (illustrative only in this repo — these endpoint/model combinations have not been live-smoke-tested here):
# Qwen / DashScope
agent:
provider: "openai"
model: "qwen-plus"
base_url: "https://dashscope.aliyuncs.com/compatible-mode/v1"
api_key_env: "DASHSCOPE_API_KEY"
# GLM / BigModel
agent:
provider: "openai"
model: "glm-4.5"
base_url: "https://open.bigmodel.cn/api/paas/v4"
api_key_env: "ZHIPUAI_API_KEY"
# MiniMax via OpenAI-compatible endpoint
agent:
provider: "openai"
model: "MiniMax-M1"
base_url: "https://api.minimaxi.com/v1"
api_key_env: "MINIMAX_API_KEY"Subscription mode (claude_cli / codex_cli) shells out to the headless
CLI (claude -p / codex exec) and reuses the user's existing subscription
quota instead of per-token billing. Much cheaper when running multiple agents
in parallel. Trade-off: no native prompt caching and no structured tool-use
protocol — used as a plain text-in / text-out oracle, which is fine for this
framework's single-shot dispatch pattern.
PROJECT CREATION
Ask the User These Questions:
- What's your research goal? (e.g., "Train a ViT on CIFAR-100 to 85% accuracy")
- Do you already have training code? (Yes → point to it / No → agent will create it)
- Where is your data? (path or "auto-download")
- Which GPU(s) can you use? (run
nvidia-smito check) - Any constraints? (max epochs, batch size, etc.)
Create the Project Directory:
mkdir ~/PROJECT_NAME
cd ~/PROJECT_NAMEWrite PROJECT_BRIEF.md:
This is THE most important file. Write it based on the user's answers:
# Goal
[User's research goal with specific metric and target value]
# Codebase
[If existing code: list files and paths]
[If no code: "Agent should create PyTorch training code from scratch"]
- Data: [path or "auto-download via torchvision"]
- Checkpoints: ./checkpoints/
- Logs: ./logs/
# What to Try
[Decision tree based on user's domain knowledge]
- First try: [baseline config]
- If [metric] < [threshold1]: try [approach A]
- If [metric] between [threshold1] and [threshold2]: try [approach B]
- If [metric] > [target]: goal reached, generate report
# Constraints
- GPU: [which GPU(s)]
- Max epochs per run: [number]
- Batch size: [number]
- [Any other constraints]
# Current Status
[No experiments yet / Previous best: X]Key Tips to Tell the User:
- Be specific about the goal — "accuracy > 80%" not "improve accuracy"
- Give a decision tree — the agent needs to know what to do in each situation
- Keep it under 3000 characters — this is the Tier 1 memory cap
- Think of it as instructing a capable but new PhD student
LAUNCH GUIDE
Option A: Claude Code / Codex CLI
/auto-experiment --project ~/PROJECT_NAME --gpu 0Option B: Python Direct
python -m core.loop \
--project ~/PROJECT_NAME \
--gpu 0 \
--max-cycles 5 # Optional: limit cycles (remove for unlimited)What to Tell the User:
"The agent is now running. Here's what will happen:
- It reads your PROJECT_BRIEF.md
- It plans the first experiment
- It writes/modifies code
- It does a dry-run (2 steps) to catch errors
- It launches real training
- During training: ZERO API cost — it just checks if the process is alive
- When training finishes, it analyzes results and plans the next experiment
- This repeats until you stop it or the goal is reached
You can close this terminal — the training continues via nohup. Check back anytime with /experiment-status."
STATUS CHECK
# In Claude Code / Codex:
/experiment-status --project ~/PROJECT_NAME
# Check GPUs:
/gpu-monitor
# Or manually:
cat ~/PROJECT_NAME/workspace/MEMORY_LOG.md # See results and decisions
cat ~/PROJECT_NAME/workspace/.cycle_counter # See how many cycles completed
nvidia-smi # See GPU usageFor persistent progress notes:
obsidian:
enabled: true
vault_path: "~/Documents/MyObsidianVault" # Optional
project_subdir: "DeepResearcher/{project_name}"
auto_append_daily: true- If
vault_pathis set, writeDashboard.mdand daily Markdown notes into that Obsidian vault. - If
vault_pathis empty, fall back to project-local text files underworkspace/progress_tracking/. - Manual refresh:
/obsidian-sync --project ~/PROJECT_NAME
# or
python -m core.obsidian --project ~/PROJECT_NAMEINTERVENTION
The user wants to change the agent's direction. Three methods:
Method 1: Directive File (Recommended)
echo "YOUR INSTRUCTION HERE" > ~/PROJECT_NAME/workspace/HUMAN_DIRECTIVE.mdThe agent reads this at the start of the next cycle with HIGHEST priority, then auto-archives it.
Examples:
"Stop trying ResNet. Switch to ViT-B/16 with lr=1e-3""The last 3 experiments all used lr=0.1. Try smaller: 1e-3, 1e-4, 1e-5""Goal reached! Generate a final report with all results."
Method 2: Command-Line
python -m core.loop --project ~/PROJECT_NAME --directive "Try label smoothing 0.1"Method 3: Edit Memory
vim ~/PROJECT_NAME/workspace/MEMORY_LOG.mdThis is for permanent changes. The agent reads this every cycle.
MOBILE SETUP
For checking experiments from phone:
# Install Happy Coder CLI
npm install -g happy-coder
# Start session through Happy
happy
# Inside: launch experiment
/auto-experiment --project ~/PROJECT_NAME --gpu 0Then install the Happy Coder app:
- iOS: https://apps.apple.com/us/app/happy-codex-claude-code-app/id6748571505
- Android: https://play.google.com/store/apps/details?id=com.ex3ndr.happy
Scan QR code to pair. Now the user gets push notifications and can send directives from their phone.
ARCHITECTURE EXPLANATION
Use this when the user asks "how does it work?":
The Loop
THINK (LLM, ~$0.05) → EXECUTE (LLM→training) → MONITOR ($0.00) → REFLECT (LLM, ~$0.03) → repeatWhy It's Cheap
During training (90%+ of time), the agent does NOT call the LLM. It only does:
kill -0 $PID— is the process alive? (zero cost)nvidia-smi— is GPU active? (zero cost)tail -50 logfile— latest metrics (zero cost)
Memory System
- Tier 1:
PROJECT_BRIEF.md— frozen, human-written, max 3000 chars - Tier 2:
MEMORY_LOG.md— rolling, auto-compacted, max 2000 chars - Total: ~5000 chars CONSTANT, whether running 1 day or 6 months
Agent Architecture
- Leader: decides what to do (3 tools)
- Idea Agent: literature search & hypotheses —
search_papers,search_arxiv,get_paper(reference/citation snowballing), plus read/write (5 tools) - Code Agent: writes code & launches experiments — adds
list_tree(recursive repo map) andsearch_code(regex grep) for codebase comprehension (7 tools) - Writing Agent: generates reports — read/write/list plus
search_code(4 tools) - Only 1 worker active at a time, others cost $0
Tool-Use Protocol (provider-agnostic)
Workers do not use each provider's native SDK tool-use protocol. Instead the
framework injects a plain-text schema into the system prompt and the worker
emits tool calls as <tool_call>{...}</tool_call> blocks. The dispatcher
parses the blocks, runs each through ToolRegistry.execute_tool, and feeds
results back as <tool_result name="...">...</tool_result> in the next user
turn. The loop runs until the worker produces a response with no tool calls
(the final answer) or max_turns is reached.
Key properties:
- One text protocol works identically across all four providers — no per-provider branching in the execution loop.
launch_experimentPID and log_file come authoritatively from the tool result's JSON, not from regex-scraping the model's prose.- For
claude_clithe framework passes--tools ""so the CLI cannot bypass the protocol with its own built-in tools.codex_clihas no equivalent flag and may silently ignore the protocol; a runtime warning is emitted when it is used as a worker, and users should pick one of the other three providers for worker dispatches. - Tool-call blocks inside triple-backtick code fences are ignored, so a model's illustrative example in prose is never accidentally executed.
Safety
- Mandatory dry-run before every real training
- Protected files can't be overwritten
- Anti-burn protection (backs off if stuck in empty loops)
- Human can intervene anytime via directive file
TROUBLESHOOTING
"No GPU found"
nvidia-smi # Check if CUDA drivers are installedIf not: install NVIDIA drivers for your GPU.
"anthropic/openai package not found"
pip install anthropic openai"API key not set"
export ANTHROPIC_API_KEY="your-key-here"
# OR
export OPENAI_API_KEY="your-key-here""Dry-run failed"
This is working as intended! The dry-run caught an error before wasting GPU hours. Check the error message and fix the code, or let the agent fix it in the next cycle.
"Agent keeps trying the same thing"
Drop a directive:
echo "You've tried X three times. Try something completely different: Y" \
> workspace/HUMAN_DIRECTIVE.md"Training crashed"
The agent automatically detects crashes (PID dies), reads the error log, and tries to fix the issue. If it keeps crashing, intervene with a directive.
"Memory is full / context too long"
This shouldn't happen — memory is capped at 5K chars. If it does, check:
wc -c PROJECT_BRIEF.md # Should be < 3000
wc -c workspace/MEMORY_LOG.md # Should be < 2000"Want to start fresh"
rm -rf workspace/ # Delete all agent state
# PROJECT_BRIEF.md is preserved
python -m core.loop --project . # Restart from scratchQUICK REFERENCE
| Command | What It Does |
/auto-experiment --project PATH --gpu 0 | Start 24/7 experiment loop |
/experiment-status | Check progress |
/gpu-monitor | GPU status |
/daily-papers | Paper recommendations |
/paper-analyze ARXIV_ID | Deep paper analysis |
/conf-search --venue CVPR2025 --query "xxx" | Conference search |
/progress-report | Generate report |
echo "instruction" > workspace/HUMAN_DIRECTIVE.md | Redirect agent |
python install.py --uninstall | Remove all skills |
IMPORTANT CONTEXT FOR AI ASSISTANTS
- This framework works with ANY training framework (PyTorch, TensorFlow, JAX, etc.)
- The agent can create code from scratch OR modify existing code
- It's not just hyperparameter tuning — it can change architectures, loss functions, augmentation strategies
- The agent is NOT a chatbot — it's an autonomous loop that runs independently
- Cost is ~$0.08/day, not $50+/day, because of zero-cost monitoring
- If the user is confused, start with: "Let's create a simple project first and watch the agent work"
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

