agentleFS
HKUDSHKUDS/DeepTutor/AGENTS.md

DeepTutor

AGENTS.md41k starsChanged 4 months agoApache-2.0View on GitHub

DeepTutor is an agent-native intelligent learning companion organized around a two-layer plugin model — single-shot Tools invoked by the LLM, and multi-stage Capabilities that take over a turn — exposed through three entry points: CLI, WebSocket API, and Python SDK. All three enter the durable turn application service before the shared turn engine routes a normalized context to the selected capability. TurnApplicationService owns durable turn state and replay through the session store and runtime coordinator. Each execution uses a per-turn…

  • Reads credentials
  • Installs packages

Adopted by

Steady: 0 new projects took it in the last 4 weeks, none the 4 weeks before.thin data

Week of Sep 27: 0 new projectsWeek of Oct 4: 0 new projectsWeek of Oct 11: 0 new projectsWeek of Oct 18: 0 new projectsWeek of Oct 25: 0 new projectsWeek of Nov 1: 0 new projectsWeek of Nov 8: 0 new projectsWeek of Nov 15: 0 new projects
Sep 2026Oct 2026Nov 2026
New projects taking a version of this file each week, over the 8 weeks our latest run read: only 0 in all, so this is a hint, not a trend.

Who's talking about HKUDS/DeepTutor

The biggest 5 of 62 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 62

Talked about on GitHub, Bluesky and Hacker News (62 times).

On GitHub · 50

45 more on GitHub

On Bluesky · 11

6 more on Bluesky

On Hacker News · 1

  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.

    Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

  • In this repositoryOne other file it gives its agents.

The file

We split this AGENTS.md into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    All capabilities converge on emit_capability_result() in deeptutor/capabilities/_shared.py so every turn emits the same envelope (response …

    line 83

≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

DeepTutor — Agent-Native Architecture

Overview

DeepTutor is an agent-native intelligent learning companion organized around a two-layer plugin model — single-shot Tools invoked by the LLM, and multi-stage Capabilities that take over a turn — exposed through three entry points: CLI, WebSocket API, and Python SDK. All three enter the durable turn application service before the shared turn engine routes a normalized context to the selected capability.

Architecture

Entry Points:  CLI (Typer)  |  WebSocket /ws  |  Python SDK
                    ↓                   ↓                   ↓
              ┌─────────────────────────────────────────────────┐
              │          TurnApplicationService                 │
              │   persists, coordinates, and replays turns      │
              └──────────────────────┬──────────────────────────┘
                                     ↓
              ┌─────────────────────────────────────────────────┐
              │       TurnEngine → ChatOrchestrator              │
              │   routes UnifiedContext → selected Capability    │
              │   (defaults to `chat`)                           │
              └──────────┬──────────────┬───────────────────────┘
                         │              │
              ┌──────────▼──┐  ┌────────▼──────────┐
              │ ToolRegistry │  │ CapabilityRegistry │
              │  (Level 1)   │  │   (Level 2)        │
              └──────────────┘  └────────────────────┘

TurnApplicationService owns durable turn state and replay through the session store and runtime coordinator. Each execution uses a per-turn StreamBus; the orchestrator emits events, the turn runtime persists them, and adapters replay them to consumers. Runtime settings live in data/user/settings/*.json — project-root .env files are intentionally ignored.

Level 1 — Tools

Single-function tools the LLM picks on demand. Seven user-toggleable tools surface in /settings/tools:

ToolDescription
brainstormBreadth-first idea exploration with rationale
web_searchWeb search with citations
paper_searcharXiv preprint search
reasonDedicated deep-reasoning LLM call
geogebra_analysisAnalyze math images into GeoGebra commands
imagegenGenerate images
videogenGenerate videos

USER_TOGGLEABLE_TOOL_NAMES in deeptutor/tools/builtin/__init__.py is the authoritative toggle list. Other built-ins are context-gated or capability-owned: CONFIGURABLE_BUILTIN_TOOL_NAMES declares the context-gated surface, while deeptutor/agents/_shared/tool_composition.py owns the mount rules (ToolMountFlags) and the always-available workspace tools. Examples include rag, memory and notebook tools, read_skill, deferred MCP/CLI tools, exec, ask_user, and mastery navigation. --tool selects from the user-toggleable whitelist; it does not bypass context or capability gates.

Level 2 — Capabilities

Multi-stage pipelines that own the turn:

CapabilityStages
chatexploring → responding (single agentic loop, default)
ask_questionsresponding (chat loop forced through ask_user)
deep_solveresponding (chat loop + solve planning tools)
deep_questionideation → generation
deep_researchrephrasing → decomposing → researching → reporting
visualizeanalyzing → generating → reviewing (SVG / Chart.js / Mermaid / HTML; or routes to Manim sub-stages via render_type)
math_animatorconcept_analysis → concept_design → code_generation → code_retry → summary → render_output
mastery_pathresponding (Guided Learning — chat loop + mastery tools, gated per topic type)
immersive_readingresponding (document-grounded reading loop)
course_studyresponding (course-state sensing and hand-off loop)
immersive_watchingresponding (timestamp-grounded video loop)

All capabilities converge on emit_capability_result() in deeptutor/capabilities/_shared.py so every turn emits the same envelope (response payload + cost_summary from UsageTracker). Status copy and prompts are i18n'd via capabilities/prompts/{en,zh}/<name>.yaml.

CLI Usage

# Install
pip install deeptutor      # Full app (CLI + Web/API + packaged Web assets)
pip install deeptutor-cli  # CLI-only

# Run any capability
deeptutor run chat "Explain Fourier transform"
deeptutor run deep_solve "Solve x^2=4" -t rag --kb my-kb
deeptutor run visualize "Animate sine wave" --config render_mode=manim_video

# Interactive REPL
deeptutor chat
# (inside the REPL: /regenerate or /retry re-runs the last user message)

# Partners (IM-connected companions)
deeptutor partner list

# Knowledge bases, memory, server
deeptutor kb list
deeptutor kb create my-kb --doc textbook.pdf
deeptutor memory show
deeptutor serve --port 8001       # API server only
deeptutor start                   # backend + frontend together

Key Files

PathPurpose
deeptutor/runtime/orchestrator.pyChatOrchestrator — unified entry
deeptutor/runtime/launcher.pyBackend + frontend lifecycle / port discovery
deeptutor/runtime/registry/Tool + Capability registries
deeptutor/runtime/bootstrap/builtin_capabilities.pyBuilt-in capability class paths
deeptutor/services/config/runtime_settings.pyJSON settings + process-env overrides
deeptutor/services/subagent/Local/remote agent connectors; register each backend in registry.py and its model options in models.py (Grok CLI uses native streaming-json)
deeptutor/core/stream.py, deeptutor/runtime/stream_bus.pyStreamEvent protocol + async fan-out
deeptutor/core/tool_protocol.pyBaseTool + ToolDefinition
deeptutor/core/capability_protocol.pyTurnCapability + CapabilityManifest
deeptutor/core/context.pyUnifiedContext dataclass
deeptutor/tools/builtin/__init__.pyAll built-in tool wrappers
deeptutor/capabilities/Built-in capability implementations
deeptutor/app.pyDeepTutorApp — Python SDK facade
deeptutor_cli/main.pyTyper CLI entry point
deeptutor/api/routers/unified_ws.pyUnified WebSocket endpoint

Dependency Layers

Public install paths and source extras are defined in pyproject.toml. Requirements files mirror the same dependency groups for Docker/CI installs.

pip install deeptutor      — Full app (CLI + Web/API + packaged Web assets)
pip install deeptutor-cli  — CLI-only (LLM + RAG + providers + document parsing)
pip install -e .           — Source install for development

Source extras (.[ extra ], defined in pyproject.toml):
.[cli]            — CLI-only dependency set
.[server]         — Web/API server dependencies
.[partners]       — Partner channel SDKs  (legacy alias: .[tutorbot])
.[matrix]         — Matrix channel for Partners (matrix-nio; needs libolm)
.[matrix-e2e]     — Matrix with end-to-end encryption (matrix-nio[e2e])
.[math-animator]  — Manim addon (powers `visualize` Manim renders + `deeptutor run math_animator`)
.[dev]            — Test / lint tooling
.[all]            — Everything above

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.