A personal AI tutor with long-term memory and tool use.
Project description
dint
dint is a Socratic AI tutor that teaches through guided discovery. Instead of giving you answers, dint asks the right questions to help you build understanding from the ground up.
Features
- Socratic dialogue — dint never just tells you the answer; it leads you there with questions
- Adaptive skill tracking — estimates your proficiency per concept and adjusts difficulty
- Knowledge graph — builds a map of concepts and their relationships as you learn
- Long-term memory — remembers your preferences, misconceptions, and learning goals across sessions
- Web search — looks up current information when needed
- Session management — multiple conversation threads, each with its own progress
Quick Start
Option A — pip install (recommended)
# 1. Install from the project root
pip install .
# 2. Configure your API key
cp .env.example .env
# Edit .env — add your OpenAI / Anthropic / other provider key
# 3. Run
dint
Option B — run.sh (dev mode with auto-reload)
chmod +x run.sh
./run.sh
Option C — uv
uv sync
uv run dint
The app will be available at http://localhost:7070.
CLI options
dint [--host HOST] [--port PORT] [--no-reload]
| Flag | Description | Default |
|---|---|---|
--host |
Bind address | 0.0.0.0 |
--port |
Port to listen on | 7070 |
--no-reload |
Disable auto-reload (production) | (reload on) |
Architecture
dint/
├── src/dint/
│ ├── app.py # FastAPI application + REST routes
│ ├── agent.py # Tool-calling orchestration loop
│ ├── llm.py # LLM provider (OpenAI-compatible)
│ ├── tools.py # Tool definitions & executors
│ ├── reflection.py # Post-turn analysis (skills, memory, KG)
│ ├── persona.py # System prompt / teaching persona
│ ├── db.py # SQLite persistence layer
│ ├── config.py # Environment configuration
│ ├── cli.py # CLI entry point (argparse + uvicorn)
│ └── frontend/ # Bundled static assets
│ ├── index.html # SPA shell
│ ├── style.css # Dark-theme UI
│ └── app.js # Client logic
├── frontend/ # Source frontend (dev copy)
├── run.sh # One-command launcher (dev)
├── pyproject.toml # Package metadata & dependencies
└── .env.example # Config template
How It Works
- You send a message via the web UI.
- The agent assembles context: persona, relevant memories, skill estimates, and knowledge subgraph.
- The LLM responds, optionally calling tools (web search, memory recall, skill lookup, KG query).
- After the reply, the reflection engine analyses the exchange:
- Updates skill confidence scores
- Extracts new knowledge-graph nodes/edges
- Stores durable memories (preferences, corrections, goals)
- The UI renders the reply and updates the side panels.
Configuration
| Variable | Description | Default |
|---|---|---|
OPENAI_API_KEY |
API key for your provider | (required) |
OPENAI_BASE_URL |
OpenAI-compatible endpoint | https://api.openai.com/v1 |
DINT_MODEL |
Model name | gpt-4o-mini |
DATABASE_URL |
SQLite database path | dint.db |
SERPER_API_KEY |
Serper.dev key for web search | (optional) |
Requirements
- Python 3.11+
- An OpenAI-compatible API key (OpenAI, Anthropic via proxy, Ollama, etc.)
- (Optional) A Serper.dev key for web search
License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
dint-0.1.0.tar.gz
(46.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
dint-0.1.0-py3-none-any.whl
(51.0 kB
view details)
File details
Details for the file dint-0.1.0.tar.gz.
File metadata
- Download URL: dint-0.1.0.tar.gz
- Upload date:
- Size: 46.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Fedora Linux","version":"43","id":"","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3cc7db9df2cbd661a98336b86ff46185d5aacc77650dcd0f38b4e2f1cc3b712d
|
|
| MD5 |
793387cec65fbfbc1f4d3010e1165852
|
|
| BLAKE2b-256 |
97b34ccf79cfdc0dd4c2b6c50fd1de1e1114d0130a5eb83f369d1f92821ad4bd
|
File details
Details for the file dint-0.1.0-py3-none-any.whl.
File metadata
- Download URL: dint-0.1.0-py3-none-any.whl
- Upload date:
- Size: 51.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Fedora Linux","version":"43","id":"","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8c14b850605c2c5f1bac131b353ce2dc934044812810eaae987ee3790fca1335
|
|
| MD5 |
492a17d0883a2b13cd3b3ee325108369
|
|
| BLAKE2b-256 |
b5a874e538a061e447c3a4ebf69fe13dd4c71826aa3bc101efd65dece6860389
|