DeepTutor AGENTS.md

A project instruction file for DeepTutor, a learning platform that uses an AI agent to provide tools and multi-step capabilities through a command line, web connection, or Python code.

In plain words
What is it for?
It helps an agent understand DeepTutor’s tools, capabilities, command-line usage, and three ways to access the system.
Why use it?
It gives the coding agent the project’s architecture and usage rules in one place, reducing guesswork when working on DeepTutor.

Instructions file for CodexOpenCode

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/hkuds/deeptutor/agents-md
Clone the repo
git clone --depth 1 https://github.com/HKUDS/DeepTutor

Made for: Codex, OpenCode.

Per session 1,544 This file is loaded in full into every session.
When invoked 1,544 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.01544 $0.01544
Opus 5 $0.00772 $0.00772
Sonnet 5 $0.00309 $0.00309
Haiku 4.5 $0.00154 $0.00154

Measured today against content hash aef66501c445, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

DeepTutor AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

AGENTS.md · 139 lines

How it starts

The opening of the file, as written. The whole thing — 139 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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.

Architecture

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

All capabilities emit on a shared StreamBus; the orchestrator fans events out 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. Four user-toggleable tools surface in /settings/tools:

Tool Description
brainstorm Breadth-first idea exploration with rationale
web_search Web search with citations
paper_search arXiv preprint search
reason Dedicated deep-reasoning LLM call

The rest are context-gated: the chat capability auto-mounts them from ToolMountFlags (presence of a KB, attachments, sandbox availability, …), and any of them can also be force-enabled via --tool. Auto-mounted set: rag, read_source, read_memory, write_memory, read_skill, load_tools, exec, code_execution (sandboxed Python: NL intent → code → run), list_notebook, write_note, web_fetch, github, cron, ask_user (pauses the turn and resumes with the user's reply), plus the mastery-path tools. geogebra_analysis is parked under COMING_SOON_TOOL_TYPES.

Read the full file on GitHub · 139 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today Changed · -3 tokens per session aef66501c445
  2. 2d ago First seen · 139 lines · 1,547 tokens per session scan A fcfc6783e969

Subscribe to this mod's changes

DeepTutor AGENTS.md is an instructions file published in the GitHub repository HKUDS/DeepTutor (38,271 stars, last pushed today), licensed Apache-2.0. It adds 1,544 tokens to every session, about $0.0077 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.