knowledge base
- Repo stars 24,518
- Author repo DeepTutor
- Domain
- Documentation
- Author-declared agents
- No explicit declaration found; this is not inferred or tested compatibility
- Static check
- 88 / 100 · heuristic scan, not runtime safety proof
- Runtime evidence
- Not run; no isolated runtime test evidence is currently recorded
- Author / version / license
- @HKUDS · no license declared
- Token usage
- Lean
- Setup complexity
- Guided setup
- External API key
- Not required
- Operating systems
- Unspecified (assume cross-platform)
- Runtime requirements
- No explicit requirements detected
- Detected file/system behavior
-
- Read-only
- Write / modify
- Shell exec
- Network behavior
- Local-only
- Install commands
- None (reference only)
Heads up: Tool permissions are not declared; actual access depends on the runtime.
# Knowledge Base Management
Use the `exec` tool to manage DeepTutor knowledge bases via CLI.
## When to Use
- User asks about their **knowledge bases** or **study materials**
- User wants to **create**, **search**, or **manage** a knowledge base
- User needs to **add documents** to an existing KB
## Commands
### List all knowledge bases
```bash
deeptutor kb list --format json
```
> `--format json` outputs machine-readable JSON instead of a Rich table.
### Get info about a knowledge base
```bash
deeptutor kb info <kb_name>
```
### Create a knowledge base
```bash
deeptutor kb create <kb_name> --doc /path/to/file.pdf
deeptutor kb create <kb_name> --docs-dir /path/to/directory/
```
### Add documents to existing KB
```bash
deeptutor kb add <kb_name> --doc /path/to/new_file.pdf
```
### Search a knowledge base
```bash
deeptutor kb search <kb_name> "<query>" --format json
```
### Set a default knowledge base
```bash
deeptutor kb set-default <kb_name>
```
### Delete a knowledge base
```bash
deeptutor kb delete <kb_name> --force
```
## Tips
- Use `kb list` first to see what's available before searching.
- The `rag` tool can also search KBs directly within the conversation — use it for quick lookups.
- KB creation from large PDFs can take a few minutes.
- Always confirm with the user before deleting a knowledge base.
Sections and files
Listed in source order.
sections -> When to Use → Commands → List all knowledge bases → Get info about a knowledge base → Create a knowledge base → Add documents to existing KB
terms -> knowledge bases · study materials · create · search · manage · add documents
files/cmd -> exec · --format json · kb list · rag
body sha256 -> 0d105e136c43
When to Use
User asks about their knowledge bases or study materials User wants to create, search, or manage a knowledge base User needs to add documents to an existing KB
List all knowledge bases
--format jsonoutputs machine-readable JSON instead of a Rich table.Tips
Use
kb listfirst to see what's available before searching. Theragtool can also search KBs directly within the conversation — use it for quick lookups. KB creation from large PDFs can take a few minutes. Always confirm with the user before deleting a knowledge base.