GitHub Park

ClawPhD: An OpenClaw Agent for research, turn academic papers into publication-ready diagrams, posters, videos, and more

ClawPhD is an AI agent based on OpenClaw Nanobot, designed to transform academic paper content into publishable materials. It can intelligently generate high-quality academic figures and statistical charts from paper paragraphs, supports iterative optimization through human-machine feedback to enhance output quality, and can convert academic paper content into interactive web pages. ClawPhD integrates multiple large language models (such as OpenRouter, Anthropic, OpenAI, Gemini, Deepseek), allowing users to leverage these AI capabilities by configuring API keys. It provides an interactive chat interface, supports multi-task parallel processing, and includes cron-based task scheduling, offering services for automated discovery and processing of academic information.

Core Features of ClawPhD

  1. Figure/Chart Generation: Extracts key information from paper sections to create publication-ready academic illustrations and statistical charts, supporting multiple rounds of iterative optimization.
  2. Paper Discovery: Actively searches for and summarizes current popular AI research papers according to a set schedule, enabling quick access to the latest developments in the field.
  3. Video Narration: Generates explanatory presentation videos based on paper content, capable of showcasing core ideas and research findings.
  4. Paper Webpage: Converts academic papers into interactive webpages for convenient online sharing and browsing, improving the dissemination efficiency of the research.
  5. Poster Generation: Creates posters suitable for academic conferences without requiring additional design software.
  6. Code Synthesis: Extracts key logic from the methodology section of a paper to generate reproducible code, lowering the barrier to replicating research results.

ClawPhD Feature Examples

Figure Generation and Iterative Optimization

ClawPhD provides a dedicated example script for figure generation (examples/diagram_generation_command.sh). The generated results can be viewed, for instance, in the Iteration v3 version.

Taking the HumanLLM framework diagram generation as an example, the tool supports multi-round self-feedback iterative optimization, with the following workflow:

  • Initial Generation: Outputs a basic version of the figure.
  • After 1 Iteration: Generates Iteration v1, with preliminary optimization of structure and details.
  • After 3 Iterations: Generates Iteration v3, achieving publication-level sophistication.

This iterative optimization mechanism continuously improves figure quality through human-machine feedback, ultimately producing results that meet academic publishing standards.

Paper Webpage Generation

ClawPhD can transform academic papers into interactive webpages. The generated pages support online interaction, facilitating the sharing of paper content. Refer to the "Paper Website Example" in the project for a concrete demonstration.

Installing and Using ClawPhD

1. Install ClawPhD

Two installation methods are available; choose based on your needs:

  • Install from source:
    uv pip install -e .
    
  • Install from PyPI (Recommended):
    pip install clawphd-ai
    

2. Initialize Configuration

Run the following command to complete initialization. The tool will automatically create a configuration file and a default workspace directory:

clawphd onboard

After initialization, the configuration file ~/.clawphd/config.json and the default workspace ~/.clawphd/workspace/ will be created.

3. Configure API Keys

Edit the ~/.clawphd/config.json file and add API keys for at least one of the supported LLM providers (openrouter, anthropic, openai, gemini, deepseek). Example configuration:

{
  "providers": {
    // Fill in one or more providers
    "openrouter": { "apiKey": "sk-or-..." },
    "anthropic":  { "apiKey": "sk-ant-..." },
    "openai":     { "apiKey": "sk-..." },
    "gemini":     { "apiKey": "AI..." },
    "deepseek":   { "apiKey": "sk-..." }
  },
  "agents": {
    "defaults": {
      "model": "anthropic/claude-opus-4-5" // Default model
    }
  }
}

If you need to use PaperBanana for figure generation, you must also set the Replicate token:

export REPLICATE_API_TOKEN="r8_..."

4. Start Interaction

  • Single message interaction:
    clawphd agent -m "Hello!"
    
  • Interactive conversation (REPL mode):
    clawphd agent
    

Common CLI Commands Reference

Command Description
clawphd onboard Initialize configuration file and workspace directory.
clawphd agent [-m MSG] Interact with the agent. Enters interactive REPL mode if -m is omitted.
clawphd gateway [-p PORT] Start the multi-channel gateway.
clawphd status View configuration information, API key status, and workspace status.
clawphd channels status View channel connection status.
clawphd channels login Link WhatsApp via QR code.
clawphd cron list List all scheduled cron jobs.
clawphd cron add Add a scheduled job. Supports --every (interval), --cron (cron expression), and --at (specific time) parameters.
clawphd cron remove <ID> Delete the scheduled job with the specified ID.
clawphd cron enable <ID> Enable a scheduled job. Add --disable to disable it.
clawphd cron run <ID> Manually trigger the scheduled job with the specified ID.

Use Cases for ClawPhD

ClawPhD is developed based on Nanobot, making it lightweight and efficient. The core code comprises only 3428 lines, deployment takes less than 2 minutes, and it features low memory usage and fast startup.

Use cases include:

  • Rapid creation of figures and posters for academic papers, saving design time.
  • Automatic filtering and summarization of popular papers, enabling efficient tracking of field trends.
  • Multi-format transformation of research outcomes (videos, webpages) to expand dissemination reach.
  • Code reproduction of research methods, lowering the barrier for verifying academic results.
Visit ZhihaoAIRobotic/ClawPhD to access the source code and obtain more information.